[gst-devel] How can I get full information about a media file?

wl2776 wl2776 at gmail.com
Thu Apr 1 11:17:32 CEST 2010



lrn-2 wrote:
> 
>    while (TRUE)
>    {
>       GstMessage *msg = gst_bus_pop(mBus);
>       if (msg)
>       {
>         if (!OnBusMessage(mBus,msg))
>           break;
>       }
>    }
> 
> OnBusMessage() here doesn't call gst_message_unref() either. I don't
> know, maybe it's a bug on my part.
> 

The documentation: 
===
gst_bus_pop()
Returns :
The GstMessage that is on the bus, or NULL if the bus is empty. The message
is taken from the bus and needs to be unreffed with gst_message_unref()
after usage. MT safe.
===
So, one gst_message_unref() should be.

Now, when the pipeline is built, how can I get an information about the
media?
I see only one way - gst_bin_iterate_... elements then, for each element
iterate its pads and gst_pad_get_negotiated_caps(). 
By the way, gst_pad_get_negotiated_caps() returns null, when called right
after gst_element_link_pads()
from the no-more-pads handler.

I'd like to somewhat shorten the procedure - for example, iterate sinks and
iterate sink pads. 
>From what I've seen on the pictures, built by GST_DEBUG_BIN_TO_DOT_FILE, I
need only decoder elements. 
There is a function gst_bin_iterate_all_by_interface().
Is there any interface, that all decoders support?

However, this method also doesn't give a full information, if there is more
than 2 streams in a file. As far as I understand, uridecodebin will not
render more than two streams.

-- 
View this message in context: http://n4.nabble.com/How-can-I-get-full-information-about-a-media-file-tp1745331p1747852.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list