I am trying to use multiple frontends to feed an audio/video backend
pair. When I switch frontends, I unlink the front/back ends, remove them from their respective pipelines and unref the pipelines. After I have done that, the backend object has been destroyed. I've attached a code snippet and XML dumps of an affected object before it is removed from the pipeline, the pipeline after removal, and the complaint about the object after it is removed. With the object removed from the pipeline, unreffing the pipeline shouldn't change any of the objects it used to contain. Any hints about what I've missed? Sorry about the length of the xml. Code: gst_element_set_state (GST_ELEMENT (audio_pipeline), GST_STATE_NULL); /* unlink ends */ unlink_backend_sink(audio_backend); if (dump_xml) gst_xml_write_file (GST_ELEMENT (audio_backend), stdout); /* remove them from bin, so they are not freed */ gst_bin_remove_many(GST_BIN (audio_pipeline), audio_frontend, audio_backend, NULL); if (dump_xml) gst_xml_write_file (GST_ELEMENT (audio_pipeline), stdout); gst_object_unref (audio_pipeline); audio_pipeline = NULL; if (dump_xml) gst_xml_write_file (GST_ELEMENT (audio_backend), stdout); Messages and debug prints: backend audio_backend backend unlink successful <?xml version="1.0"?> <gstreamer xmlns:gst="http://gstreamer.net/gst-core/1.0/"> <gst:element> <gst:name>audio_backend</gst:name> <gst:type>bin</gst:type> <gst:param> <gst:name>name</gst:name> <gst:value>audio_backend</gst:value> </gst:param> <gst:param> <gst:name>async-handling</gst:name> <gst:value>FALSE</gst:value> </gst:param> <gst:pad> <gst:ghostpad> <gst:name>ghost3</gst:name> <gst:parent>audio_backend</gst:parent> <gst:direction>sink</gst:direction> <gst:peer>audio_frontend.ghost2</gst:peer> </gst:ghostpad> </gst:pad> <gst:children> <gst:element> <gst:name>alsasink0</gst:name> <gst:type>alsasink</gst:type> <gst:param> <gst:name>name</gst:name> <gst:value>alsasink0</gst:value> </gst:param> <gst:param> <gst:name>preroll-queue-len</gst:name> <gst:value>0</gst:value> </gst:param> <gst:param> <gst:name>sync</gst:name> <gst:value>TRUE</gst:value> </gst:param> <gst:param> <gst:name>max-lateness</gst:name> <gst:value>-1</gst:value> </gst:param> <gst:param> <gst:name>qos</gst:name> <gst:value>FALSE</gst:value> </gst:param> <gst:param> <gst:name>async</gst:name> <gst:value>TRUE</gst:value> </gst:param> <gst:param> <gst:name>ts-offset</gst:name> <gst:value>0</gst:value> </gst:param> <gst:param> <gst:name>last-buffer</gst:name> <gst:value>NULL</gst:value> </gst:param> <gst:param> <gst:name>buffer-time</gst:name> <gst:value>200000</gst:value> </gst:param> <gst:param> <gst:name>latency-time</gst:name> <gst:value>10000</gst:value> </gst:param> <gst:param> <gst:name>provide-clock</gst:name> <gst:value>TRUE</gst:value> </gst:param> <gst:param> <gst:name>slave-method</gst:name> <gst:value>1</gst:value> </gst:param> <gst:param> <gst:name>device</gst:name> <gst:value>default</gst:value> </gst:param> <gst:param> <gst:name>device-name</gst:name> <gst:value/> </gst:param> <gst:pad> <gst:name>sink</gst:name> <gst:direction>sink</gst:direction> <gst:peer>audioconvert0.src</gst:peer> </gst:pad> </gst:element> <gst:element> <gst:name>audioconvert0</gst:name> <gst:type>audioconvert</gst:type> <gst:param> <gst:name>name</gst:name> <gst:value>audioconvert0</gst:value> </gst:param> <gst:param> <gst:name>qos</gst:name> <gst:value>FALSE</gst:value> </gst:param> <gst:param> <gst:name>dithering</gst:name> <gst:value>2</gst:value> </gst:param> <gst:param> <gst:name>noise-shaping</gst:name> <gst:value>0</gst:value> </gst:param> <gst:pad> <gst:name>src</gst:name> <gst:direction>source</gst:direction> <gst:peer>alsasink0.sink</gst:peer> </gst:pad> <gst:pad> <gst:name>sink</gst:name> <gst:direction>sink</gst:direction> <gst:peer>audio_q.src</gst:peer> </gst:pad> </gst:element> <gst:element> <gst:name>audio_q</gst:name> <gst:type>queue</gst:type> <gst:param> <gst:name>name</gst:name> <gst:value>audio_q</gst:value> </gst:param> <gst:param> <gst:name>current-level-buffers</gst:name> <gst:value>0</gst:value> </gst:param> <gst:param> <gst:name>current-level-bytes</gst:name> <gst:value>0</gst:value> </gst:param> <gst:param> <gst:name>current-level-time</gst:name> <gst:value>0</gst:value> </gst:param> <gst:param> <gst:name>max-size-buffers</gst:name> <gst:value>0</gst:value> </gst:param> <gst:param> <gst:name>max-size-bytes</gst:name> <gst:value>10485760</gst:value> </gst:param> <gst:param> <gst:name>max-size-time</gst:name> <gst:value>0</gst:value> </gst:param> <gst:param> <gst:name>min-threshold-buffers</gst:name> <gst:value>0</gst:value> </gst:param> <gst:param> <gst:name>min-threshold-bytes</gst:name> <gst:value>0</gst:value> </gst:param> <gst:param> <gst:name>min-threshold-time</gst:name> <gst:value>0</gst:value> </gst:param> <gst:param> <gst:name>leaky</gst:name> <gst:value>0</gst:value> </gst:param> <gst:pad> <gst:name>src</gst:name> <gst:direction>source</gst:direction> <gst:peer>audioconvert0.sink</gst:peer> </gst:pad> <gst:pad> <gst:name>sink</gst:name> <gst:direction>sink</gst:direction> <gst:peer/> </gst:pad> </gst:element> </gst:children> </gst:element> </gstreamer> <?xml version="1.0"?> <gstreamer xmlns:gst="http://gstreamer.net/gst-core/1.0/"> <gst:element> <gst:name>audio_pipeline</gst:name> <gst:type>pipeline</gst:type> <gst:param> <gst:name>name</gst:name> <gst:value>audio_pipeline</gst:value> </gst:param> <gst:param> <gst:name>async-handling</gst:name> <gst:value>FALSE</gst:value> </gst:param> <gst:param> <gst:name>delay</gst:name> <gst:value>0</gst:value> </gst:param> <gst:param> <gst:name>auto-flush-bus</gst:name> <gst:value>TRUE</gst:value> </gst:param> <gst:children/> </gst:element> </gstreamer> (avMediaDaemon:22708): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GstElement' (avMediaDaemon:22708): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GstObject' (avMediaDaemon:22708): GStreamer-CRITICAL **: gst_object_save_thyself: assertion `GST_IS_OBJECT (object)' failed <?xml version="1.0"?> <gstreamer xmlns:gst="http://gstreamer.net/gst-core/1.0/"> <gst:element/> </gstreamer> ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Fri, Feb 6, 2009 at 9:13 PM, Dan Taylor <[hidden email]> wrote: I am trying to use multiple frontends to feed an audio/video backend Removing them from the bin unrefs them. Maybe this will clarify: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBin.html#gst-bin-remove
-- Thiago Sousa Santos Embedded Systems and Pervasive Computing Lab (Embedded) Center of Electrical Engineering and Informatics (CEEI) Federal University of Campina Grande (UFCG) ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |