Re: [Rhythmbox-devel] iTunes Music Sharing



On Wed, Jul 06, 2005 at 04:56:04PM +1000, James Livingston wrote:
> On Wed, 2005-07-06 at 02:13 -0400, Charles Schmidt wrote:
> > 3. Modify the httpclientsrc implementation in bugzilla to have settable
> > properties for extra headers.  uris would be handed to RBPlayer in the
> > form of daap://.  RBPlayer would fudge them into http:// uris, force
> > playbin to use the new httpclientsrc, and add the extra headers to it.
> > 
> > Number 3 is probably the "best" solution:
> > 	It solves multiple problems. Namely: this one and adds a non-gnomevfs
> > http:// handler for GStreamer.   However, I believe it is the most
> > challenging, and does end up with some "hackish" code inside RBPlayer.
> 
> 
> I agree that (3) is the most "elegant" solution in that it doesn't put
> things in places where they don't really fit (i.e. gnome-vfs). As to
> having some "hackish" code to deal with setting the properties, etc -
> I'm going to need something virtually identical for audio cd support (to
> deal with non-/dev/cdrom devices).

OK, so, for some source types, we require additional information that
can't (or shouldn't) be encoded in the URI.  This information is the
same for all 'songs' with the same RhythmDBEntryType, right?
That is, there's a different RhythmDBEntryType for each audio CD, for
each DAAP share, and so on, and the extra information required to play
songs of each type is the same for all songs of that type.

So, what I propose is that when you register a RhythmDBEntryType for
your source, you also create a new RBPlayer subclass (RBCDAudioPlayer,
RBDAAPPlayer, etc.) and associate it with that entry type.  These
subclasses store the information required to play songs of their
type, and know how to manipulate GStreamer to make use of it.
They'd all share a playbin element, but that's just an implementation detail.

Since the RBPlayer subclass is shared across all songs from the
same source, it can also take care of things like the DAAP request
number, and we only have one copy of the various HTTP headers etc.

-jonathan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]