[mythtv] [Patch] CD Monitoring subsystem

J Donavan Stanley jdonavan at gorpe.com
Wed Nov 12 17:00:52 EST 2003


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cdmon.tar.gz
Type: application/x-gzip
Size: 6867 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20031112/aa2cd1b0/cdmon.tar.bin


More information about the mythtv-dev mailing list