GST_FORMAT_BYTES query duration keeps on increasing

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GST_FORMAT_BYTES query duration keeps on increasing

deeps8us
I am using playbin (with filesrc) to playback a local file of total size 4286588 bytes.
While playing, I query offset and total bytes

gst_element_query_position(pipeline, GST_FORMAT_BYTES, &position_bytes);
gst_element_query_duration(pipeline, GST_FORMAT_BYTES, &duration_bytes);

Found that both keeps on increasing. I was expecting total duration bytes to be constant at 4286588.
Query with GST_FORMAT_TIME was behaving as per my expectation. Total time is constant and position increases.
Why for gst_element_query_duration with GST_FORMAT_BYTES, total duration increases.

 Bytes       2776113 /       2206057
 Time 0:00.01 / 0:00.32

 Bytes       2792497 /       2208655
 Time 0:00.02 / 0:00.32

 Bytes       2800689 /       2207036
 Time 0:00.02 / 0:00.32

 Bytes      2812977 /       2212413
 Time 0:00.03 / 0:00.32

 Bytes       2825265 /       2214579
 Time 0:00.03 / 0:00.32

 Bytes       2837553 /       2218863
 Time 0:00.04 / 0:00.32
Reply | Threaded
Open this post in threaded view
|

Re: GST_FORMAT_BYTES query duration keeps on increasing

Tim Müller
Hi,

Are you checking the return values of *_query()? Are you initialising
your variables? I would expect BYTE queries on playbin to fail. You
should use TIME queries.

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel