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

Stefan Kost ensonic at hora-obscura.de
Fri Apr 9 10:09:17 CEST 2010


Am 09.04.2010 08:26, schrieb wl2776:
> 
> 
> Stefan Kost wrote:
>>
>>>>> Yes, I know, I play a wav file. The question is - why has playbin2 left
>>>>> the video-sink?
>>>>> And another question - why I don't see any video-sinks in the pipeline?
>>>>>       
>>>> why should playbin add the videosink to the pipleine if its not needed.
>>>> GST_DEBUG_BIN_TO_DOT_FILE() only shows the elements that are in the
>>>> pipeline, your videosink is not.
>>>>     
>>> If I see messages from the videosink, then it's added to the playbin,
>>> right?
>>>
>> No. It is instantiated.
>>
> Sorry, I don't understand. How many instances of videosink has my
> application?
> 
> My code is like the following
> 
> GstElement *m_player;
> GstElement *m_videosink;
> 
> void open(char *filename)
> {
>   ...
>   m_player=gst_element_factory_make("playbin2","player");
>   m_videosink=gst_element_factory_make("directdrawsink","videosink");
>   g_object_set(m_player,"video-sink",m_videosink);
> ...
> }
> 
> 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. Also passing your videosink to
playbin2 via the property does not *add* it to the pipeline. The graphviz dump
dumps all element in the given pipeline. It does not dump all instantiated
elemnts (imho that information is only available to your application).

Stefan




More information about the gstreamer-devel mailing list