[mythtv] [Patch] CD Monitoring subsystem

J Donavan Stanley jdonavan at gorpe.com
Fri Nov 14 16:21:04 EST 2003


heh I certainly wouldn't do something quite that crude.  What I had
planned on doing was extending the plugin system so that plugins could
indicate that they handled certain types of media (note: not just CD /
DVDs since at some point I'd like to add support for flash card readers
etc).  Then the CDSubscriber object within the frontend could respond to
the mounted event and determine which plugin should be activated, in the
case of multiple plugins handling a given media type prompt the user for
which one should get it with an option to always use that plugin. I had
been operating under the assumption that just getting the user to the
main screen for a given plugin was sufficient, perhaps it needs to go a
bit deeper and given them specific options.

Since it would seem that there's no easy way to say "Stop whatever
you're doing an make this the active plugin" (I'm guessing here, I've
not yet looked that deep) and certainly not "stop what you're doing,
activate this plugin and take this specific action" I'm doing a bit of
research into ways to extend the plugin framework.  I've just downloaded
Yehia to see if it could be leveraged for a new more robust plugin
system for Myth. 


On Fri, 2003-11-14 at 06:03, Tako Schotanus wrote:
> It might very well be possible, but hard-coding a switch to another
> module like SwitchToMythMusic() seems.... icky :-)
> 
> And even then you'd still not be finished because switch to MythMusic
> won't automatically start playing your CD so you'd still need a way to
> tell the MythMusic module what you want it to do.
> 
> -Tako
> 
> > -----Original Message-----
> > From: mythtv-dev-bounces at mythtv.org 
> > [mailto:mythtv-dev-bounces at mythtv.org] On Behalf Of J Donavan Stanley
> > Sent: vrijdag 14 november 2003 1:20
> > To: Development of mythtv
> > Subject: Re: [mythtv] [Patch] CD Monitoring subsystem
> > 
> > 
> > Hrm I had hoped to discover there was some sort of facility to do a
> > quick context switch...  I take it that the only entry point 
> > for all the
> > plugins is via the main menu then?
> > 
> > 
> > On Thu, 2003-11-13 at 18:33, Tako Schotanus wrote:
> > > Yes, and that switching in itself is already a feature worth having
> > > because I would love to be able to just press a button on the remote
> > > and immediately switch to a different module. (If I want to 
> > play music
> > > I don't want to have to turn on my TV just to navigate the menus)
> > > 
> > > Had been thinking about putting it in, but I've been too busy with
> > > other things lately. So if you're going to do it I'll just sit back
> > > and wait :-)
> > > 
> > > My idea about it was that every plugin could have a list of 
> > "actions"
> > > it supports, like this:
> > > 
> > > MainMenu
> > >   - tv
> > >   - music
> > >   - movies
> > >   - weather
> > >   - dvd
> > >   - news
> > >   - exit
> > > 
> > > MythMusic
> > >   - play
> > >   - scan
> > >   - import
> > >   - mainmenu
> > > 
> > > MythDvd
> > >   - play
> > >   - rip
> > >   - mainmenu
> > > 
> > > etc.
> > > 
> > > Inserting a DVD could then issue the following sequence of commands:
> > >   - mainmenu
> > >   - dvd
> > >   - play
> > > en playback would start.
> > > 
> > > Of course plugins which have dialogs open at that moment 
> > will probably
> > > ignore the commands, other might first ask the user if they really
> > > want to switch. Dunno.
> > > 
> > > The good thing about this is that we could easily make a new socket
> > > that accepts these kinds of commands and have a way to externally
> > > control the frontend.
> > > 
> > > Just some silly ideas I had :-)
> > > 
> > > Cheers,
> > >  -Tako
> > > 
> > > 
> > > J Donavan Stanley wrote:
> > > > I'm in the process now of plugging it in to the frontend, 
> > in mount only
> > > > mode. That will give us the equivalent of running 
> > "autorun -mountonly".
> > > > Once that's in place I need to look at how to elegantly 
> > perform the
> > > > switches to the various plugins that need activated when media is
> > > > inserted.
> > > > 
> > > > 
> > > > On Thu, 2003-11-13 at 05:02, Tako Schotanus wrote:
> > > >   
> > > > > Perfect! I've wanted this option for a long time already! :-)
> > > > > 
> > > > > -Tako
> > > > > 
> > > > > J Donavan Stanley wrote:
> > > > >     
> > > > > > This patch modifies libmyth to add support for 
> > monitoring CDROM
> > > > > > devices.  It's based on the autorun application used 
> > by KDE. This is the
> > > > > > first of at least two patches, and lays the ground 
> > work for the
> > > > > > additional patches.  I plan on adding support for 
> > plugins to register
> > > > > > themselves for CD insert notification from the main 
> > application.  That
> > > > > > way when you stick in an audio CD Myth can switch to 
> > MythCD if it's
> > > > > > installed, likewise MythDVD.  Eventually I'd like to 
> > extend it out so
> > > > > > that when you pop in a data disk you get prompted 
> > with a menu that looks
> > > > > > something like this:
> > > > > > 
> > > > > > 	You've just inserted a data disk what would you 
> > like to do?
> > > > > > 	
> > ------------------------------------------------------------
> > > > > > 	Scan this disk for audio files to add to my collection.
> > > > > > 	Scan this disk for video files to add to my collection.
> > > > > > 	Scan this disk for images files to add to my collection.
> > > > > > 
> > > > > > I'd also like to look into some sort of autoplay 
> > feature where the
> > > > > > system could look for a specific file on the CD and 
> > take action based on
> > > > > > it.  For example, load a playlist and start playing 
> > music from the CD.
> > > > > > 	
> > > > > > 
> > > > > > 
> > > > > > Within the two new source files are three new classes:
> > > > > > 
> > > > > > Cdrom - An instance of a particular CDROM/DVD device.
> > > > > > CDMonitor - The object that knows how to poll the 
> > various CD devices and
> > > > > > keep track of their changes.
> > > > > > CDSubscriber - A base class for objects that wish to 
> > receive CDROM
> > > > > > notifications.
> > > > > > 
> > > > > > The code contains a couple small enhancements / bug 
> > fixes over the
> > > > > > autorun code it's based on such as properly sending out mount
> > > > > > notifications for data disks and the ability to 
> > detect DVD disks for
> > > > > > what they are instead of just calling them data disks.
> > > > > > 
> > > > > > J. Donavan Stanley
> > > > > >   
> > > > > > 
> > > > > > 
> > ____________________________________________________________________
> > > > > > _______________________________________________
> > > > > > mythtv-dev mailing list
> > > > > > mythtv-dev at mythtv.org
> > > > > > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
> > > > > >   
> > > > > >       
> > > > > 
> > > > > 
> > ______________________________________________________________________
> > > > > 
> > > > > _______________________________________________
> > > > > mythtv-dev mailing list
> > > > > mythtv-dev at mythtv.org
> > > > > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
> > > > >     
> > > > 
> > > >   
> > > > 
> > > > 
> > ____________________________________________________________________
> > > > _______________________________________________
> > > > mythtv-dev mailing list
> > > > mythtv-dev at mythtv.org
> > > > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
> > > >   
> > > 
> > > 
> > > 
> > ______________________________________________________________________
> > > 
> > > _______________________________________________
> > > mythtv-dev mailing list
> > > mythtv-dev at mythtv.org
> > > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
> > 
> > 
> 
> 
> ______________________________________________________________________
> 
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev



More information about the mythtv-dev mailing list