vdr/xine-lib-vdr/src/input/vcd/libvcd/libvcd Makefile.am Makefile.in files.h files_private.h inf.h info.h logging.h sector.h types.h version.h

Darren Salt pkg-vdr-dvb-changes@lists.alioth.debian.org
Mon, 04 Apr 2005 22:29:47 +0000


Update of /cvsroot/pkg-vdr-dvb/vdr/xine-lib-vdr/src/input/vcd/libvcd/libvcd
In directory haydn:/tmp/cvs-serv2129/src/input/vcd/libvcd/libvcd

Added Files:
	Makefile.am Makefile.in files.h files_private.h inf.h info.h 
	logging.h sector.h types.h version.h 
Log Message:
Import of VDR-patched xine-lib.

--- NEW FILE: Makefile.in ---
# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@

# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004  Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../../../../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
	$(srcdir)/Makefile.in $(top_srcdir)/misc/Makefile.common
subdir = src/input/vcd/libvcd/libvcd
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/_xine.m4 $(top_srcdir)/m4/aa.m4 \
	$(top_srcdir)/m4/alsa.m4 $(top_srcdir)/m4/arts.m4 \
	$(top_srcdir)/m4/as.m4 $(top_srcdir)/m4/caca.m4 \
	$(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/directx.m4 \
	$(top_srcdir)/m4/dl.m4 $(top_srcdir)/m4/dvdnav.m4 \
	$(top_srcdir)/m4/esd.m4 $(top_srcdir)/m4/ffmpeg.m4 \
	$(top_srcdir)/m4/freetype2.m4 $(top_srcdir)/m4/gettext.m4 \
	$(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \
	$(top_srcdir)/m4/irixal.m4 $(top_srcdir)/m4/lcmessage.m4 \
	$(top_srcdir)/m4/libFLAC.m4 $(top_srcdir)/m4/libfame.m4 \
	$(top_srcdir)/m4/ogg.m4 $(top_srcdir)/m4/opengl.m4 \
	$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/progtest.m4 \
	$(top_srcdir)/m4/sdl.m4 $(top_srcdir)/m4/speex.m4 \
	$(top_srcdir)/m4/theora.m4 $(top_srcdir)/m4/vorbis.m4 \
	$(top_srcdir)/m4/xv.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
AAINFO = @AAINFO@
AALIB_CFLAGS = @AALIB_CFLAGS@
AALIB_CONFIG = @AALIB_CONFIG@
AALIB_LIBS = @AALIB_LIBS@
ACLOCAL = @ACLOCAL@
ACLOCAL_DIR = @ACLOCAL_DIR@
ALLOCA = @ALLOCA@
ALSA_CFLAGS = @ALSA_CFLAGS@
ALSA_LIBS = @ALSA_LIBS@
ALSA_STATIC_LIB = @ALSA_STATIC_LIB@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
ARTS_CFLAGS = @ARTS_CFLAGS@
ARTS_CONFIG = @ARTS_CONFIG@
ARTS_LIBS = @ARTS_LIBS@
AS = @AS@
ASFLAGS = @ASFLAGS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_ASF_FALSE = @BUILD_ASF_FALSE@
BUILD_ASF_TRUE = @BUILD_ASF_TRUE@
BUILD_DHA_KMOD_FALSE = @BUILD_DHA_KMOD_FALSE@
BUILD_DHA_KMOD_TRUE = @BUILD_DHA_KMOD_TRUE@
BUILD_FAAD_FALSE = @BUILD_FAAD_FALSE@
BUILD_FAAD_TRUE = @BUILD_FAAD_TRUE@
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CACA_CFLAGS = @CACA_CFLAGS@
CACA_CONFIG = @CACA_CONFIG@
CACA_LIBS = @CACA_LIBS@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCAS = @CCAS@
CCASCOMPILE = @CCASCOMPILE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEFS = @DEFS@
DEPCOMP = @DEPCOMP@
DEPDIR = @DEPDIR@
DEPMOD = @DEPMOD@
DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
DIRECTFB_LIBS = @DIRECTFB_LIBS@
DIRECTX_AUDIO_LIBS = @DIRECTX_AUDIO_LIBS@
DIRECTX_CPPFLAGS = @DIRECTX_CPPFLAGS@
DIRECTX_VIDEO_LIBS = @DIRECTX_VIDEO_LIBS@
DLLTOOL = @DLLTOOL@
DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
DVDNAV_CONFIG = @DVDNAV_CONFIG@
DVDNAV_LIBS = @DVDNAV_LIBS@
DYNAMIC_LD_LIBS = @DYNAMIC_LD_LIBS@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_VCD_FALSE = @ENABLE_VCD_FALSE@
ENABLE_VCD_TRUE = @ENABLE_VCD_TRUE@
ESD_CFLAGS = @ESD_CFLAGS@
ESD_CONFIG = @ESD_CONFIG@
ESD_LIBS = @ESD_LIBS@
EXEEXT = @EXEEXT@
EXTRA_X_CFLAGS = @EXTRA_X_CFLAGS@
EXTRA_X_LIBS = @EXTRA_X_LIBS@
F77 = @F77@
FFLAGS = @FFLAGS@
FFMPEG_CPPFLAGS = @FFMPEG_CPPFLAGS@
FFMPEG_LIBS = @FFMPEG_LIBS@
FIG2DEV = @FIG2DEV@
FREETYPE_CONFIG = @FREETYPE_CONFIG@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_LIBS = @FT2_LIBS@
GENCAT = @GENCAT@
GLIBC21 = @GLIBC21@
GLUT_LIBS = @GLUT_LIBS@
GLU_LIBS = @GLU_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNOME_VFS_CFLAGS = @GNOME_VFS_CFLAGS@
GNOME_VFS_LIBS = @GNOME_VFS_LIBS@
GOOM_LIBS = @GOOM_LIBS@
HAVE_AA_FALSE = @HAVE_AA_FALSE@
HAVE_AA_TRUE = @HAVE_AA_TRUE@
HAVE_ALSA09_FALSE = @HAVE_ALSA09_FALSE@
HAVE_ALSA09_TRUE = @HAVE_ALSA09_TRUE@
HAVE_ALSA_FALSE = @HAVE_ALSA_FALSE@
HAVE_ALSA_TRUE = @HAVE_ALSA_TRUE@
HAVE_ARMV4L_FALSE = @HAVE_ARMV4L_FALSE@
HAVE_ARMV4L_TRUE = @HAVE_ARMV4L_TRUE@
HAVE_ARTS_FALSE = @HAVE_ARTS_FALSE@
HAVE_ARTS_TRUE = @HAVE_ARTS_TRUE@
HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@
HAVE_CACA_FALSE = @HAVE_CACA_FALSE@
HAVE_CACA_TRUE = @HAVE_CACA_TRUE@
HAVE_CDROM_IOCTLS_FALSE = @HAVE_CDROM_IOCTLS_FALSE@
HAVE_CDROM_IOCTLS_TRUE = @HAVE_CDROM_IOCTLS_TRUE@
HAVE_COREAUDIO_FALSE = @HAVE_COREAUDIO_FALSE@
HAVE_COREAUDIO_TRUE = @HAVE_COREAUDIO_TRUE@
HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@
HAVE_DIRECTFB_FALSE = @HAVE_DIRECTFB_FALSE@
HAVE_DIRECTFB_TRUE = @HAVE_DIRECTFB_TRUE@
HAVE_DIRECTX_FALSE = @HAVE_DIRECTX_FALSE@
HAVE_DIRECTX_TRUE = @HAVE_DIRECTX_TRUE@
HAVE_DVDNAV_FALSE = @HAVE_DVDNAV_FALSE@
HAVE_DVDNAV_TRUE = @HAVE_DVDNAV_TRUE@
HAVE_DXR3_FALSE = @HAVE_DXR3_FALSE@
HAVE_DXR3_TRUE = @HAVE_DXR3_TRUE@
HAVE_ESD_FALSE = @HAVE_ESD_FALSE@
HAVE_ESD_TRUE = @HAVE_ESD_TRUE@
HAVE_FB_FALSE = @HAVE_FB_FALSE@
HAVE_FB_TRUE = @HAVE_FB_TRUE@
HAVE_FFMMX_FALSE = @HAVE_FFMMX_FALSE@
HAVE_FFMMX_TRUE = @HAVE_FFMMX_TRUE@
HAVE_FFMPEG_FALSE = @HAVE_FFMPEG_FALSE@
HAVE_FFMPEG_TRUE = @HAVE_FFMPEG_TRUE@
HAVE_FIG2DEV_FALSE = @HAVE_FIG2DEV_FALSE@
HAVE_FIG2DEV_TRUE = @HAVE_FIG2DEV_TRUE@
HAVE_FLAC_FALSE = @HAVE_FLAC_FALSE@
HAVE_FLAC_TRUE = @HAVE_FLAC_TRUE@
HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@
HAVE_GNOME_VFS_FALSE = @HAVE_GNOME_VFS_FALSE@
HAVE_GNOME_VFS_TRUE = @HAVE_GNOME_VFS_TRUE@
HAVE_IRIXAL_FALSE = @HAVE_IRIXAL_FALSE@
HAVE_IRIXAL_TRUE = @HAVE_IRIXAL_TRUE@
HAVE_LIBFAME_FALSE = @HAVE_LIBFAME_FALSE@
HAVE_LIBFAME_TRUE = @HAVE_LIBFAME_TRUE@
HAVE_LIBMNG_FALSE = @HAVE_LIBMNG_FALSE@
HAVE_LIBMNG_TRUE = @HAVE_LIBMNG_TRUE@
HAVE_LIBPNG_FALSE = @HAVE_LIBPNG_FALSE@
HAVE_LIBPNG_TRUE = @HAVE_LIBPNG_TRUE@
HAVE_LIBRTE_FALSE = @HAVE_LIBRTE_FALSE@
HAVE_LIBRTE_TRUE = @HAVE_LIBRTE_TRUE@
HAVE_LIBSMBCLIENT_FALSE = @HAVE_LIBSMBCLIENT_FALSE@
HAVE_LIBSMBCLIENT_TRUE = @HAVE_LIBSMBCLIENT_TRUE@
HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@
HAVE_LINUX_FALSE = @HAVE_LINUX_FALSE@
HAVE_LINUX_TRUE = @HAVE_LINUX_TRUE@
HAVE_MACOSX_VIDEO_FALSE = @HAVE_MACOSX_VIDEO_FALSE@
HAVE_MACOSX_VIDEO_TRUE = @HAVE_MACOSX_VIDEO_TRUE@
HAVE_MLIB_FALSE = @HAVE_MLIB_FALSE@
HAVE_MLIB_TRUE = @HAVE_MLIB_TRUE@
HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
HAVE_OSS_FALSE = @HAVE_OSS_FALSE@
HAVE_OSS_TRUE = @HAVE_OSS_TRUE@
HAVE_POLYPAUDIO_FALSE = @HAVE_POLYPAUDIO_FALSE@
HAVE_POLYPAUDIO_TRUE = @HAVE_POLYPAUDIO_TRUE@
HAVE_SDL_FALSE = @HAVE_SDL_FALSE@
HAVE_SDL_TRUE = @HAVE_SDL_TRUE@
HAVE_SGMLTOOLS_FALSE = @HAVE_SGMLTOOLS_FALSE@
HAVE_SGMLTOOLS_TRUE = @HAVE_SGMLTOOLS_TRUE@
HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@
HAVE_SPEEX_FALSE = @HAVE_SPEEX_FALSE@
HAVE_SPEEX_TRUE = @HAVE_SPEEX_TRUE@
HAVE_STK_FALSE = @HAVE_STK_FALSE@
HAVE_STK_TRUE = @HAVE_STK_TRUE@
HAVE_SUNAUDIO_FALSE = @HAVE_SUNAUDIO_FALSE@
HAVE_SUNAUDIO_TRUE = @HAVE_SUNAUDIO_TRUE@
HAVE_SUNDGA_FALSE = @HAVE_SUNDGA_FALSE@
HAVE_SUNDGA_TRUE = @HAVE_SUNDGA_TRUE@
HAVE_SUNFB_FALSE = @HAVE_SUNFB_FALSE@
HAVE_SUNFB_TRUE = @HAVE_SUNFB_TRUE@
HAVE_SYNCFB_FALSE = @HAVE_SYNCFB_FALSE@
HAVE_SYNCFB_TRUE = @HAVE_SYNCFB_TRUE@
HAVE_THEORA_FALSE = @HAVE_THEORA_FALSE@
HAVE_THEORA_TRUE = @HAVE_THEORA_TRUE@
HAVE_V4L_FALSE = @HAVE_V4L_FALSE@
HAVE_V4L_TRUE = @HAVE_V4L_TRUE@
HAVE_VCDNAV_FALSE = @HAVE_VCDNAV_FALSE@
HAVE_VCDNAV_TRUE = @HAVE_VCDNAV_TRUE@
HAVE_VIDIX_FALSE = @HAVE_VIDIX_FALSE@
HAVE_VIDIX_TRUE = @HAVE_VIDIX_TRUE@
HAVE_VLDXVMC_FALSE = @HAVE_VLDXVMC_FALSE@
HAVE_VLDXVMC_TRUE = @HAVE_VLDXVMC_TRUE@
HAVE_VORBIS_FALSE = @HAVE_VORBIS_FALSE@
HAVE_VORBIS_TRUE = @HAVE_VORBIS_TRUE@
HAVE_W32DLL_FALSE = @HAVE_W32DLL_FALSE@
HAVE_W32DLL_TRUE = @HAVE_W32DLL_TRUE@
HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@
HAVE_X11_FALSE = @HAVE_X11_FALSE@
HAVE_X11_TRUE = @HAVE_X11_TRUE@
HAVE_XVMC_FALSE = @HAVE_XVMC_FALSE@
HAVE_XVMC_TRUE = @HAVE_XVMC_TRUE@
HAVE_XV_FALSE = @HAVE_XV_FALSE@
HAVE_XV_TRUE = @HAVE_XV_TRUE@
HAVE_XXMC_FALSE = @HAVE_XXMC_FALSE@
HAVE_XXMC_TRUE = @HAVE_XXMC_TRUE@
HAVE_ZLIB_FALSE = @HAVE_ZLIB_FALSE@
HAVE_ZLIB_TRUE = @HAVE_ZLIB_TRUE@
HOST_OS_DARWIN_FALSE = @HOST_OS_DARWIN_FALSE@
HOST_OS_DARWIN_TRUE = @HOST_OS_DARWIN_TRUE@
INCLUDED_INTL_FALSE = @INCLUDED_INTL_FALSE@
INCLUDED_INTL_TRUE = @INCLUDED_INTL_TRUE@
INCLUDES = @INCLUDES@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_M4_FALSE = @INSTALL_M4_FALSE@
INSTALL_M4_TRUE = @INSTALL_M4_TRUE@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLBISON = @INTLBISON@
INTLDIR = @INTLDIR@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
IRIXAL_CFLAGS = @IRIXAL_CFLAGS@
IRIXAL_LIBS = @IRIXAL_LIBS@
IRIXAL_STATIC_LIB = @IRIXAL_STATIC_LIB@
KSTAT_LIBS = @KSTAT_LIBS@
LDFLAGS = @LDFLAGS@
LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@
LIBCDIO_LIBS = @LIBCDIO_LIBS@
LIBFAME_CFLAGS = @LIBFAME_CFLAGS@
LIBFAME_CONFIG = @LIBFAME_CONFIG@
LIBFAME_LIBS = @LIBFAME_LIBS@
LIBFFMPEG_CFLAGS = @LIBFFMPEG_CFLAGS@
LIBFLAC_CFLAGS = @LIBFLAC_CFLAGS@
LIBFLAC_LIBS = @LIBFLAC_LIBS@
LIBICONV = @LIBICONV@
LIBISO9660_LIBS = @LIBISO9660_LIBS@
LIBMODPLUG_CFLAGS = @LIBMODPLUG_CFLAGS@
LIBMODPLUG_LIBS = @LIBMODPLUG_LIBS@
LIBMPEG2_CFLAGS = @LIBMPEG2_CFLAGS@
LIBNAME = @LIBNAME@
LIBOBJS = @LIBOBJS@
LIBPNG_CONFIG = @LIBPNG_CONFIG@
LIBS = @LIBS@
LIBSMBCLIENT_LIBS = @LIBSMBCLIENT_LIBS@
LIBSTK_CFLAGS = @LIBSTK_CFLAGS@
LIBSTK_LIBS = @LIBSTK_LIBS@
LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIBVCDINFO_LIBS = @LIBVCDINFO_LIBS@
LIBVCD_CFLAGS = @LIBVCD_CFLAGS@
LIBVCD_LIBS = @LIBVCD_LIBS@
LIBVCD_SYSDEP = @LIBVCD_SYSDEP@
LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@
LINUX_INCLUDE = @LINUX_INCLUDE@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_REVISION = @LT_REVISION@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MKNOD = @MKNOD@
MLIB_CFLAGS = @MLIB_CFLAGS@
MLIB_LIBS = @MLIB_LIBS@
MNG_LIBS = @MNG_LIBS@
MSGFMT = @MSGFMT@
NET_LIBS = @NET_LIBS@
OBJC = @OBJC@
OBJCDEPMODE = @OBJCDEPMODE@
OBJCFLAGS = @OBJCFLAGS@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OGG_CFLAGS = @OGG_CFLAGS@
OGG_LIBS = @OGG_LIBS@
OPENGL_CFLAGS = @OPENGL_CFLAGS@
OPENGL_LIBS = @OPENGL_LIBS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PASS1_CFLAGS = @PASS1_CFLAGS@
PASS2_CFLAGS = @PASS2_CFLAGS@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PNG_CFLAGS = @PNG_CFLAGS@
PNG_LIBS = @PNG_LIBS@
POFILES = @POFILES@
POLYPAUDIO_CFLAGS = @POLYPAUDIO_CFLAGS@
POLYPAUDIO_LIBS = @POLYPAUDIO_LIBS@
POSUB = @POSUB@
PPC_ARCH_FALSE = @PPC_ARCH_FALSE@
PPC_ARCH_TRUE = @PPC_ARCH_TRUE@
RANLIB = @RANLIB@
RT_LIBS = @RT_LIBS@
SDL_CFLAGS = @SDL_CFLAGS@
SDL_CONFIG = @SDL_CONFIG@
SDL_LIBS = @SDL_LIBS@
SET_MAKE = @SET_MAKE@
SGMLTOOLS = @SGMLTOOLS@
SHELL = @SHELL@
SPEC_VERSION = @SPEC_VERSION@
SPEEX_CFLAGS = @SPEEX_CFLAGS@
SPEEX_LIBS = @SPEEX_LIBS@
STATIC = @STATIC@
STRIP = @STRIP@
SUNDGA_CFLAGS = @SUNDGA_CFLAGS@
SUNDGA_LIBS = @SUNDGA_LIBS@
TAR_NAME = @TAR_NAME@
THEORAENC_LIBS = @THEORAENC_LIBS@
THEORAFILE_LIBS = @THEORAFILE_LIBS@
THEORA_CFLAGS = @THEORA_CFLAGS@
THEORA_LIBS = @THEORA_LIBS@
THREAD_CFLAGS = @THREAD_CFLAGS@
THREAD_CFLAGS_CONFIG = @THREAD_CFLAGS_CONFIG@
THREAD_INCLUDES = @THREAD_INCLUDES@
THREAD_LIBS = @THREAD_LIBS@
THREAD_LIBS_CONFIG = @THREAD_LIBS_CONFIG@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
VORBISENC_LIBS = @VORBISENC_LIBS@
VORBISFILE_LIBS = @VORBISFILE_LIBS@
VORBIS_CFLAGS = @VORBIS_CFLAGS@
VORBIS_LIBS = @VORBIS_LIBS@
W32DLL_DEP = @W32DLL_DEP@
W32_NO_OPTIMIZE = @W32_NO_OPTIMIZE@
WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
WIN32_FALSE = @WIN32_FALSE@
WIN32_TRUE = @WIN32_TRUE@
XGETTEXT = @XGETTEXT@
XINE_ACFLAGS = @XINE_ACFLAGS@
XINE_BIN_AGE = @XINE_BIN_AGE@
XINE_BUILD_CC = @XINE_BUILD_CC@
XINE_BUILD_DATE = @XINE_BUILD_DATE@
XINE_BUILD_OS = @XINE_BUILD_OS@
XINE_CONFIG_PREFIX = @XINE_CONFIG_PREFIX@
XINE_DATADIR = @XINE_DATADIR@
XINE_FONTDIR = @XINE_FONTDIR@
XINE_FONTPATH = @XINE_FONTPATH@
XINE_IFACE_AGE = @XINE_IFACE_AGE@
XINE_LOCALEDIR = @XINE_LOCALEDIR@
XINE_LOCALEPATH = @XINE_LOCALEPATH@
XINE_MAJOR = @XINE_MAJOR@
XINE_MINOR = @XINE_MINOR@
XINE_PLUGINDIR = @XINE_PLUGINDIR@
XINE_PLUGINPATH = @XINE_PLUGINPATH@
XINE_PLUGIN_MIN_SYMS = @XINE_PLUGIN_MIN_SYMS@
XINE_SCRIPTPATH = @XINE_SCRIPTPATH@
XINE_SUB = @XINE_SUB@
XVMC_LIB = @XVMC_LIB@
XV_LIB = @XV_LIB@
XXMC_LIB = @XXMC_LIB@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ZLIB_INCLUDES = @ZLIB_INCLUDES@
ZLIB_LIBS = @ZLIB_LIBS@
ZLIB_LIBS_CONFIG = @ZLIB_LIBS_CONFIG@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__fastdepOBJC_FALSE = @am__fastdepOBJC_FALSE@
am__fastdepOBJC_TRUE = @am__fastdepOBJC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
w32_path = @w32_path@
XINE_LIB = $(top_builddir)/src/xine-engine/libxine.la
noinst_HEADERS = files.h inf.h logging.h types.h files_private.h info.h sector.h version.h
all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/misc/Makefile.common $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
		&& exit 0; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/input/vcd/libvcd/libvcd/Makefile'; \
	cd $(top_srcdir) && \
	  $(AUTOMAKE) --gnu  src/input/vcd/libvcd/libvcd/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure:  $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs

distclean-libtool:
	-rm -f libtool
uninstall-info-am:

ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
	unique=`for i in $$list; do \
	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
	  done | \
	  $(AWK) '    { files[$$0] = 1; } \
	       END { for (i in files) print i; }'`; \
	mkid -fID $$unique
tags: TAGS

TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
		$(TAGS_FILES) $(LISP)
	tags=; \
	here=`pwd`; \
	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
	unique=`for i in $$list; do \
	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
	  done | \
	  $(AWK) '    { files[$$0] = 1; } \
	       END { for (i in files) print i; }'`; \
	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
	  test -n "$$unique" || unique=$$empty_fix; \
	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	    $$tags $$unique; \
	fi
ctags: CTAGS
CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
		$(TAGS_FILES) $(LISP)
	tags=; \
	here=`pwd`; \
	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
	unique=`for i in $$list; do \
	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
	  done | \
	  $(AWK) '    { files[$$0] = 1; } \
	       END { for (i in files) print i; }'`; \
	test -z "$(CTAGS_ARGS)$$tags$$unique" \
	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
	     $$tags $$unique

GTAGS:
	here=`$(am__cd) $(top_builddir) && pwd` \
	  && cd $(top_srcdir) \
	  && gtags -i $(GTAGS_ARGS) $$here

distclean-tags:
	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags

distdir: $(DISTFILES)
	$(mkdir_p) $(distdir)/../../../../../misc
	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
	list='$(DISTFILES)'; for file in $$list; do \
	  case $$file in \
	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
	  esac; \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
	    dir="/$$dir"; \
	    $(mkdir_p) "$(distdir)$$dir"; \
	  else \
	    dir=''; \
	  fi; \
	  if test -d $$d/$$file; then \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
	    fi; \
	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
	  else \
	    test -f $(distdir)/$$file \
	    || cp -p $$d/$$file $(distdir)/$$file \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile $(HEADERS)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	  `test -z '$(STRIP)' || \
	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool \
	distclean-tags

dvi: dvi-am

dvi-am:

html: html-am

info: info-am

info-am:

install-data-am:
	@$(NORMAL_INSTALL)
	$(MAKE) $(AM_MAKEFLAGS) install-data-hook

install-exec-am:

install-info: install-info-am

install-man:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am: uninstall-info-am
	@$(NORMAL_INSTALL)
	$(MAKE) $(AM_MAKEFLAGS) uninstall-hook

.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
	clean-libtool ctags distclean distclean-generic \
	distclean-libtool distclean-tags distdir dvi dvi-am html \
	html-am info info-am install install-am install-data \
	install-data-am install-data-hook install-exec install-exec-am \
	install-info install-info-am install-man install-strip \
	installcheck installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-generic \
	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
	uninstall-am uninstall-hook uninstall-info-am


$(XINE_LIB):
	@cd $(top_srcdir)/src/xine-engine && $(MAKE)

install-data-hook:
	@if test $$MAKELEVEL -le 4 ; then \
	  if test -x "$(top_srcdir)/post-install.sh" ; then \
	    $(top_srcdir)/post-install.sh ; \
	  fi \
	fi

pass1:
	@$(MAKE) MULTIPASS_CFLAGS="$(PASS1_CFLAGS)"

pass2:
	@$(MAKE) MULTIPASS_CFLAGS="$(PASS2_CFLAGS)"

debug:
	@$(MAKE) CFLAGS="$(DEBUG_CFLAGS)"

install-debug: debug
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
	@list='$(SUBDIRS)'; for subdir in $$list; do \
	  (cd $$subdir && $(MAKE) $@) || exit; \
	done;
	$(MAKE) $(AM_MAKEFLAGS) install-data-hook

install-includeHEADERS: $(include_HEADERS)
	@$(NORMAL_INSTALL)
	$(install_sh) -d $(DESTDIR)$(includedir)/xine
	@list='$(include_HEADERS)'; for p in $$list; do \
	  if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
	  echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/xine/$$p"; \
	  $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/xine/$$p; \
	done

uninstall-includeHEADERS:
	@$(NORMAL_UNINSTALL)
	list='$(include_HEADERS)'; for p in $$list; do \
	  rm -f $(DESTDIR)$(includedir)/xine/$$p; \
	done

uninstall-hook:
	@if echo '$(libdir)' | egrep ^'$(XINE_PLUGINDIR)' >/dev/null; then \
	  list='$(lib_LTLIBRARIES)'; for p in $$list; do \
	    p="`echo $$p | sed -e 's/\.la$$/\.so/g;s|^.*/||'`"; \
	    echo " rm -f $(DESTDIR)$(libdir)/$$p"; \
	    rm -f $(DESTDIR)$(libdir)/$$p; \
	  done; \
	fi

mostlyclean-generic:
	-rm -f *~ \#* .*~ .\#*

maintainer-clean-generic:
	-@echo "This command is intended for maintainers to use;"
	-@echo "it deletes files that may require special tools to rebuild."
	-rm -f Makefile.in
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

--- NEW FILE: Makefile.am ---
include $(top_srcdir)/misc/Makefile.common

noinst_HEADERS = files.h inf.h logging.h types.h files_private.h info.h sector.h version.h

--- NEW FILE: logging.h ---
/*
    $Id: logging.h,v 1.1 2005/04/04 22:29:44 dsalt-guest Exp $

    Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
    Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

#ifndef __VCD_LOGGING_H__
#define __VCD_LOGGING_H__

#include <libvcd/types.h>

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/**
 * The different log levels supported.
 */
typedef enum {
  VCD_LOG_DEBUG = 1, /**< Debug-level messages - helps debug what's up. */
  VCD_LOG_INFO,      /**< Informational - indicates perhaps something of 
                           interest. */
  VCD_LOG_WARN,      /**< Warning conditions - something that looks funny. */
  VCD_LOG_ERROR,     /**< Error conditions - may terminate program.  */
  VCD_LOG_ASSERT     /**< Critical conditions - may abort program. */
} vcd_log_level_t;

/**
 * The place to save the preference concerning how much verbosity 
 * is desired. This is used by the internal default log handler, but
 * it could be use by applications which provide their own log handler.
 */
extern vcd_log_level_t vcd_loglevel_default;

/**
 * This type defines the signature of a log handler.  For every
 * message being logged, the handler will receive the log level and
 * the message string.
 *
 * @see vcd_log_set_handler
 * @see vcd_log_level_t
 *
 * @param level   The log level.
 * @param message The log message.
 */
typedef void (*vcd_log_handler_t) (vcd_log_level_t level, 
                                   const char message[]);

/**
 * Set a custom log handler for libcdio.  The return value is the log
 * handler being replaced.  If the provided parameter is NULL, then
 * the handler will be reset to the default handler.
 *
 * @see vcd_log_handler_t
 *
 * @param new_handler The new log handler.
 * @return The previous log handler.
 */
vcd_log_handler_t
vcd_log_set_handler (vcd_log_handler_t new_handler);

/**
 * Handle an message with the given log level
 *
 * @see vcd_debug
 * @see vcd_info
 * @see vcd_warn
 * @see vcd_error

 * @param level   The log level.
 * @param format  printf-style format string
 * @param ...     remaining arguments needed by format string
 */
void
vcd_log (vcd_log_level_t level, const char format[], ...) GNUC_PRINTF(2, 3);
    
/**
 * Handle a debugging message.
 *
 * @see vcd_log for a more generic routine
 */
void
vcd_debug (const char format[], ...) GNUC_PRINTF(1,2);

/**
 * Handle an informative message.
 *
 * @see vcd_log for a more generic routine
 */
void
vcd_info (const char format[], ...) GNUC_PRINTF(1,2);

/**
 * Handle a warning message.
 *
 * @see vcd_log for a more generic routine
 */
void
vcd_warn (const char format[], ...) GNUC_PRINTF(1,2);

/**
 * Handle an error message.
 *
 * @see vcd_log for a more generic routine.
 */
void
vcd_error (const char format[], ...) GNUC_PRINTF(1,2);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __VCD_LOGGING_H__ */


/* 
 * Local variables:
 *  c-file-style: "gnu"
 *  tab-width: 8
 *  indent-tabs-mode: nil
 * End:
 */

--- NEW FILE: files.h ---
/*
    $Id: files.h,v 1.1 2005/04/04 22:29:44 dsalt-guest Exp $

    Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

#ifndef VCDFILES_H
#define VCDFILES_H

#include <libvcd/types.h>

#define INFO_VCD_SECTOR    150
#define ENTRIES_VCD_SECTOR 151
#define LOT_VCD_SECTOR     152
#define LOT_VCD_SIZE       32
#define PSD_VCD_SECTOR     (LOT_VCD_SECTOR+LOT_VCD_SIZE)

#define MAX_SEGMENTS       1980
#define MAX_ENTRIES        500
#define MAX_SEQ_ENTRIES    99

/* these are used for SVCDs only */
#define TRACKS_SVD_SECTOR  (PSD_VCD_SECTOR+1)
#define SEARCH_DAT_SECTOR  (TRACKS_SVD_SECTOR+1)

/* Maximum index of optional LOT.VCD (the List ID Offset Table.) */
#define LOT_VCD_OFFSETS ((1 << 15)-1)

typedef enum {
  PSD_TYPE_PLAY_LIST = 0x10,        /* Play List */
  PSD_TYPE_SELECTION_LIST = 0x18,   /* Selection List (+Ext. for SVCD) */
  PSD_TYPE_EXT_SELECTION_LIST = 0x1a, /* Extended Selection List (VCD2.0) */
  PSD_TYPE_END_LIST = 0x1f,         /* End List */
  PSD_TYPE_COMMAND_LIST = 0x20      /* Command List */
} psd_descriptor_types;

#define ENTRIES_ID_VCD  "ENTRYVCD"
#define ENTRIES_ID_VCD3 "ENTRYSVD"
#define ENTRIES_ID_SVCD "ENTRYVCD" /* not ENTRYSVD! */

#define SCANDATA_VERSION_VCD2 0x02
#define SCANDATA_VERSION_SVCD 0x01

void
set_entries_vcd(VcdObj *obj, void *buf);

void 
set_info_vcd (VcdObj *obj, void *buf);

uint32_t
get_psd_size (VcdObj *obj, bool extended);

void
set_lot_vcd (VcdObj *obj, void *buf, bool extended);

void
set_psd_vcd (VcdObj *obj, void *buf, bool extended);

void
set_tracks_svd (VcdObj *obj, void *buf);

uint32_t 
get_search_dat_size (const VcdObj *obj);

void
set_search_dat (VcdObj *obj, void *buf);

uint32_t 
get_scandata_dat_size (const VcdObj *obj);

void
set_scandata_dat (VcdObj *obj, void *buf);


vcd_type_t
vcd_files_info_detect_type (const void *info_buf);

#endif /* VCDFILES_H */


/* 
 * Local variables:
 *  c-file-style: "gnu"
 *  tab-width: 8
 *  indent-tabs-mode: nil
 * End:
 */

--- NEW FILE: types.h ---
/*
    $Id: types.h,v 1.1 2005/04/04 22:29:44 dsalt-guest Exp $

    Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

#ifndef __VCD_TYPES_H__
#define __VCD_TYPES_H__

#include <cdio/types.h>

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
  
  /* Opaque types ... */
  
  /* Defined fully in data_structures.c */
  typedef struct _VcdList VcdList;
  typedef struct _VcdListNode VcdListNode;
  
  /* Defined fully in files_private.h */
  typedef struct _InfoVcd_tag    InfoVcd;
  typedef struct _EntriesVcd_tag EntriesVcd;
  typedef struct _LotVcd_tag     LotVcd;
  
  typedef struct _PsdPlayListDescriptor_tag      PsdPlayListDescriptor;
  typedef struct _PsdSelectionListDescriptor_tag PsdSelectionListDescriptor;
  
  /* Overall data structure representing a VideoCD object.
     Defined fully in info_private.h. 
   */
  typedef struct _VcdObj VcdObj;
  
  /* enum defining supported VideoCD types */
  typedef enum
    {
      VCD_TYPE_INVALID = 0,
      VCD_TYPE_VCD,
      VCD_TYPE_VCD11,
      VCD_TYPE_VCD2,
      VCD_TYPE_SVCD,
      VCD_TYPE_HQVCD
    }
    vcd_type_t;
  
  /* The type of an playback control list ID (LID). */
  typedef uint16_t lid_t;
  
  /* The type of a segment number 0..1980 segment items possible. */
  typedef uint16_t segnum_t;
  
  /* (0,0) == upper left , (255,255) == lower right 
     setting all to zero disables area */
  PRAGMA_BEGIN_PACKED
  struct psd_area_t
  {
    uint8_t x1; /* upper left */
    uint8_t y1; /* upper left */
    uint8_t x2; /* lower right */
    uint8_t y2; /* lower right */
  } GNUC_PACKED;
  PRAGMA_END_PACKED
  
#define struct_psd_area_t_SIZEOF 4
  
#define PSD_OFS_DISABLED         0xffff
#define PSD_OFS_MULTI_DEF        0xfffe
#define PSD_OFS_MULTI_DEF_NO_NUM 0xfffd
  
#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __VCD_TYPES_H__ */

/* 
 * Local variables:
 *  c-file-style: "gnu"
 *  tab-width: 8
 *  indent-tabs-mode: nil
 * End:
 */

--- NEW FILE: info.h ---
/*!
   \file info.h

    Copyright (C) 2002,2003 Rocky Bernstein <rocky@panix.com>

 \verbatim
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Foundation
    Software, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 \endverbatim
*/
/* 
   Things here refer to higher-level structures usually accessed via
   vcdinfo_t. For lower-level access which generally use 
   structures other than vcdinfo_t, see inf.h
*/


#ifndef _VCD_INFO_H
#define _VCD_INFO_H

#include <libvcd/types.h>
#include <libvcd/files.h>
#include <cdio/cdio.h>

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/*========== Move somewhere else? ================*/

/*! \def Max # characters in an album id. */
#define MAX_ALBUM_LEN 16   
#define MAX_APPLICATION_ID 128
#define MAX_PREPARER_ID 128
#define MAX_PUBLISHER_ID 128
#define MAX_SYSTEM_ID 32
#define MAX_VOLUME_ID 32
#define MAX_VOLUMESET_ID 128

/*!
  Invalid LBA, Note: VCD player uses the fact that this is a very high
  value.
 */
#define VCDINFO_NULL_LBA          CDIO_INVALID_LBA

/*!
  Invalid LSN, Note: VCD player uses the fact that this is a very high
  value.
 */
#define VCDINFO_NULL_LSN          VCDINFO_NULL_LBA

/*========== End move somewhere else? ================*/

/*! 
  Portion of uint16_t which determines whether offset is
  rejected or not. 
*/
#define VCDINFO_REJECTED_MASK (0x8000)

/*!
  Portion of uint16_t which contains the offset.
*/
#define VCDINFO_OFFSET_MASK (VCDINFO_REJECTED_MASK-1)

/*! 
  Portion of uint16_t which contains the lid.
*/
#define VCDINFO_LID_MASK    (VCDINFO_REJECTED_MASK-1)

/*! 
  Constant for invalid track number
*/
#define VCDINFO_INVALID_TRACK   0xFF

/*! 
  Constant for invalid LID offset.
*/
#define VCDINFO_INVALID_OFFSET  0xFFFF

/*! 
  Constant for ending or "leadout" track.
*/
#define VCDINFO_LEADOUT_TRACK  0xaa

/*! 
  Constant for invalid sequence entry.
*/
#define VCDINFO_INVALID_ENTRY  0xFFFF

/*! 
  Constant for invalid LID. 
  FIXME: player needs these to be the same. 
  VCDimager code requres 0 for an UNINITIALIZED LID.
  
*/
#define VCDINFO_INVALID_LID  VCDINFO_INVALID_ENTRY
#define VCDINFO_UNINIT_LID   0

/*! 
  Constant for invalid itemid
*/
#define VCDINFO_INVALID_ITEMID  0xFFFF

/*! 
  Constant for invalid audio type
*/
#define VCDINFO_INVALID_AUDIO_TYPE  4

/*! 
  Constant for invalid base selection number (BSN)
*/
#define VCDINFO_INVALID_BSN  200

/* The number of sectors allocated in a Video CD segment is a fixed: 150.
   
   NOTE: The actual number of sectors used is often less and can sometimes
   be gleaned by looking at the correspoinding ISO 9660 file entry (or
   by scanning the MPEG segment which may be slow).
   Some media players get confused by or complain about padding at the end
   a segment.
*/
#define VCDINFO_SEGMENT_SECTOR_SIZE 150

  /* Opaque type used in most routines below. */
  typedef struct _VcdInfo vcdinfo_obj_t;

  /* See enum in vcd_files_private.h */
  typedef enum {
    VCDINFO_FILES_VIDEO_NOSTREAM = 0,   
    VCDINFO_FILES_VIDEO_NTSC_STILL = 1,   
    VCDINFO_FILES_VIDEO_NTSC_STILL2 = 2,  /* lo+hires*/
    VCDINFO_FILES_VIDEO_NTSC_MOTION = 3,
    VCDINFO_FILES_VIDEO_PAL_STILL = 5,    
    VCDINFO_FILES_VIDEO_PAL_STILL2 = 6,   /* lo+hires*/
    VCDINFO_FILES_VIDEO_PAL_MOTION = 7,
    VCDINFO_FILES_VIDEO_INVALID = 8
  } vcdinfo_video_segment_type_t;
  
  /*!
    Used in working with LOT - list of offsets and lid's 
  */
  typedef struct {
    uint8_t type;
    lid_t lid;
    uint16_t offset;
    bool in_lot;   /* Is listed in LOT. */
    bool ext;      /* True if entry comes from offset_x_list. */
  } vcdinfo_offset_t;
  
  /*!
    The kind of entry associated with an selection-item id 
  */
  /* See corresponding enum in vcd_pbc.h. */
  typedef enum {
    VCDINFO_ITEM_TYPE_TRACK,
    VCDINFO_ITEM_TYPE_ENTRY,
    VCDINFO_ITEM_TYPE_SEGMENT,
    VCDINFO_ITEM_TYPE_LID,
    VCDINFO_ITEM_TYPE_SPAREID2,
    VCDINFO_ITEM_TYPE_NOTFOUND
  } vcdinfo_item_enum_t;
  
  typedef struct {
    uint16_t num;
    vcdinfo_item_enum_t type;
  } vcdinfo_itemid_t;
  
  typedef enum {
    VCDINFO_OPEN_ERROR,          /* Error */
    VCDINFO_OPEN_VCD,            /* Is VCD of some sort */
    VCDINFO_OPEN_OTHER           /* Is not VCD but something else */
  } vcdinfo_open_return_t;
  
  typedef struct 
  {
    
    psd_descriptor_types descriptor_type;
    /* Only one of pld or psd is used below. Not all
       C compiler accept the anonymous unions commented out below. */
    /* union  { */
    PsdPlayListDescriptor *pld;
    PsdSelectionListDescriptor *psd;
    /* }; */
    
  } PsdListDescriptor;
  
  /*!
    Return the number of audio channels implied by "audio_type".
    0 is returned on error.
  */
  unsigned int
  vcdinfo_audio_type_num_channels(const vcdinfo_obj_t *obj, 
				  unsigned int audio_type);
  
  /*!
    Return a string describing an audio type.
  */
  const char * vcdinfo_audio_type2str(const vcdinfo_obj_t *obj,
				      unsigned int audio_type);
  
  /*!
    Note first seg_num is 0!
  */
  const char * 
  vcdinfo_ogt2str(const vcdinfo_obj_t *obj, segnum_t seg_num);
  
  /*!
    Note first seg_num is 0!
  */
  const char * 
  vcdinfo_video_type2str(const vcdinfo_obj_t *obj, segnum_t seg_num);
  
  const char *
  vcdinfo_pin2str (uint16_t itemid);
  
  /*!
    \brief Classify itemid_num into the kind of item it is: track #, entry #, 
    segment #. 
    \param itemid is set to contain this classifcation an the converted 
    entry number. 
  */
  void
  vcdinfo_classify_itemid (uint16_t itemid_num, 
			   /*out*/ vcdinfo_itemid_t *itemid);
  
  /*!
    Return a string containing the VCD album id, or NULL if there is 
    some problem in getting this. 
  */
  const char *
  vcdinfo_get_album_id(const vcdinfo_obj_t *obj);
  
  /*!
    Return the VCD application ID.
    NULL is returned if there is some problem in getting this. 
  */
  const char *
  vcdinfo_get_application_id(const vcdinfo_obj_t *obj);
  
  /*!
    Return a pointer to the cdio structure for the CD image opened or
    NULL if error.
  */
  CdIo *
  vcdinfo_get_cd_image (const vcdinfo_obj_t *vcd_obj);
  
  /*!
    Return a string containing the default VCD device if none is specified.
    This might be something like "/dev/cdrom" on Linux or 
    "/vol/dev/aliases/cdrom0" on Solaris,  or maybe "VIDEOCD.CUE" for 
    if bin/cue I/O routines are in effect. 
    
    Return NULL we can't get this information.
  */
  char *
  vcdinfo_get_default_device (const vcdinfo_obj_t *vcd_obj);
  
  /*!
    \brief Get default LID offset. 

    Return the LID offset associated with a the "default" entry of the
    passed-in LID parameter. Note "default" entries are associated with
    PSDs that are (extended) selection lists.

    \return VCDINFO_INVALID_OFFSET is returned on error, or if the LID
    is not a selection list or no "default" entry. Otherwise the LID
    offset is returned.
  */
  uint16_t
  vcdinfo_get_default_offset(const vcdinfo_obj_t *obj, lid_t lid);
  
  /*!
    Return number of sector units in of an entry. 0 is returned if
    entry_num is invalid.
  */
  uint32_t
  vcdinfo_get_entry_sect_count (const vcdinfo_obj_t *obj, 
				unsigned int entry_num);
  
  /*!  Return the starting LBA (logical block address) for sequence
    entry_num in obj.  VCDINFO_NULL_LBA is returned if there is no entry.
    The first entry number is 0.
  */
  lba_t
  vcdinfo_get_entry_lba(const vcdinfo_obj_t *obj, unsigned int entry_num);
  
  /*!  Return the starting LSN (logical sector number) for sequence
    entry_num in obj.  VCDINFO_NULL_LSN is returned if there is no entry.
    The first entry number is 0.
  */
  lsn_t
  vcdinfo_get_entry_lsn(const vcdinfo_obj_t *obj, unsigned int entry_num);
  
  /*!  Return the starting MSF (minutes/secs/frames) for sequence
    entry_num in obj.  NULL is returned if there is no entry.
    The first entry number is 0.
  */
  const msf_t *
  vcdinfo_get_entry_msf(const vcdinfo_obj_t *obj, unsigned int entry_num);

  /*!
    Get the VCD format (VCD 1.0 VCD 1.1, SVCD, ... for this object.
    The type is also set inside obj.
    The first entry number is 0.
  */
  vcd_type_t 
  vcdinfo_get_format_version (vcdinfo_obj_t *obj);
  
  /*!
    Return a string giving VCD format (VCD 1.0 VCD 1.1, SVCD, ... 
    for this object.
  */
  const char * 
  vcdinfo_get_format_version_str (const vcdinfo_obj_t *obj);
  
  EntriesVcd * vcdinfo_get_entriesVcd (vcdinfo_obj_t *obj);
  
  InfoVcd * vcdinfo_get_infoVcd (vcdinfo_obj_t *obj);

  /*!
    \brief Get default or multi-default LID. 

    Return the LID offset associated with a the "default" entry of the
    passed-in LID parameter. Note "default" entries are associated
    with PSDs that are (extended) selection lists. If the "default"
    is a multi-default, we use entry_num to find the proper
    "default" LID. Otherwise this routine is exactly like
    vcdinfo_get_default_offset with the exception of requiring an
    additional "entry_num" parameter.

    \return VCDINFO_INVALID_LID is returned on error, or if the LID
    is not a selection list or no "default" entry. Otherwise the LID
    offset is returned.
  */
  lid_t
  vcdinfo_get_multi_default_lid(const vcdinfo_obj_t *obj, lid_t lid,
				unsigned int selection);
  
  /*!
    \brief Get default or multi-default LID offset. 

    Return the LID offset associated with a the "default" entry of the
    passed-in LID parameter. Note "default" entries are associated
    with PSDs that are (extended) selection lists. If the "default"
    is a multi-default, we use entry_num to find the proper
    "default" offset. Otherwise this routine is exactly like
    vcdinfo_get_default_offset with the exception of requiring an
    additional "entry_num" parameter.

    \return VCDINFO_INVALID_OFFSET is returned on error, or if the LID
    is not a selection list or no "default" entry. Otherwise the LID
    offset is returned.
  */
  uint16_t
  vcdinfo_get_multi_default_offset(const vcdinfo_obj_t *obj, lid_t lid,
				   unsigned int selection);
  
  void * vcdinfo_get_pvd (vcdinfo_obj_t *obj);
  
  void * vcdinfo_get_scandata (vcdinfo_obj_t *obj);

  void * vcdinfo_get_searchDat (vcdinfo_obj_t *obj);
  
  void * vcdinfo_get_tracksSVD (vcdinfo_obj_t *obj);
  
  /*!
    Get the LOT pointer. 
  */
  LotVcd *
  vcdinfo_get_lot(const vcdinfo_obj_t *obj);
  
  /*!
    Get the extended LOT pointer. 
  */
  LotVcd *
  vcdinfo_get_lot_x(const vcdinfo_obj_t *obj);

  /*!
    Return Number of LIDs. 
  */
  lid_t
  vcdinfo_get_num_LIDs (const vcdinfo_obj_t *obj);
  
  /*!
    Return the audio type for a given track. 
    VCDINFO_INVALID_AUDIO_TYPE is returned on error.
  */
  unsigned int
  vcdinfo_get_num_audio_channels(unsigned int audio_type);
  
  /*!
    Return the number of entries in the VCD.
  */
  unsigned int
  vcdinfo_get_num_entries(const vcdinfo_obj_t *obj);
  
  /*!
    Return the number of segments in the VCD. 
  */
  segnum_t
  vcdinfo_get_num_segments(const vcdinfo_obj_t *obj);
  
  /*!  
    Return the highest track number in the current medium. 

    Because we track start numbering at 0 (which is the ISO 9660 track
    containing Video CD naviagion and disk information), this is one
    less than the number of tracks. 

    If there are no tracks, we return -1.
  */
  unsigned int
  vcdinfo_get_num_tracks(const vcdinfo_obj_t *obj);
  
  /*!
    Get the VCD info list.
  */
  VcdList *vcdinfo_get_offset_list(const vcdinfo_obj_t *obj);

  /*!
    Get the VCD info extended offset list.
  */
  VcdList *vcdinfo_get_offset_x_list(const vcdinfo_obj_t *obj);

  /*!
    Get the VCD info offset multiplier.
  */
  unsigned int vcdinfo_get_offset_mult(const vcdinfo_obj_t *obj);

  /*! 
    Get entry in offset list for the item that has offset. This entry 
    has for example the LID. NULL is returned on error. 
  */
  vcdinfo_offset_t *
  vcdinfo_get_offset_t (const vcdinfo_obj_t *obj, unsigned int offset);
  
  /*!
    Return a string containing the VCD preparer id with trailing
    blanks removed, or NULL if there is some problem in getting this.
  */
  const char *
  vcdinfo_get_preparer_id(const vcdinfo_obj_t *obj);
  
  /*!
    Get the PSD.
  */
  uint8_t *vcdinfo_get_psd(const vcdinfo_obj_t *obj);

  /*!
    Get the extended PSD.
  */
  uint8_t *vcdinfo_get_psd_x(const vcdinfo_obj_t *obj);

  /*!
    Return number of bytes in PSD.
  */
  uint32_t vcdinfo_get_psd_size (const vcdinfo_obj_t *obj);
  
  /*!
    Return number of bytes in the extended PSD.
  */
  uint32_t vcdinfo_get_psd_x_size (const vcdinfo_obj_t *obj);
  
  /*!
    Return a string containing the VCD publisher id with trailing
    blanks removed, or NULL if there is some problem in getting this.
  */
  const char * vcdinfo_get_publisher_id(const vcdinfo_obj_t *obj);
  
  /**
   \fn vcdinfo_get_return_offset(const vcdinfo_obj_t *obj);
   \brief Get return offset for a given LID. 
   \return  VCDINFO_INVALID_OFFSET is returned on error or if LID has no 
   "return" entry. Otherwise the LID offset is returned.
   */
  lid_t
  vcdinfo_get_return_offset(const vcdinfo_obj_t *obj, lid_t lid);
  
  /*!
    Return the audio type for a given segment. 
    VCDINFO_INVALID_AUDIO_TYPE is returned on error.
  */
  unsigned int 
  vcdinfo_get_seg_audio_type(const vcdinfo_obj_t *obj, segnum_t seg_num);
  
  /*!
    Return true if this segment is supposed to continue to the next one,
    (is part of an "item" or listing in the ISO 9660 filesystem).
  */
  bool vcdinfo_get_seg_continue(const vcdinfo_obj_t *obj, segnum_t seg_num);

  /*!  Return the starting LBA (logical block address) for segment
    entry_num in obj.  VCDINFO_NULL_LBA is returned if there is no entry.
    
    Note first seg_num is 0.
  */
  lba_t
  vcdinfo_get_seg_lba(const vcdinfo_obj_t *obj, segnum_t seg_num);
  
  /*!  Return the starting LSN (logical sector number) for segment
    entry_num in obj.  VCDINFO_NULL_LBA is returned if there is no entry.
    
    Note first seg_num is 0.
  */
  lsn_t
  vcdinfo_get_seg_lsn(const vcdinfo_obj_t *obj, segnum_t seg_num);
  
  /*!  Return the starting MSF (minutes/secs/frames) for segment
    entry_num in obj.  NULL is returned if there is no entry.
    
    Note first seg_num is 0.
  */
  const msf_t *
  vcdinfo_get_seg_msf(const vcdinfo_obj_t *obj, segnum_t seg_num);
  
  /*!  
    Return the number of sectors for segment
    entry_num in obj.  0 is returned if there is no entry.
    
    Use this routine to figure out the actual number of bytes a physical
    region of a disk or CD takes up for a segment.

    If an item has been broken up into a number of "continued" segments,
    we will report the item size for the first segment and 0 for the
    remaining ones. We may revisit this decision later. 
  */
  uint32_t
  vcdinfo_get_seg_sector_count(const vcdinfo_obj_t *obj, segnum_t seg_num);
  
  /*!
    Return a string containing the VCD system id with trailing
    blanks removed, or NULL if there is some problem in getting this.
  */
  const char *
  vcdinfo_get_system_id(const vcdinfo_obj_t *obj);
  
  /*!
    Return the track number for entry n in obj. 

    In contrast to libcdio we start numbering at 0 which is the
    ISO9660 and metadata information for the Video CD. Thus track 
    1 is the first track the first complete MPEG track generally.
  */
  track_t
  vcdinfo_get_track(const vcdinfo_obj_t *obj, const unsigned int entry_num);
  
  /*!
    Return the audio type for a given track. 
    VCDINFO_INVALID_AUDIO_TYPE is returned on error.
    
    Note: track 1 is usually the first track.
  */
  unsigned int
  vcdinfo_get_track_audio_type(const vcdinfo_obj_t *obj, track_t track_num);
  
  /*!  
    Return the starting LBA (logical block address) for track number
    track_num in obj.  
    
    The IS0-9660 filesystem track has number 0. Tracks associated
    with playable entries numbers start at 1.
    
    The "leadout" track is specified either by
    using track_num LEADOUT_TRACK or the total tracks+1.
    VCDINFO_NULL_LBA is returned on failure.
  */
  lba_t
  vcdinfo_get_track_lba(const vcdinfo_obj_t *obj, track_t track_num);
  
  /*!  
    Return the starting LSN (logical sector number) for track number
    track_num in obj.  
    
    The IS0-9660 filesystem track has number 0. Tracks associated
    with playable entries numbers start at 1.
    
    The "leadout" track is specified either by
    using track_num LEADOUT_TRACK or the total tracks+1.
    VCDINFO_NULL_LBA is returned on failure.
  */
  lsn_t
  vcdinfo_get_track_lsn(const vcdinfo_obj_t *obj, track_t track_num);
  
  /*!  
    Return the starting MSF (minutes/secs/frames) for track number
    track_num in obj.  
    
    The IS0-9660 filesystem track has number 0. Tracks associated
    with playable entries numbers start at 1.
    
    The "leadout" track is specified either by
    using track_num LEADOUT_TRACK or the total tracks+1.
    VCDINFO_NULL_LBA is returned on failure.
  */
  int
  vcdinfo_get_track_msf(const vcdinfo_obj_t *obj, track_t track_num,
			uint8_t *min, uint8_t *sec, uint8_t *frame);
  
  /*!
    Return the size in sectors for track n. 

    The IS0-9660 filesystem track has number 1. Tracks associated
    with playable entries numbers start at 2.
    
    FIXME: Whether we count the track pregap sectors is a bit haphazard.
    We should add a parameter to indicate whether this is wanted or not.
  */
  unsigned int
  vcdinfo_get_track_sect_count(const vcdinfo_obj_t *obj, 
			       const track_t track_num);
  
  /*!
    Return size in bytes for track number for entry n in obj.

    The IS0-9660 filesystem track has number 0. Tracks associated
    with playable entries numbers start at 1.

    FIXME: Do we count the track pregap sectors is a bit haphazard.
    We should add a parameter to indicate whether this is wanted or not.
  */
  unsigned int
  vcdinfo_get_track_size(const vcdinfo_obj_t *obj, track_t track_num);
  
  /*!
    \brief Get the kind of video stream segment of segment seg_num in obj.
    \return VCDINFO_FILES_VIDEO_INVALID is returned if  on error or obj is
    null. Otherwise the enumeration type.
    
    Note first seg_num is 0!
  */
  vcdinfo_video_segment_type_t
  vcdinfo_get_video_type(const vcdinfo_obj_t *obj, segnum_t seg_num);
  
  /*!
    \brief Get the kind of VCD that obj refers to.
  */
  vcd_type_t
  vcdinfo_get_VCD_type(const vcdinfo_obj_t *obj);
  
  /*!
    Return the VCD volume count - the number of CD's in the collection.
    O is returned if there is some problem in getting this. 
  */
  unsigned int
  vcdinfo_get_volume_count(const vcdinfo_obj_t *obj);
  
  /*!
    Return the VCD ID.
    NULL is returned if there is some problem in getting this. 
  */
  const char *
  vcdinfo_get_volume_id(const vcdinfo_obj_t *obj);
  
  /*!
    Return the VCD volumeset ID.
    NULL is returned if there is some problem in getting this. 
  */
  const char *
  vcdinfo_get_volumeset_id(const vcdinfo_obj_t *obj);
  
  /*!
    Return the VCD volume num - the number of the CD in the collection.
    This is a number between 1 and the volume count.
    O is returned if there is some problem in getting this. 
  */
  unsigned int
  vcdinfo_get_volume_num(const vcdinfo_obj_t *obj);
  
  int vcdinfo_get_wait_time (uint16_t wtime);

  /*!
    Return true if there is playback control. 
  */
  bool vcdinfo_has_pbc (const vcdinfo_obj_t *obj);
  
  /*! 
    Return true if VCD has "extended attributes" (XA). Extended attributes
    add meta-data attributes to a entries of file describing the file.
    See also cdio_get_xa_attr_str() which returns a string similar to
    a string you might get on a Unix filesystem listing ("ls").
  */
  bool vcdinfo_has_xa(const vcdinfo_obj_t *obj);
  
  /*!
    Add one to the MSF.
  */
  void vcdinfo_inc_msf (uint8_t *min, uint8_t *sec, int8_t *frame);
  
  /*!
    Convert minutes, seconds and frame (MSF components) into a
    logical block address (or LBA). 
    See also msf_to_lba which uses msf_t as its single parameter.
  */
  void 
  vcdinfo_lba2msf (lba_t lba, uint8_t *min, uint8_t *sec, uint8_t *frame);
  
  /*!
    Get the item id for a given list ID. 
    VCDINFO_REJECTED_MASK is returned on error or if obj is NULL. 
  */
  uint16_t
  vcdinfo_lid_get_itemid(const vcdinfo_obj_t *obj, lid_t lid);
  
  /*!
    \fn vcdinfo_lid_get_offset(const vcdinfo_obj_t *obj, 
                                    unsigned int entry_num);
    \brief Get offset entry_num for a given LID. 
    \return VCDINFO_INVALID_OFFSET is returned if obj on error or obj
    is NULL. Otherwise the LID offset is returned.
  */
  uint16_t vcdinfo_lid_get_offset(const vcdinfo_obj_t *obj, lid_t lid,
				  unsigned int entry_num);
  
  /*!
    Get the PSD Selection List Descriptor for a given lid.
    False is returned if not found.
  */
  bool vcdinfo_lid_get_pxd(const vcdinfo_obj_t *obj, PsdListDescriptor *pxd,
			   uint16_t lid);
  
  /*!
    Convert minutes, seconds and frame (MSF components) into a
    logical block address (or LBA). 
    See also msf_to_lba which uses msf_t as its single parameter.
  */
  lba_t vcdinfo_msf2lba (uint8_t min, uint8_t sec, int8_t frame);
  
  /*!
    Convert minutes, seconds and frame (MSF components) into a
    logical sector number (or LSN). 
  */
  lsn_t vcdinfo_msf2lsn (uint8_t min, uint8_t sec, int8_t frame);
  
  const char *
  vcdinfo_ofs2str (const vcdinfo_obj_t *obj, unsigned int offset, bool ext);
  
  /*!
    Calls recursive routine to populate obj->offset_list or obj->offset_x_list
    by going through LOT.
    
    Returns false if there was some error.
  */
  bool vcdinfo_visit_lot (vcdinfo_obj_t *obj, bool extended);
  
  bool vcdinfo_read_psd (vcdinfo_obj_t *obj);
  
  /*!
    \fn vcdinfo_selection_get_lid(const vcdinfo_obj_t *obj, lid_t lid,
                                     unsigned int selection);
    \brief Get the "default" lid of a selection for a given lid. 

    Return the LID offset associated with a the selection number of the
    passed-in LID parameter. 

    \return VCDINFO_INVALID_LID is returned if obj on error or obj
    is NULL. Otherwise the LID offset is returned.
  */
  lid_t vcdinfo_selection_get_lid(const vcdinfo_obj_t *obj, lid_t lid,
				  unsigned int selection);
  
  /*!
    \fn vcdinfo_selection_get_offset(const vcdinfo_obj_t *obj, lid_t lid,
                                     unsigned int selection);
    \brief Get offset of a selection for a given LID. 

    Return the LID offset associated with a the selection number of the
    passed-in LID parameter. 

    \return VCDINFO_INVALID_OFFSET is returned if obj on error or obj
    is NULL. Otherwise the LID offset is returned.
  */
  uint16_t vcdinfo_selection_get_offset(const vcdinfo_obj_t *obj, lid_t lid,
					unsigned int selection);
  
  /*!
    Change trailing blanks in str to nulls.  Str has a maximum size of
    n characters.
  */
  const char * vcdinfo_strip_trail (const char str[], size_t n);
  
  /*!
    Initialize the vcdinfo structure "obj". Should be done before other
    routines using obj are called.
  */
  bool vcdinfo_init(vcdinfo_obj_t *obj);
  
  /*!
    Set up vcdinfo structure "obj" for reading from a particular
    medium. This should be done before after initialization but before
    any routines that need to retrieve data.
    
    source_name is the device or file to use for inspection, and
    source_type indicates what driver to use or class of drivers in the
    case of DRIVER_DEVICE.
    access_mode gives the CD access method for reading should the driver
    allow for more than one kind of access method (e.g. MMC versus ioctl
    on GNU/Linux)
    
    If source_name is NULL we'll fill in the appropriate default device
    name for the given source_type. However if in addtion source_type is
    DRIVER_UNKNOWN, then we'll scan for a drive containing a VCD.
    
    VCDINFO_OPEN_VCD is returned if everything went okay; 
    VCDINFO_OPEN_ERROR if there was an error and VCDINFO_OPEN_OTHER if the
    medium is something other than a VCD.
 */
  vcdinfo_open_return_t
  vcdinfo_open(vcdinfo_obj_t **p_obj, char *source_name[], 
	       driver_id_t source_type, const char access_mode[]);
  
  
  /*!
    Dispose of any resources associated with vcdinfo structure "obj".
    Call this when "obj" it isn't needed anymore. 
    
    True is returned is everything went okay, and false if not.
  */
  bool vcdinfo_close(vcdinfo_obj_t *obj);
  
  /*!
    Return true if offset is "rejected". That is shouldn't be displayed
    in a list of entries.
  */
  bool vcdinfo_is_rejected(uint16_t offset);

/* Include lower-level access as well. */
#include <libvcd/inf.h>

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /*_VCD_INFO_H*/

--- NEW FILE: version.h ---
#define LIBVCD_VERSION "0.7.20"

--- NEW FILE: sector.h ---
/*
    $Id: sector.h,v 1.1 2005/04/04 22:29:44 dsalt-guest Exp $

    Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

#ifndef _VCD_SECTOR_H_
#define _VCD_SECTOR_H_

#include <libvcd/types.h>

/* subheader */

/*
  
  SVCD 1.0
  ~~~~~~~~
 
   empty sector:  fn=0 cn=0 sm=%00100000 ci=0
   data sector:   fn=0 cn=0 sm=%x0001000 ci=0
   mpeg sector:   fn=1 cn=1 sm=%x11x001x ci=0x80
  
  VCD 2.0
  ~~~~~~~

   /MPEGAV/AVSEQyy.DAT
    empty sector: fn=yy cn=0 sm=%x11x000x ci=0
    video sector: fn=yy cn=1 sm=%x11x001x ci=0x0f
    audio sector: fn=yy cn=1 sm=%x11x010x ci=0x7f

   /SEGMENT/ITEMzzzz.DAT
    empty sector: fn=1 cn=0  sm=%x11x000x ci=0
    video sector: fn=1 cn=1  sm=%x11x001x ci=0x0f
    lores still:  fn=1 cn=2  sm=%x11x001x ci=0x1f
    hires still:  fn=1 cn=3  sm=%x11x001x ci=0x3f
    audio sector: fn=1 cn=1  sm=%x11x010x ci=0x7f
  
   /VCD/ *.VCD
    data sector:  fn=0 cn=0  sm=%x000100x ci=0

   *.*
    data sector:  fn=1 cn=0  sm=%x0001000 ci=0

*/

/* file numbers */

/* dynamic */

/* channel numbers */
#define CN_VIDEO   0x01
#define CN_STILL   0x02
#define CN_STILL2  0x03
#define CN_AUDIO   0x01
#define CN_AUDIO2  0x02
#define CN_OGT     0x02 /* fixme -- is it 0x04 ?? */
#define CN_PAD     0x00
#define CN_EMPTY   0x00

/* submode byte */
#define SM_EOF    (1<<7)
#define SM_REALT  (1<<6)
#define SM_FORM2  (1<<5)
#define SM_TRIG   (1<<4)
#define SM_DATA   (1<<3)
#define SM_AUDIO  (1<<2)
#define SM_VIDEO  (1<<1)
#define SM_EOR    (1<<0)

/* coding information */
#define CI_VIDEO   0x0f
#define CI_STILL   0x1f
#define CI_STILL2  0x3f
#define CI_AUDIO   0x7f
#define CI_AUDIO2  0x7f
#define CI_OGT     0x0f
#define CI_PAD     0x1f
#define CI_MPEG2   0x80
#define CI_EMPTY   0x00

/* make mode 2 form 1/2 sector
 *
 * data must be a buffer of size 2048 or 2324 for SM_FORM2
 * raw_sector must be a writable buffer of size 2352
 */
void
_vcd_make_mode2 (void *raw_sector, const void *data, uint32_t extent,
                 uint8_t fnum, uint8_t cnum, uint8_t sm, uint8_t ci);

/* ...data must be a buffer of size 2336 */

void
_vcd_make_raw_mode2 (void *raw_sector, const void *data, uint32_t extent);

#endif /* _VCD_SECTOR_H_ */


/* 
 * Local variables:
 *  c-file-style: "gnu"
 *  tab-width: 8
 *  indent-tabs-mode: nil
 * End:
 */

--- NEW FILE: files_private.h ---
/*
    $Id: files_private.h,v 1.1 2005/04/04 22:29:44 dsalt-guest Exp $

    Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
              (C) 2000 Jens B. Jorgensen <jbj1@ultraemail.net>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software

    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

#ifndef __VCD_FILES_PRIVATE_H__
#define __VCD_FILES_PRIVATE_H__

#include <libvcd/files.h>
#include <libvcd/types.h>

/* random note: most stuff is big endian here */

#define ENTRIES_ID_VCD  "ENTRYVCD"
#define ENTRIES_ID_VCD3 "ENTRYSVD"
#define ENTRIES_ID_SVCD "ENTRYVCD" /* not ENTRYSVD! */

#define ENTRIES_VERSION_VCD   0x01
#define ENTRIES_SPTAG_VCD     0x00   

#define ENTRIES_VERSION_VCD11 0x01
#define ENTRIES_SPTAG_VCD11   0x00   

#define ENTRIES_VERSION_VCD2  0x02
#define ENTRIES_SPTAG_VCD2    0x00

#define ENTRIES_VERSION_SVCD  0x01
#define ENTRIES_SPTAG_SVCD    0x00

#define ENTRIES_VERSION_HQVCD 0x01
#define ENTRIES_SPTAG_HQVCD   0x00

PRAGMA_BEGIN_PACKED

typedef struct _EntriesVcd_tag {
  char ID[8];                             /* "ENTRYVCD" */
  uint8_t version;                        /* 0x02 --- VCD2.0
                                             0x01 --- SVCD, should be
                                             same as version in
                                             INFO.SVD */
  uint8_t sys_prof_tag;                   /* 0x01 if VCD1.1
                                             0x00 else */
  uint16_t entry_count;                   /* 1 <= tracks <= 500 */
  struct {     /* all fields are BCD */
    uint8_t n; /* cd track no 2 <= n <= 99 */
    msf_t msf;
  } GNUC_PACKED entry[MAX_ENTRIES];
  uint8_t reserved2[36];                  /* RESERVED, must be 0x00 */
} GNUC_PACKED _EntriesVcd; /* sector 00:04:01 */

#define EntriesVcd_SIZEOF ISO_BLOCKSIZE


#define INFO_ID_VCD   "VIDEO_CD"
#define INFO_ID_SVCD  "SUPERVCD"
#define INFO_ID_HQVCD "HQ-VCD  "

#define INFO_VERSION_VCD   0x01
#define INFO_SPTAG_VCD     0x00   

#define INFO_VERSION_VCD11 0x01
#define INFO_SPTAG_VCD11   0x01   

#define INFO_VERSION_VCD2  0x02
#define INFO_SPTAG_VCD2    0x00   

#define INFO_VERSION_SVCD  0x01
#define INFO_SPTAG_SVCD    0x00

#define INFO_VERSION_HQVCD 0x01
#define INFO_SPTAG_HQVCD   0x01

#define INFO_OFFSET_MULT   0x08

/* This one-byte field describes certain characteristics of the disc */
typedef struct {
#if defined(BITFIELD_LSBF)
  bool       reserved1 : 1;                   /* Reserved, must be zero */
  bitfield_t restriction : 2;                 /* restriction, eg. "unsuitable
                                              for kids":
                                              0x0 ==> unrestricted,
                                              0x1 ==> restricted category 1,
                                              0x2 ==> restricted category 2,
                                              0x3 ==> restricted category 3 */
  bool       special_info : 1;                /* Special Information is encoded 
                                              in the pictures */
  bool       user_data_cc : 1;                /* MPEG User Data is used
                                              for Closed Caption */
  bool       use_lid2 : 1;                    /* If == 1 and the PSD is
                                              interpreted and the next
                                              disc has the same album
                                              id then start the next
                                              disc at List ID #2,
                                              otherwise List ID #1 */ 
  bool       use_track3 : 1;                  /* If == 1 and the PSD is
                                              not interpreted  and
                                              next disc has same album
                                              id, then start next disc
                                              with track 3, otherwise
                                              start with track 2 */ 
  bool       pbc_x : 1;                       /* extended PBC available */
#else
  bool       pbc_x : 1;
  bool       use_track3 : 1;
  bool       use_lid2 : 1;
  bool       user_data_cc : 1;
  bool       special_info : 1;
  bitfield_t restriction : 2;
  bool       reserved1 : 1;
#endif
} GNUC_PACKED InfoStatusFlags;

#define InfoStatusFlags_SIZEOF 1

enum {
  VCD_FILES_VIDEO_NOSTREAM = 0,
  VCD_FILES_VIDEO_NTSC_STILL = 1,
  VCD_FILES_VIDEO_NTSC_STILL2 = 2,
  VCD_FILES_VIDEO_NTSC_MOTION = 3,
  VCD_FILES_VIDEO_PAL_STILL = 5,
  VCD_FILES_VIDEO_PAL_STILL2 = 6,
  VCD_FILES_VIDEO_PAL_MOTION = 7
};

typedef struct 
{
#if defined(BITFIELD_LSBF)
  bitfield_t audio_type : 2;                /* Audio characteristics:
                                            0x0 - No MPEG audio stream
                                            0x1 - One MPEG1 or MPEG2 audio
                                                  stream without extension
                                            0x2 - Two MPEG1 or MPEG2 audio
                                                  streams without extension
                                            0x3 - One MPEG2 multi-channel 
                                                    audio stream w/ extension*/
  bitfield_t video_type : 3;                /* Video characteristics:
                                            0x0 - No MPEG video data
                                            0x1 - NTSC still picture
                                            0x2 - Reserved (NTSC hires?)
                                            0x3 - NTSC motion picture
                                            0x4 - Reserved
                                            0x5 - PAL still picture
                                            0x6 - Reserved (PAL hires?)
                                            0x7 - PAL motion picture */
  bool       item_cont : 1;                 /* Indicates segment is continuation
                                            0x0 - 1st or only segment of item
                                            0x1 - 2nd or later
                                                  segment of item */
  bitfield_t ogt : 2;                       /* 0x0 - no OGT substream 
                                            0x1 - sub-stream 0 available
                                            0x2 - sub-stream 0 & 1 available
                                            0x3 - all OGT sub-substreams 
                                                  available */
#else
  bitfield_t ogt : 2;
  bool       item_cont : 1;
  bitfield_t video_type : 3;
  bitfield_t audio_type : 2;
#endif
} GNUC_PACKED InfoSpiContents;

#define InfoSpiContents_SIZEOF 1

typedef struct _InfoVcd_tag {
  char   ID[8];              /* const "VIDEO_CD" for
                                VCD, "SUPERVCD" or
                                "HQ-VCD  " for SVCD */
  uint8_t version;           /* 0x02 -- VCD2.0,
                                0x01 for SVCD and VCD1.x */ 
  uint8_t sys_prof_tag;      /* System Profile Tag, used
                                to define the set of
                                mandatory parts to be
                                applied for compatibility;
                                0x00 for "SUPERVCD",
                                0x01 for "HQ-VCD  ",
                                0x0n for VCDx.n */ 
  char album_desc[16];       /* album identification/desc. */
  uint16_t vol_count;        /* number of volumes in album */
  uint16_t vol_id;           /* number id of this volume in album */
  uint8_t  pal_flags[13];    /* bitset of 98 PAL(=set)/NTSC flags */
  InfoStatusFlags flags;     /* status flags bit field */
  uint32_t psd_size;         /* size of PSD.VCD file */
  msf_t    first_seg_addr;   /* first segment addresses,
                                coded BCD The location
                                of the first sector of
                                the Segment Play Item
                                Area, in the form
                                mm:ss:00. Must be
                                00:00:00 if the PSD size
                                is 0. */
  uint8_t  offset_mult;      /* offset multiplier, must be 8 */
  uint16_t lot_entries;      /* offsets in lot */
  uint16_t item_count;       /* segments used for segmentitems */
  InfoSpiContents spi_contents[MAX_SEGMENTS]; /* The next 1980 bytes
                                contain one byte for each possible
                                segment play item. Each byte indicates
                                contents. */

  uint16_t playing_time[5];  /* in seconds */
  char reserved[2];          /* Reserved, must be zero */
} GNUC_PACKED _InfoVcd;

#define InfoVcd_SIZEOF ISO_BLOCKSIZE

/* LOT.VCD
   This optional file is only necessary if the PSD size is not zero.
   This List ID Offset Table allows you to start playing the PSD from
   lists other than the default List ID number. This table has a fixed length
   of 32 sectors and maps List ID numbers into List Offsets. It's got
   an entry for each List ID Number with the 16-bit offset. Note that
   List ID 1 has an offset of 0x0000. All unused or non-user-accessible
   entries must be 0xffff. */

#define LOT_VCD_OFFSETS ((1 << 15)-1)

typedef struct _LotVcd_tag {
  uint16_t reserved;  /* Reserved, must be zero */
  uint16_t offset[LOT_VCD_OFFSETS];  /* offset given in 8 byte units */
} GNUC_PACKED _LotVcd;

#define LotVcd_SIZEOF (32*ISO_BLOCKSIZE)

/* PSD.VCD
   The PSD controls the "user interaction" mode which can be used to make
   menus, etc. The PSD contains a set of Lists. Each List defines a set of
   Items which are played in sequence. An Item can be an mpeg track (in whole
   or part) or a Segment Play Item which can subsequently be mpeg video
   with or without audio, one more more mpeg still pictures (with or without
   audio) or mpeg audio only.

   The Selection List defines the action to be taken in response to a set
   of defined user actions: Next, Previous, Default Select, Numeric, Return.

   The End List terminates the control flow or switches to the next
   disc volume.

   Each list has a unique list id number. The first must be 1, the others can
   be anything (up to 32767).

   References to PSD list addresses are expressed as an offset into the PSD
   file. The offset indicated in the file must be multiplied by the Offset
   Multiplier found in the info file (although this seems to always have to
   be 8). Unused areas are filled with zeros. List ID 1 starts at offset 0.
*/

/* ...difficult to represent as monolithic C struct... */

typedef struct {
  uint8_t  type;        /* PSD_TYPE_END_LIST */
  uint8_t  next_disc;   /* 0x00 to stop PBC or 0xnn to switch to disc no nn */
  uint16_t change_pic;  /* 0 or 1000..2979, should be still image */
  uint8_t  reserved[4]; /* padded with 0x00 */
} GNUC_PACKED PsdEndListDescriptor;

#define PsdEndListDescriptor_SIZEOF 8

typedef struct {
#if defined(BITFIELD_LSBF)
  bool       SelectionAreaFlag : 1;
  bool       CommandListFlag : 1;
  bitfield_t reserved : 6;
#else
  bitfield_t reserved : 6;
  bool       CommandListFlag : 1;
  bool       SelectionAreaFlag : 1;
#endif  
} GNUC_PACKED PsdSelectionListFlags;

#define PsdSelectionListFlags_SIZEOF 1

typedef struct _PsdSelectionListDescriptor_tag {
  uint8_t type;
  PsdSelectionListFlags flags;
  uint8_t nos;
  uint8_t bsn;
  uint16_t lid;
  uint16_t prev_ofs;
  uint16_t next_ofs;
  uint16_t return_ofs;
  uint16_t default_ofs;
  uint16_t timeout_ofs;
  uint8_t totime;
  uint8_t loop;
  uint16_t itemid;
  uint16_t ofs[EMPTY_ARRAY_SIZE]; /* variable length */
  /* PsdSelectionListDescriptorExtended */
} GNUC_PACKED _PsdSelectionListDescriptor;

#define PsdSelectionListDescriptor_SIZEOF 20

typedef struct {
  struct psd_area_t prev_area;
  struct psd_area_t next_area;
  struct psd_area_t return_area;
  struct psd_area_t default_area;
  struct psd_area_t area[EMPTY_ARRAY_SIZE]; /* variable length */
} GNUC_PACKED PsdSelectionListDescriptorExtended;

#define PsdSelectionListDescriptorExtended_SIZEOF 16

typedef struct {
  uint8_t type;
  uint16_t command_count;
  uint16_t lid;
  uint16_t command[EMPTY_ARRAY_SIZE]; /* variable length */
} GNUC_PACKED PsdCommandListDescriptor;

#define PsdCommandListDescriptor_SIZEOF 5

typedef struct  _PsdPlayListDescriptor_tag {
  uint8_t type;
  uint8_t noi;  /* number of items */
  uint16_t lid; /* list id: high-bit means this list is rejected in
                   the LOT (also, can't use 0) */
  uint16_t prev_ofs; /* previous list offset (0xffff disables) */
  uint16_t next_ofs; /* next list offset (0xffff disables) */
  uint16_t return_ofs; /* return list offset (0xffff disables) */
  uint16_t ptime; /* play time in 1/15 s, 0x0000 meaning full item */
  uint8_t  wtime; /* delay after, in seconds, if 1 <= wtime <= 60 wait
                     is wtime else if 61 <= wtime <= 254 wait is
                     (wtime-60) * 10 + 60 else wtime == 255 wait is
                     infinite  */
  uint8_t  atime; /* auto pause wait time calculated same as wtime,
                     used for each item in list if the auto pause flag
                     in a sector is true */
  uint16_t itemid[EMPTY_ARRAY_SIZE]; /* item number
                                           0 <= n <= 1      - play nothing
                                           2 <= n <= 99     - play track n
                                         100 <= n <= 599    - play entry
                                                       (n - 99) from entries
                                                       table to end of track
                                         600 <= n <= 999    - reserved
                                        1000 <= n <= 2979   - play segment
                                                       play item (n - 999)
                                        2980 <= n <= 0xffff - reserved */
} GNUC_PACKED _PsdPlayListDescriptor;

#define PsdPlayListDescriptor_SIZEOF 14

/* TRACKS.SVD
   SVCD\TRACKS.SVD is a mandatory file which describes the numbers and types
   of MPEG tracks on the disc. */

/* SVDTrackContent indicates the audio/video content of an MPEG Track */

typedef struct {
#if defined(BITFIELD_LSBF)
  bitfield_t audio : 2;                      /* Audio Content
                                             0x00 : No MPEG audio stream
                                             0x01 : One MPEG{1|2} audio stream
                                             0x02 : Two MPEG{1|2} streams
                                             0x03 : One MPEG2 multi-channel
                                                    audio stream with
                                                    extension */
  bitfield_t video : 3;                      /* Video Content
                                             0x00 : No MPEG video
                                             0x03 : NTSC video
                                             0x07 : PAL video */
  bool       reserved1 : 1;                  /* Reserved, must be zero */
  bitfield_t ogt : 2;                        /* 0x0 - no OGT substream 
                                             0x1 - sub-stream 0 available
                                             0x2 - sub-stream 0 & 1 available
                                             0x3 - all OGT sub-substreams 
                                                   available */
#else
  bitfield_t ogt : 2;
  bool       reserved1 : 1;
  bitfield_t video : 3;
  bitfield_t audio : 2;
#endif
} GNUC_PACKED SVDTrackContent;

#define SVDTrackContent_SIZEOF 1

/* The file contains a series of structures, one for each
   track, which indicates the track's playing time (in sectors, not actually
   real time) and contents. */

#define TRACKS_SVD_FILE_ID  "TRACKSVD"
#define TRACKS_SVD_VERSION  0x01

typedef struct {
  char file_id[8];  /* == "TRACKSVD" */
  uint8_t version;  /* == 0x01 */
  uint8_t reserved; /* Reserved, must be zero */
  uint8_t tracks; /* number of MPEG tracks */
  msf_t playing_time[EMPTY_ARRAY_SIZE]; /* per track, BCD coded
                                           mm:ss:ff */
} GNUC_PACKED TracksSVD;

#define TracksSVD_SIZEOF 11

typedef struct {
  /* TracksSVD tracks_svd; */
  SVDTrackContent contents[1]; /* should be [], but C99 doesn't allow it
                                  indicates track contents */
} GNUC_PACKED TracksSVD2;

#define TracksSVD2_SIZEOF SVDTrackContent_SIZEOF

/* VCD30 tracks svd */

typedef struct {
  char file_id[8]; /* == "TRACKSVD" */
  uint8_t version; /* == 0x01 */
  uint8_t reserved; /* Reserved, must be zero */
  uint8_t tracks; /* number of MPEG tracks */
  struct {
    msf_t cum_playing_time; /* BCD coded mm:ss:ff */
    uint8_t ogt_info;
    uint8_t audio_info;
  } GNUC_PACKED track[EMPTY_ARRAY_SIZE];
} GNUC_PACKED TracksSVD_v30;

#define TracksSVD_v30_SIZEOF 11

/* SEARCH.DAT
   This file defines where the scan points are. It covers all mpeg tracks
   together. A scan point at time T is the nearest I-picture in the MPEG
   stream to the given time T. Scan points are given at every half-second
   for the entire duration of the disc. */

#define SEARCH_FILE_ID        "SEARCHSV"
#define SEARCH_VERSION        0x01
#define SEARCH_TIME_INTERVAL  0x01

typedef struct {
  char file_id[8]; /* = "SEARCHSV" */
  uint8_t version; /* = 0x01 */
  uint8_t reserved; /* Reserved, must be zero */
  uint16_t scan_points; /* the number of scan points */
  uint8_t time_interval; /* The interval of time in
                            between scan points, in units
                            of 0.5 seconds, must be 0x01 */
  msf_t points[EMPTY_ARRAY_SIZE]; /* The series of scan points */
} GNUC_PACKED SearchDat;

#define SearchDat_SIZEOF 13

/* SPICONTX.SVD 
 */

#define SPICONTX_FILE_ID      "SPICONSV"
#define SPICONTX_VERSION      0x01

typedef struct {
  char file_id[8]; /* = "SPICONSV" */
  uint8_t version; /* = 0x01 */
  uint8_t reserved; /* Reserved, must be zero */
  struct {
    uint8_t ogt_info;
    uint8_t audio_info;
  } GNUC_PACKED spi[MAX_SEGMENTS];
  uint8_t reserved2[126]; /* 0x00 */
} GNUC_PACKED SpicontxSvd;

#define SpicontxSvd_SIZEOF (2*ISO_BLOCKSIZE)

/* SCANDATA.DAT for VCD 2.0 */

#define SCANDATA_FILE_ID "SCAN_VCD"
#define SCANDATA_VERSION_VCD2 0x02
#define SCANDATA_VERSION_SVCD 0x01

typedef struct {
  char file_id[8]; /* = "SCAN_VCD" */
  uint8_t version; /* = 0x02 */
  uint8_t reserved; /* Reserved, must be zero */
  uint16_t scan_points; /* the number of scan points */
  msf_t points[EMPTY_ARRAY_SIZE]; /* actual scan points 
                                              points[time(iframe)/0.5] */
} GNUC_PACKED ScandataDat_v2;

#define ScandataDat_v2_SIZEOF 12

/* SCANDATA.DAT for SVCD
   This file fulfills much the same purpose of the SEARCH.DAT file except
   that this file is mandatory only if the System Profile Tag of the
   INFO.SVD file is 0x01 (HQ-VCD) and also that it contains sector addresses
   also for each video Segment Play Items in addition to the regular MPEG
   tracks. */

typedef struct {
  char file_id[8]; /* = "SCAN_VCD" */
  uint8_t version; /* = 0x01 */
  uint8_t reserved; /* Reserved, must be zero */
  uint16_t scandata_count; /* number of 3-byte entries in
                                              the table */
  uint16_t track_count; /* number of mpeg tracks on disc */
  uint16_t spi_count; /* number of consecutively recorded
                                              play item segments (as opposed
                                              to the number of segment play
                                              items). */
  msf_t cum_playtimes[EMPTY_ARRAY_SIZE]; /* cumulative playing
                                              time up to track
                                              N. Track time just wraps
                                              at 99:59:74 */
} GNUC_PACKED ScandataDat1;

#define ScandataDat1_SIZEOF 16

typedef struct {
  /* ScandataDat head; */
  uint16_t spi_indexes[1]; /* should be [], but C doesn't allow that;
                              Indexes into the following scandata
                              table */
} GNUC_PACKED ScandataDat2;

#define ScandataDat2_SIZEOF sizeof(uint16_t)

typedef struct {
  /* ScandataDat2 head; */
  uint16_t mpegtrack_start_index; /* Index into the
                                     following scandata table
                                     where the MPEG track
                                     scan points start */
  
  /* The scandata table starts here */
  struct {
    uint8_t track_num;   /* Track number as in TOC */
    uint16_t table_offset;   /* Index into scandata table */
  } GNUC_PACKED mpeg_track_offsets[EMPTY_ARRAY_SIZE];
} GNUC_PACKED ScandataDat3;

#define ScandataDat3_SIZEOF 2

typedef struct {
  /* ScandataDat3 head; */
  msf_t scandata_table[1]; /* should be [] but C99 doesn't allow that */
} GNUC_PACKED ScandataDat4;

#define ScandataDat4_SIZEOF msf_t_SIZEOF

PRAGMA_END_PACKED

#endif /* __VCD_FILES_PRIVATE_H__ */


/* 
 * Local variables:
 *  c-file-style: "gnu"
 *  tab-width: 8
 *  indent-tabs-mode: nil
 * End:
 */

--- NEW FILE: inf.h ---
/*!
   \file inf.h

    Copyright (C) 2002,2003 Rocky Bernstein <rocky@panix.com>

 \verbatim
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Foundation
    Software, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 \endverbatim
*/

/* 
   Things here refer to lower-level structures using a structure other
   than vcdinfo_t. For higher-level structures via the vcdinfo_t, see
   info.h
*/

#ifndef _VCD_INF_H
#define _VCD_INF_H

#include <cdio/iso9660.h>
#include <libvcd/info.h>
  
  const char * vcdinf_area_str (const struct psd_area_t *_area);

  /*!
    Return a string containing the VCD album id.
  */
  const char * vcdinf_get_album_id(const InfoVcd *info);

  /*!
    Return the VCD application ID.
    NULL is returned if there is some problem in getting this. 
  */
  const char * vcdinf_get_application_id(const iso9660_pvd_t *pvd);

  /*!
    Get autowait time value for PsdPlayListDescriptor *d.
    Time is in seconds unless it is -1 (unlimited).
  */
  int vcdinf_get_autowait_time (const PsdPlayListDescriptor *d);
  
  /*!
    Return the base selection number. VCD_INVALID_BSN is returned if there
    is an error.
  */
  unsigned int vcdinf_get_bsn(const PsdSelectionListDescriptor *psd);
  
  /*!  Return the starting LBA (logical block address) for sequence
    entry_num in obj.  VCDINFO_NULL_LBA is returned if there is no entry.
    The first entry number is 0.
  */
  lba_t vcdinf_get_entry_lba(const EntriesVcd *entries, 
			     unsigned int entry_num);

  const char * vcdinf_get_format_version_str (vcd_type_t vcd_type);

  /*!
    Return loop count. 0 is infinite loop.
  */
  uint16_t vcdinf_get_loop_count (const PsdSelectionListDescriptor *psd);
  
  /*!
    Return LOT offset
  */
  uint16_t vcdinf_get_lot_offset (const LotVcd *lot, unsigned int n);

  /*!
    Return a string containing the VCD preparer id with trailing
    blanks removed.
    NULL is returned if there is some problem in getting this. 
  */
  const char * vcdinf_get_preparer_id(const iso9660_pvd_t *pvd);

  /*!
    Return number of bytes in PSD. 
  */
  uint32_t vcdinf_get_psd_size (const InfoVcd *info);
       
  /*!
    Return a string containing the VCD publisher id with trailing
    blanks removed.
    NULL is returned if there is some problem in getting this. 
  */
  const char * vcdinf_get_publisher_id(const iso9660_pvd_t *pvd);
    
  /*!
    Return the number of segments in the VCD. 
  */
  unsigned int vcdinf_get_num_entries(const EntriesVcd *entries);

  /*!
    Return number of LIDs. 
  */
  lid_t vcdinf_get_num_LIDs (const InfoVcd *info);

  /*!
    Return the number of segments in the VCD. 
  */
  segnum_t vcdinf_get_num_segments(const InfoVcd *info);

  /*!
    Return the number of menu selections for selection-list descriptor d.
  */
  unsigned int vcdinf_get_num_selections(const PsdSelectionListDescriptor *d);

  /*!
    Get play-time value for PsdPlayListDescriptor *d.
    Time is in 1/15-second units.
  */
  uint16_t vcdinf_get_play_time (const PsdPlayListDescriptor *d);
  
  /*!
    Return a string containing the VCD system id with trailing
    blanks removed.
    NULL is returned if there is some problem in getting this. 
  */
  const char * vcdinf_get_system_id(const iso9660_pvd_t *pvd);
  
  /*!
    Get timeout offset for PsdPlayListDescriptor *d. Return 
    VCDINFO_INVALID_OFFSET if d is NULL;
    Time is in seconds unless it is -1 (unlimited).
  */
  uint16_t vcdinf_get_timeout_offset (const PsdSelectionListDescriptor *d);
  
  /*!
    Get timeout wait value for PsdPlayListDescriptor *d.
    Time is in seconds unless it is -1 (unlimited).
  */
  int vcdinf_get_timeout_time (const PsdSelectionListDescriptor *d);
  
  /*!
    Return the track number for entry n in obj. The first track starts
    at 1. 
  */
  track_t vcdinf_get_track(const EntriesVcd *entries, 
			   const unsigned int entry_num);

  /*!
    Return the VCD volume num - the number of the CD in the collection.
    This is a number between 1 and the volume count.
  */
  unsigned int vcdinf_get_volume_num(const InfoVcd *info);
  
  /*!
    Return the VCD volume count - the number of CD's in the collection.
  */
  unsigned int vcdinf_get_volume_count(const InfoVcd *info);

  /*!
    Return the VCD ID.
    NULL is returned if there is some problem in getting this. 
  */
  const char * vcdinf_get_volume_id(const iso9660_pvd_t *pvd);

  /*!
    Return the VCD volumeset ID.
    NULL is returned if there is some problem in getting this. 
  */
  const char * vcdinf_get_volumeset_id(const iso9660_pvd_t *pvd);

  /*!
    Get wait time value for PsdPlayListDescriptor *d.
    Time is in seconds unless it is -1 (unlimited).
  */
  int vcdinf_get_wait_time (const PsdPlayListDescriptor *d);
  
  /*!
    Return true if loop has a jump delay
  */
  bool vcdinf_has_jump_delay (const PsdSelectionListDescriptor *psd);

  /*!
    Comparison routine used in sorting. We compare LIDs and if those are 
    equal, use the offset.
    Note: we assume an unassigned LID is 0 and this compares as a high value.

    NOTE: Consider making static.
  */
  int vcdinf_lid_t_cmp (vcdinfo_offset_t *a, vcdinfo_offset_t *b);

  /**
     \fn vcdinf_pld_get_next_offset(const PsdPlayListDescriptor *pld); 
     \brief  Get next offset for a given PSD selector descriptor.  
     \return  VCDINFO_INVALID_OFFSET is returned on error or if pld has no 
     "next" entry or pld is NULL. Otherwise the LID offset is returned.
  */
  uint16_t vcdinf_pld_get_next_offset(const PsdPlayListDescriptor *pld);
  
  /*!
    Get the LID from a given play-list descriptor. 
    VCDINFO_REJECTED_MASK is returned on error or pld is NULL. 
  */
  uint16_t vcdinf_pld_get_lid(const PsdPlayListDescriptor *pld);
  
  /*!
    Return the playlist item i in d. 
  */
  uint16_t vcdinf_pld_get_play_item(const PsdPlayListDescriptor *pld, 
				    unsigned int i);

  /**
     \fn vcdinf_pld_get_prev_offset(const PsdSelectionListDescriptor *pld);
     \brief Get prev offset for a given PSD selector descriptor. 
     \return  VCDINFO_INVALID_OFFSET is returned on error or if pld has no 
     "prev" entry or pld is NULL. Otherwise the LID offset is returned.
  */
  uint16_t vcdinf_pld_get_prev_offset(const PsdPlayListDescriptor *pld);
  
  /**
     \fn vcdinf_pld_get_return_offset(const PsdPlayListDescriptor *pld);
     \brief Get return offset for a given PLD selector descriptor. 
     \return  VCDINFO_INVALID_OFFSET is returned on error or if pld has no 
     "return" entry or pld is NULL. Otherwise the LID offset is returned.
  */
  uint16_t vcdinf_pld_get_return_offset(const PsdPlayListDescriptor *pld);

  /*!
    Return number of items in LIDs. Return 0 if error or not found.
  */
  int vcdinf_pld_get_noi (const PsdPlayListDescriptor *pld);
  
  /**
   * \fn vcdinfo_psd_get_default_offset(const PsdSelectionListDescriptor *psd);
   * \brief Get next offset for a given PSD selector descriptor. 
   * \return VCDINFO_INVALID_OFFSET is returned on error or if psd is
   * NULL. Otherwise the LID offset is returned.
   */
  uint16_t vcdinf_psd_get_default_offset(const PsdSelectionListDescriptor *psd);

  /*!
    Get the item id for a given selection-list descriptor. 
    VCDINFO_REJECTED_MASK is returned on error or if psd is NULL. 
  */
  uint16_t vcdinf_psd_get_itemid(const PsdSelectionListDescriptor *psd);

  /*!
    Get the LID from a given selection-list descriptor. 
    VCDINFO_REJECTED_MASK is returned on error or psd is NULL. 
  */
  uint16_t vcdinf_psd_get_lid(const PsdSelectionListDescriptor *psd);
  
  /*!
    Get the LID rejected status for a given selection-list descriptor. 
  true is also returned d is NULL. 
  */
  bool
  vcdinf_psd_get_lid_rejected(const PsdSelectionListDescriptor *psd);
  
  /**
     \fn vcdinf_psd_get_next_offset(const PsdSelectionListDescriptor *psd);
     \brief Get "next" offset for a given PSD selector descriptor. 
     \return  VCDINFO_INVALID_OFFSET is returned on error or if psd has no 
     "next" entry or psd is NULL. Otherwise the LID offset is returned.
  */
  lid_t vcdinf_psd_get_next_offset(const PsdSelectionListDescriptor *psd);
  
  /*!
    \brief Get offset entry_num for a given PSD selector descriptor. 
    \param d PSD selector containing the entry_num we query
    \param entry_num entry number that we want the LID offset for.
    \return VCDINFO_INVALID_OFFSET is returned if d on error or d is
  NULL. Otherwise the LID offset is returned.
  */
  uint16_t vcdinf_psd_get_offset(const PsdSelectionListDescriptor *d, 
				 unsigned int entry_num);
  /**
     \fn vcdinf_psd_get_prev_offset(const PsdPlayListDescriptor *psd);
     \brief Get "prev" offset for a given PSD selector descriptor. 
     \return  VCDINFO_INVALID_OFFSET is returned on error or if psd has no 
     "prev"
     entry or psd is NULL. Otherwise the LID offset is returned.
  */
  uint16_t vcdinf_psd_get_prev_offset(const PsdSelectionListDescriptor *psd);
  
  /**
   * \fn vcdinf_psd_get_return_offset(const PsdSelectionListDescriptor *psd);
   * \brief Get "return" offset for a given PSD selector descriptor. 
   \return  VCDINFO_INVALID_OFFSET is returned on error or if psd has no 
   "return" entry or psd is NULL. Otherwise the LID offset is returned.
  */
  uint16_t vcdinf_psd_get_return_offset(const PsdSelectionListDescriptor *psd);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /*_VCD_INF_H*/