Re: gstmm add element to pipeline test



On Tue, 2007-12-04 at 12:38 -0500, José Alburquerque wrote:
[snip]
The gst_bus_add_signal_watch() call sort of 
> "enables" the "message" signal of  Gst::Bus 
> (see gst_bus_add_signal_watch 
> <http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBus.html#gst-bus-add-signal-watch>) 
> (I'll add a comment as you say).  Without the call, the "message" signal 
> of the bus is never emitted so this call is necessary (I guess).
[snip]

Why is this not the default for GstPipeline in C? Why would we make it the default in C++?

[snip]
> I 
> stepped through the code and noticed that gst_bus_add_signal_watch() 
> calls gst_bus_add_signal_watch_full() which calls 
> gst_bus_add_watch_full().  This last function (gst_bus_add_watch_full) 
> calls gst_bus_create_watch() which "references()" the bus and does not 
> unreference() it (it appears as if the bus has an "extra" sort of 
> "unneeded?" reference).

Yes, the documentation says that you need to call
gst_bus_remove_signal_watch() once for each call of
gst_bus_add_watch_full():
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBus.html#gst-bus-add-signal-watch-full

> I noticed that the Bus was not being "destroyed" at the end of the ogg 
> player program I submitted yesterday because I tried to have a 
> gst_bus_remove_signal_watch() 
> <http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBus.html#gst-bus-remove-signal-watch>
> in the Bus destructor and noticed that the destructor was never called.  
> However when I placed the gst_bus_remove_signal_watch() call in the 
> Gst::Pipeline destructor, the pipeline destructor is called because I 
> get the following error when the pipeline destructor is called:
>
> (gstreamer-ogg-player:21179): GStreamer-CRITICAL **: 
> gst_element_get_bus: assertion `GST_IS_ELEMENT (element)' failed

We'll figure this out. I'd prefer to do that before committing this.

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]