[haiku-development] Re: Streaming Fixes for the Plugin Manager

  • From: "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 04 Mar 2016 13:05:30 +0000

4 mars 20

I think to correctly solve some behaviors there's need to allow the interface 
behave in slight
different ways. For example streaming from a live youtube channel will not 
allow seeking forward
unless the streaming is paused, but when the user press play next time he 
have the possibility to
watch the buffered streaming in a delayed way or press a button to jump 
forward to the live
streaming. In this case there's not way to go backward and forward but in 
that special case I
mentioned we are allowed to seek forward but obviously with the limit of how 
many frames we
buffered in the meantime. This is an example for why I've been thinking that 
adding a
BPositionIO-derivd BStreamingIO with the mentioned methods and possibly more 
to check the status of
buffered data could be actually a complete solution and will give way to 
eventual subclasses to add
more smar ways to solve the problems.

As Axel mentionned, in the case of youtube videos HTTP actually allows us to 
implement seeking: it's possible to create an HTTP request which gets the data 
starting at a given offset.

Similarly to DVD playback, however, seeking is a costly operation and there 
will be a delay before playback resumes. It is also a good idea to make sure we 
have enough data available in the buffer "near" the current position.

A different case is webradios using eg. icecast or shoutcast. These streams are 
not seekable at all and in that case we need to disallow seeking completely, or 
restrict it to the available in-memory buffer.

-- 
Adrien.

Other related posts: