question about gst_pad_query_duration()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

question about gst_pad_query_duration()

Yue Li-2
Hi all

I'm making a demux element but got confused with the
gst_pad_query_duration() function.

The example code given in "11.2. Pads driving the pipeline" of "Plugin
Writer's Guide" is:
if (!gst_pad_query_duration (filter->sinkpad, &fmt, &len)) {
  GST_DEBUG_OBJECT (filter, "failed to query duration, pausing");
  goto stop;
}

But I found that in "Core Reference Manual" :
gst_pad_query_duration (GstPad *pad,
                                     GstFormat *format,
                                     gint64 *duration);
Queries a pad for the total stream duration.
pad :         a GstPad to invoke the duration query on.
Returns :   TRUE if the query could be performed.

So, it seems that the right code should be:
if (gst_pad_query_duration (GST_PAD_PEER(filter->sinkpad), &fmt, &len)) {
  GST_DEBUG_OBJECT (filter, "failed to query duration, pausing");
  goto stop;
}

Please help me to know if I got misunderstandings or there's mistake
in the guide.

Thanks a lot.
Yue Li

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel