[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xine-devel
Subject:    [xine-devel] common eject function and CD input and control library (Was Re: patch for input_dvd.c)
From:       "R. Bernstein" <rocky () panix ! com>
Date:       2003-03-28 6:19:35
[Download RAW message or body]

 > On 26 Mar 2003, Bastien Nocera wrote:
 > 
 > > On Mon, 2003-03-03 at 19:05, Joseph K Shraibman wrote:
 > > > On Mon, 3 Mar 2003, Michael Roitzsch wrote:
 > > > >
 > > > > > This takes care of my eject problem.
 > > > >
 > > > When I was hitting the eject button I was getting:
 > > > umount: /dev/dvd is not mounted (according to mtab)
 > > >
 > > > because /dev/dvd was a symlink to cdrom, which was in fstab (and mtab).
 > > > So this patch traverses the symlink chain until it finds the entry in
 > > > mtab.
 > > >
 > > > New diff generated with -u  is up at
 > > > http://www.akula.com/~jks/input_dvd.c.diff2
 > > >
 > > > Incidentally I've discovered that eject only works if the umount works; if
 > > > the dvd was never mounted I still can't eject.  Maybe I'll fix that next
 > > > weekend.
 > >
 > > Would it be possible to move all these umount/eject utility function to
 > > a separate file, it could really be of use by the CDDA and the VCD input
 > > plugins as well.
 > >
 > 

Interesting someone else should notice and suggest trying to share
common code in the CDDA, VCD and DVD plugins. I am currently working
on a CD Input and control library ("control" = eject for example) that
could be shared at least by the CDDA and VCD plugins of xine but can
be used other places as well. 

The Savannah project page is here: 
   http://savannah.nongnu.org/projects/libcdio/

But right now all though I have something minimally working I haven't
released any file packages. (Which reminds me xine-vcdx-1-beta9 is
ready to be released whenever someone can do a file release will handle.
release candidate can be found at ftp://users/r/rocky/xine-vcdx-1-beta9.tar.gz)

Anway back to the CD Input and Control Library. There is just what is
there in CVS:

   http://savannah.nongnu.org/cgi-bin/viewcvs/libcdio/libcdio/

One immediate place this library will be used is in VCDImager
(http://vcdimager.org) although that suite of programs has no need for
the "eject" function which is part of the library. 

 > I didn't write the whole umount/eject utility, I just wrote a patch to
 > follow the symlinks.  I personally don't care where it is put.

Okay, fair enough. But do you want to cut and paste this in 3 places
or write once and use anywhere. As a developer, the resuable software
thing is a win. It not only shortens code (since you have one copy of
this rather than 3), but when improvements are made you only have to
change one place rather than 3 and either it's right everywhere or
it's wrong everywhere which means if there's a bug you'll probably
find it sooner.

- - - 

Lastly, an open call for extending this library.  

I'm looking to extend this to FreeBSD and other platforms (OSX 10?
HP/UX, AIX, ...) and other modes of reading, (generic SCSI for
example, more thorough Nero Disk Image support).  Right now this
library has code for Linux (Linux ioctl and encapsulated SCSI),
Solaris (ATAPI and SCSI) and BSDI.

Anyone who is willing to help let me know...


-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
xine-devel mailing list
xine-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic