[mythtv] CD/DVD/Writer Detection and Idea

Matthew Wire devel at mrwire.co.uk
Fri May 26 18:00:27 UTC 2006


Mythmusic is unable to detect my CD-Writer.  On further investigation it
seems that there is a problem with cdrecord (version Cdrecord-Clone
2.01.01a01 as shipped with ubuntu dapper).  Basically it refuses to
detect any cd drives whether run as root or a normal user.

I've been thinking how this could be solved and then it occurred to me
that mythtv currently has numerous locations for specifying cd/dvd
devices etc. (Eg. Mythmusic, MythDVD).

So, I've done a little research and it appears that all cd devices are
listed in /proc/sys/dev/cdrom/info with the device name and capabilities
for that drive (ie. whether it can read DVD's, write cd's etc).
The model name can be obtained here /proc/ide/hd*/model (for IDE
devices).  I also notice that mythmediamonitor
uses /proc/sys/dev/cdrom/info to detect cd drives.

What I am suggesting is that some sort of cd detection class is created
that can be used for all detection needs.  It would need methods such as
getCDDriveList, isCD, isDVD, isCDWriter, isDVDWriter (or similar).  This
would make cd device selection much simpler in my opinion and the user
would not have to deal with device names.
For IDE devices, device names can be mapped to the description
in /proc/ide/hd*/model.  There must be a similar method for scsi, usb
Not sure how/if this would want integration with mythmediamonitor or
Not sure if USB/Firewire cd devices would show up
in /proc/sys/dev/cdrom/info?
Also, not sure where this would want to be implemented as yet, though if
I read the developer docs a little better I should be able to get a
better idea - any help welcome though!

Please note that I am quite happy to code this myself, but I want to
throw it into the open first to get some opinions and ideas.

Matthew Wire

More information about the mythtv-dev mailing list