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

LRN lrn1986 at gmail.com
Wed Mar 31 17:45:34 CEST 2010


On 31.03.2010 18:49, wl2776 wrote:
>
> lrn-2 wrote:
>   
>> An approach that worked for me:
>>
>> Create a pipeline, bus.
>> Create uridecodebin, set its uri property (or create filesrc, decodebin
>> and link them)
>> Set up "no-more-pads", "unknown-type" handlers
>>
>>     
> Thank you! This almost works. 
> The problem is, the "no-more-pads" callback is not always called. It is
> called only if I trace my program in a debugger. If the program runs freely,
> it doesn't called.
>
> My code is the following (error checking is omitted for brevity).
> Big question is should I call gst_message_unref both in bus the cycle,
> polling a bus, and in bus_watch?
>   
I've used this:

   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.




More information about the gstreamer-devel mailing list