Using buffering info in gstreamer 0.10

Sebastian Dröge sebastian at centricular.com
Wed Mar 16 14:18:31 UTC 2016


On Mi, 2016-03-16 at 15:07 +0100, Pawel Kapica wrote:
> Hi!
>  
> I am using GStreamer 0.10.38 (I have to use this version) for playing
> video from network streams (e.g youtube) and I found a problem that I
> need to solve.
> My application for video playing (using uridecodebin or playbin2)
> should show user buffering progress. To be precise, if current
> position (being played) is inside buffered area I need to show
> buffering progress from current position to the end of its buffered
> area. Using sample application (http://docs.gstreamer.com/plugins/vie
> wsource/viewpagesrc.action?pageId=327808 with ring -buffer limited to
> 2MB) I observe that current position may not be inside any reported
> buffered area. In this example I can assume that data is buffered and
> being processed inside the pipeline. The problem starts when user can
> seek (multiple times) through the video.
> Can you please give me any clues if there is any way (API calls) to
> learn if current position is inside next buffered area?
>  
> BR,
> Pawel
>  
> PS. To be precise, I observe that in my pipeline element that
> responses for buffering queries is queue2. However this element shows
> only state of its buffers. More data may be already push into
> pipeline (for example to multiqueue). I think this is the reason why
> current position may be outside buffers reported by queries. This
> knowledge however does not give me the solution for a problem of
> determination if current position is inside buffered area.

The buffering query also contains the already buffered ranges in
addition to what it buffers currently. So you can get all the areas
that were previously buffered from there with
  gst_query_get_n_buffering_ranges() and
  gst_query_parse_nth_buffering_range()

Not sure if this was already implemented in 0.10 though, you should
consider upgrading to 1.x in any case. 0.10 is no longer maintained and
supported since 3+ years.

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160316/ed941a5f/attachment.sig>


More information about the gstreamer-devel mailing list