[mythtv] Media monitoring few questions

Denys Dmytriyenko denis at denix.org
Sun Mar 7 21:25:17 EST 2004


Xavier Hervy wrote:
> I actually work around the possibility to play a cd / dvd of data in 
> mythvideo.
> For that I just add a node in the tree (videotree) to allow user to 
> select a file from a cd / dvd rom.
> 
> But I have few problems with mediamonitoring.
> When I insert o cd data in my mythbox, it open directy videotree and i 
> can browse my cd. this cd is mounted by mediamonitoring but never 
> unmount. It will be good if cd is unmount when i leave videotree.
> 
> What is the best way to do this ?
> 
> Is it possible to intercept a signal when the user press the eject 
> button of the cd /dvd device ?

I've been playing with mythvideo to solve this problem for some time 
now. Here are my findings:

1. It is possible just to have a symbolic link to your cdrom mounting 
point in the directory your video files are. When videotree starts and 
builds a tree of video files, it scans that directory and adds all files 
on CD if it is mounted.
2. If you don't use supermount to mount your CDs, mythfrontend has to be 
suid root. The reason is, that kernel cdrom driver only allows root to 
unlock the tray, if it's mounted. That's why you cannot open the tray if 
it is mounted. Doing "chmod +s mythfrontend" solves this. But it may be 
a security risk to run it as root.
3. If you use supermount, it is possible to open/close the tray at any 
time you want and a drive stays mounted all the time. Myth's media 
monitor supports supermount with iso9660 filesystem only, but this is 
not the problem. The real problem I've encountered is that it takes 34 
seconds (!) to access /mnt/cdrom mount point if there is no disc in the 
drive. Otherwise accessing /mnt/cdrom takes no time and reflects the 
content of the current disc - i.e. no mount/umount necessary!

If I'm able to resolve this issue with supermount, it only takes a 
little modification to rebuild a videotree when new disc is inserted and 
everything else is already taken care of!


More information about the mythtv-dev mailing list