Re: [Rhythmbox-devel] iTunes Music Sharing



On Thu, 2005-07-07 at 09:43 +1000, Jonathan Matthew wrote:
> 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).
>
> 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.

This seems like a pretty good idea to me, but I'm not familiar with the
RBPlayer workings.  How much of the code would you suggest be subclassed
to RBCDAudioPlayer & RBDAAPPlayer?  Just _open & _close that would set
up/tear down the necessary gstreamer stuff?

I can see this being a pretty good idea.  However, currently, there is
just one RBPlayer instance for all of RB.  If we subclassed it, whenever
a song is played would a new RBPlayer (or subclass) instance have to be
created?  Or cache an instance of each kind as it is used for use later?

What do other people think about this idea?

-charlie


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