Questions about future Phonon capabilities (AudioDataOutput)
Matthias Kretz
kretz at kde.org
Thu Feb 7 20:45:24 GMT 2008
On Thursday 07 February 2008, Ian Monroe wrote:
> On Feb 7, 2008 1:08 PM, Leo Spalteholz <leo.spalteholz at gmail.com> wrote:
> > Hi,
> >
> > I'm starting a new project that I would really like to be based on phonon
> > (in fact, if phonon can't do it I probably won't bother).
> >
> > So I'm planning a dedicated player for internet radio stations,
> > specifically RadioParadise (because it's the best :). I've never been
> > satisfied with how general purpose players handle internet radio, and I
> > have a ton of ideas for how the UI can be specifically optimized for that
> > purpose. That part is no problem, I've built a test app that plays the
> > stream using phonon and delivers buffer status updates and metadata and
> > such.
> >
> > However, one of the features I would really like to have and what would
> > really make this better for internet radio is the ability to seamlessly
> > pause and unpause streams. Right now, in a player like amarok, if you're
> > playing a stream and pause it for more than a few seconds, when you
> > unpause the stream it will reconnect and start playing from the current
> > position. What I want is for it to continue playing where you pressed
> > pause. So if you're listening to music and someone interrupts you, you
> > can hit pause, and then 5 minutes later hit resume and it continues where
> > you paused it. While it was paused the app continues to stream and
> > buffer (to memory or disk) the data.
>
> Like I was saying in #phonon, if you can make an QIoDevice (or some
> class like that) as the MediaSource. So your app could completely
> handle downloading the RadioParadise stream, could respond to pauses
> in an appropriate manner etc. There might be some gotchas in this
> approach, but it seems like it should work.
If it's a "simple" http stream, then this would really be the best approach.
Because then you're buffering the encoded data instead of the decoded audio
data which AudioDataOutput will provide. (Should be a factor of 10 and more
in memory needed for buffering.)
You probably want to use KIO for http... I recommend you create a subclass of
AbstreamMediaStream to feed the data to Phonon. As some guiding code you
could look into the kiomediastream in the KDE platform plugin. Your code will
be a lot easier because you don't have to care for seeking.
--
________________________________________________________
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: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20080207/57e6e079/attachment.sig>
-------------- next part --------------
_______________________________________________
kde-multimedia mailing list
kde-multimedia at kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia
More information about the kde-multimedia
mailing list