[gst-devel] GST_DEBUG_BIN_TO_DOT_FILE doesn't show all elements.

wl2776 wl2776 at gmail.com
Fri Apr 9 13:44:37 CEST 2010



Stefan Kost wrote:
> 
>> I don't call gst_object_unref(m_videosink) in the open(). 
>> And even calls to this in close(), where I set m_player state to NULL and
>> unref all objects, caused segmentation violations.
>> 
>> I think, my application has one videosink instance. Right?
> What I was saying is that as soon as you create an instance of an gstream
> element, it is alive and thus can log to the debug log. It has nothing to
> do
> wheter it has been added to a pipeline or not. 
> 
Yes, you're right. I've forgot, that my application had the OnDraw handler,
which called 
gst_x_overlay_expose(GST_X_OVERLAY(m_videosink));
And this call was that causing the messages about no frame to draw in the
debug window.


Stefan Kost wrote:
> 
> Also passing your videosink to playbin2 via the property does not *add* it
> to the pipeline. 
> 
I doubt. 
My application keeps a reference to the video-sink instance.
When I tried unreffing it in the destruction code, I got segmentation
violations, looking very similar to double free-s. 
Since that, I conclude that the call to gst_object_unref(m_player) also
unreffed this instance.
Therefore, this video-sink was a part of the playbin2.


Stefan Kost wrote:
> 
> The graphviz dump dumps all element in the given pipeline. It does not
> dump all instantiated
> elements (imho that information is only available to your application).
> 
I understand this. The macro is called _BIN_TO_DOT_FILE, that is it writes a
bin.

PS. Ahha... About video-sink. 
It dawned on me, that when I create an element with _factory_make, it
doesn't have a parent, and its refcount == 0. 
Just looked in the debugger, after I set "video-sink" property, m_videosink
has a parent, but its refcount still 0.
Destruction of the playbin2 unrefs m_videosink along with all other
elements, and since video-sinks's refcount is 0, it is destructed.
So, my application should also call gst_object_ref(m_videosink) and
gst_object_unref(m_videosink), since it also keeps references to it.
-- 
View this message in context: http://n4.nabble.com/GST-DEBUG-BIN-TO-DOT-FILE-doesn-t-show-all-elements-tp1752600p1819211.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list