[vlc-devel] vlc and libcdio - preliminary results
rocky at panix.com
rocky at panix.com
Mon May 26 06:00:34 CEST 2003
I've been curious at how difficult it would be to get the Video CD
support that I have in my xine plugin into vlc. (The xine "vcdx"
plugin supports playback control, still frames and even has some Nero
disk image reading, although this last is pretty flaky.)
So as a first step, I tried today including the CD reading routines
from libcdio. Overall I am impressed at how simple and clean the vlc
code is. I am also impressed at how easy it was to just pare down
cdrom.c and cdrom.h and replace large chunks of code (for disk image
reading and OS-specific code) with a single call.
cdrom.c went from something like 1218 lines to 151 lines, and the
other files reduced in complexity and size as well, although not as
Admittedly the lines removed are somewhere else - in particular in
libcdio - and right now libcdio doesn't support OSX or MSC CD reading,
but that just lets one focus on the vlc things in vlc and CD reading
stuff somewhere else. libcdio can be separately tested and comes with
And should one want to write a CD-DA module (as I have for xine), the
support for the reading part is already in libcdio; there is a lot
of common code that would get reused.
For the curious, at the end is entire tarball for the vcd directory
(only 6.5K compressed). To compile you need to install libcdio:
I added -lcdio to the LD_LIBS flags for vcd.
More interesting would be to put vcdimager routines in vcd.c and
replace some of that code. Here, I don't think the difference is going
to be as dramatic as much because although some things will get
replaced there is probably a bit of additional code in adding
navigation and still-frame handling that just isn't currently there.
But for right now, I'm curious as to what interest there is in this...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 180 bytes
Desc: complete access/vcd replacement directory
More information about the vlc-devel