extragear/multimedia/amarok/src/servicebrowser/shoutcast

Maximilian Kossick maximilian.kossick at googlemail.com
Mon Sep 10 12:57:23 CEST 2007


I am assuming that a .pls file is a playlist file which contains multiple
urls for the stream.
The Amarok 1.x behaviour to show multiple tracks in the playlist on loading
a pls file for a stream
is a bit ugly imo. We might be able to create MetaStream instance from a pls
file directly, which could
then select the stream to play internally, although i'm not quite sure how
do that yet.
maybe we could add a special case in the enginecontroller which would then
try to play the other stream urls if the engine fails to play the first one,
although i'm not really happy with that solution.

I agree it' not an issue now, because we can't load pls playlists yet, but
when we implement that, we have to retrieve the new metadata for the stream
from the engine periodically. only MetaStream does that at the moment, and i
don't think we need that capability in any other class. Does it make sense
to change the service infrastrructure so that it's able to handle
Meta::Track instances which are not ServiceTracks?

Max

On 9/10/07, Nikolaj Hald Nielsen <nhnfreespirit at gmail.com> wrote:
>
> Right now I am not sure this is even an issue, as the streams are in
> the form of a .pls file that the playlist currently cannot even
> accept. Will the playlist loader not take care of this conversion?
>
> On 9/10/07, Maximilian Kossick <maximilian.kossick at googlemail.com> wrote:
> > Nikolaj, I just noticed: because the shoutcast service operates on radio
> > streams instead of streams of a single track, you should use
> > the stream classes provided in meta/stream instead of your ServieTrack
> > classes. MetaStream updates itself whenever the engine provides new
> metadata
> > for the stream.
> >
> >
> > On 9/10/07, Nikolaj Hald Nielsen <nhnFreespirit at gmail.com> wrote:
> > > SVN commit 710526 by nhnielsen:
> > >
> > > base ShoutcastServiceQueryMaker on the new DynamicServiceQueryMaker
> class
> > >
> > > M  +1 -1      ShoutcastServiceQueryMaker.cpp
> > > M  +7 -42     ShoutcastServiceQueryMaker.h
> > >
> > >
> > > ---
> >
> trunk/extragear/multimedia/amarok/src/servicebrowser/shoutcast/ShoutcastServiceQueryMaker.cpp
> > #710525:710526
> > > @@ -42,7 +42,7 @@
> > >
> > >
> > > ShoutcastServiceQueryMaker::ShoutcastServiceQueryMaker(
> > ShoutcastServiceCollection * collection )
> > > - : QueryMaker()
> > > + : DynamicServiceQueryMaker()
> > >   , m_storedTransferJob( 0 )
> > >   , d( new Private )
> > >
> > > ---
> >
> trunk/extragear/multimedia/amarok/src/servicebrowser/shoutcast/ShoutcastServiceQueryMaker.h
> > #710525:710526
> > > @@ -17,10 +17,10 @@
> > >   *   51 Franklin Street, Fifth Floor, Boston, MA  02111-1307, USA.
> >  *
> > >
> >
> ***************************************************************************/
> > >
> > > -#ifndef DYNAMICSERVICEQUERYMAKER_H
> > > -#define DYNAMICSERVICEQUERYMAKER_H
> > > +#ifndef SHOUTCASTSERVICEQUERYMAKER_H
> > > +#define SHOUTCASTSERVICEQUERYMAKER_H
> > >
> > > -#include "QueryMaker.h"
> > > +#include "DynamicServiceQueryMaker.h"
> > >
> > > #include "meta.h"
> > >
> > > @@ -39,7 +39,7 @@
> > >
> > >         @author
> > > */
> > > -class ShoutcastServiceQueryMaker : public QueryMaker
> > > +class ShoutcastServiceQueryMaker : public DynamicServiceQueryMaker
> > > {
> > > Q_OBJECT
> > > public:
> > > @@ -53,9 +53,11 @@
> > >      virtual QueryMaker* startTrackQuery();
> > >      virtual QueryMaker* startGenreQuery();
> > >
> > > -
> > >      virtual QueryMaker* addMatch ( const Meta::GenrePtr &genre );
> > > +    virtual QueryMaker* addMatch ( const Meta::DataPtr &data );
> > >
> > > +    virtual QueryMaker* returnResultAsDataPtrs ( bool
> resultAsDataPtrs );
> > > +
> > >      //Methods "borrowed" from MemoryQueryMaker
> > >      void runQuery();
> > >      void handleResult();
> > > @@ -65,43 +67,6 @@
> > >      void fetchGenres();
> > >
> > >
> > > -
> > > -    //currently unimplemented stuff:
> > > -
> > > -    //as this particular QueryMaker ronly knows about genres and
> tracks,
> > all the other stuuf is kinda overkill!!
> > > -
> > > -    virtual QueryMaker* startComposerQuery() { return this; }
> > > -
> > > -    virtual QueryMaker* startArtistQuery() { return this; }
> > > -    virtual QueryMaker* startAlbumQuery() { return this; }
> > > -    virtual QueryMaker* startYearQuery() { return this; }
> > > -    virtual QueryMaker* startCustomQuery() { return this; }
> > > -
> > > -    virtual QueryMaker* returnResultAsDataPtrs ( bool
> resultAsDataPtrs );
> > > -    virtual QueryMaker* addReturnValue ( qint64 value ) { return
> this; }
> > > -    virtual QueryMaker* orderBy ( qint64 value, bool descending =
> false )
> > { return this; }
> > > -
> > > -    virtual QueryMaker* includeCollection ( const QString
> &collectionId )
> > { return this; }
> > > -    virtual QueryMaker* excludeCollection ( const QString
> &collectionId )
> >  { return this; }
> > > -
> > > -
> > > -    virtual QueryMaker* addMatch ( const Meta::TrackPtr &track ) {
> return
> > this; }
> > > -    virtual QueryMaker* addMatch ( const Meta::ArtistPtr &artist ) {
> > return this; }
> > > -    virtual QueryMaker* addMatch ( const Meta::AlbumPtr &album ) {
> return
> > this; }
> > > -    virtual QueryMaker* addMatch ( const Meta::ComposerPtr &composer
> ) {
> > return this; }
> > > -    virtual QueryMaker* addMatch ( const Meta::YearPtr &year ) {
> return
> > this; }
> > > -    virtual QueryMaker* addMatch ( const Meta::DataPtr &data );
> > > -
> > > -    virtual QueryMaker* addFilter ( qint64 value, const QString
> &filter,
> > bool matchBegin, bool matchEnd ) { return this; }
> > > -    virtual QueryMaker* excludeFilter ( qint64 value, const QString
> > &filter, bool matchBegin, bool matchEnd ) { return this; }
> > > -
> > > -    virtual QueryMaker* limitMaxResultSize ( int size ) { return
> this; }
> > > -
> > > -    virtual QueryMaker* beginAnd() { return this; }
> > > -    virtual QueryMaker* beginOr() { return this; }
> > > -    virtual QueryMaker* endAndOr() { return this; }
> > > -
> > > -
> > > signals:
> > >      void dynamicQueryComplete();
> > >
> > >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/amarok-devel/attachments/20070910/f805f252/attachment.html 


More information about the Amarok-devel mailing list