API

Matthias Kretz kretz at kde.org
Wed Jul 11 13:40:15 CEST 2007


On Tuesday 10 July 2007, Richard wrote:
> > If you setCurrentSource(someRadioStream) and preroll starts and  
> > then you wait
> > 5 min before calling play() what will you hear? 5min old stream?  
> > current
> > stream? was the stream going over the network and getting dumped  
> > to /dev/null
> > for the last 5 min then?
>
> I know QT uses preroll to acquire all neccesary resources up front,  
> and set up needed connections. So even for radio preroll makes some  
> sense there, at least. I would say preroll in the case of radio means  
> start the streaming as if you were playing, but 'mute' it.

Sounds sensible to me, but that needs to be documented in the API and the user 
must somehow understand/be able to control this. Imagine a Plasma applet that 
can play an internet radio stream and that opens the stream but waits with 
calling play until the user presses a button. The applet will use the 
internet connection all the time the desktop is running

> > xinelib has no preroll concept so I have not really touched the  
> > issue yet.
>
> cool. We could do e.g:
> bool MediaObject::setPreRollHint(bool preroll); // returns false if  
> the backend can't handle it.

Also see my other mail.
But if we were to add this function what should the application do with that 
information whether setting the prerollhint failed? I'd say the backend 
should try to match the requested behaviour as good as possible. In this case 
the prerollhint would actually mean something to the xine backend, just not 
100% the same thing as it means to another backend.

The API really shouldn't reflect so much that there are quite different 
backends being used to implement the functionality. If possible let's keep it 
an implementation detail.

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/phonon-backends/attachments/20070711/c1521f3e/attachment.pgp 


More information about the Phonon-backends mailing list