[gst-devel] How can I get full information about a media file?
LRN
lrn1986 at gmail.com
Fri Apr 2 13:15:50 CEST 2010
On 02.04.2010 14:50, wl2776 wrote:
>
> lrn-2 wrote:
>
>> In no-more-pads i've used gst_element_iterate_src_pads() on decodebin
>> element (with gst_iterator_next() and a standard gstiterator spell). For
>> each pad it returns you can gst_pad_get_caps(),
>> gst_caps_get_structure(), etc
>>
>>
> I tried getting negotiated caps on the sink pads of the fakesinks, and they
> were null .
>
Well, probably because there was nothing negotiated between decodebin
and fakesinks at that moment (you've just linked them together,
negotiation takes place once the data flows).
>
> lrn-2 wrote:
>
>> srcs, not sinks.
>>
>> It is enough to iterate source pads of the bin as a whole, without
>> digging into its internal organs. By doing this you'll get all
>> decodeable streams of the source file, and 'unknown' handler will
>> provide some info on undecodeable streams.
>>
>>
> Yes, I've realized about srcs.
> I used gst_bin_iterate_recurse, because I also wanted to know the codec.
>
Generally you can't know the codec used to encode a stream, only data
format. That is, if it's H.264, it could have been encoded by any
H.264-compatible codec. While they often leave behind some marks to
identify, i do not think they are generally accessible from GStreamer.
More information about the gstreamer-devel
mailing list