Commit ec13ec24 authored by Reinhard Tartler's avatar Reinhard Tartler

Imported Upstream version 4.1.4-1219

parent 0b7064f4
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
......@@ -56,7 +56,7 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
......@@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
......@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
......
libdvdread (4.1.4)
* added OS/2 support
* fixed ARM memory alignment issue
* portability fixes for *BSD, Mac OS X and MINGW
* added a missing DVDFileStat function
libdvdread (4.1.3)
* an embarassing amount of fixes regarding potential memory and resource leaks
(patches contributed by Erik Hovland)
......@@ -114,7 +120,7 @@ libdvdnav (0.1.0-1.1) unstable; urgency=low
(see patch from Jamie Wilkinson for a better solution)
-- Siggi Langauf <siggi@debian.org> Mon, 20 May 2002 15:57:40 +0200
libdvdnav (0.0.1-1) unstable; urgency=low
* Repackaged using dh-make.
......
......@@ -18,15 +18,15 @@ DVDREAD_L=libdvdread
DVDREAD_LIB = $(DVDREAD_L).a
DVDREAD_SHLIB = $(DVDREAD_L).so
VPATH+= $(SRC_PATH_BARE)/src
DVDREAD_HEADERS = src/dvd_reader.h \
src/ifo_print.h \
src/ifo_read.h \
src/ifo_types.h \
src/nav_print.h \
src/nav_read.h \
src/dvd_udf.h \
src/nav_types.h \
src/bitreader.h
DVDREAD_HEADERS = src/dvdread/dvd_reader.h \
src/dvdread/ifo_print.h \
src/dvdread/ifo_read.h \
src/dvdread/ifo_types.h \
src/dvdread/nav_print.h \
src/dvdread/nav_read.h \
src/dvdread/dvd_udf.h \
src/dvdread/nav_types.h \
src/dvdread/bitreader.h
DVDREAD_SRCS = dvd_input.c dvd_reader.c dvd_udf.c ifo_print.c ifo_read.c \
md5.c nav_print.c nav_read.c bitreader.c
CFLAGS += -I$(SRC_PATH)/src
......@@ -67,7 +67,7 @@ endif
version.h:
sh $(SRC_PATH)/version.sh $(SRC_PATH) "$(SHLIB_VERSION)"
$(SRCS) $(DVDREAD_SRCS): version.h
......
#!/bin/sh
#
# $Id: autogen.sh 1128 2008-08-30 22:32:00Z rathann $
#
# run this to generate all the initial makefiles, etc.
srcdir=`dirname "$0"`
......
......@@ -14,11 +14,11 @@ dnl These are defined in m4 so they can be passed to AC_INIT
dnl --------------------------------------------------------------
m4_define([dvdread_major], [4])
m4_define([dvdread_minor], [1])
m4_define([dvdread_sub], [3])
m4_define([dvdread_sub], [4])
m4_define([dvdread_pre], [])
AC_INIT([libdvdread], [dvdread_major.dvdread_minor.dvdread_sub[]dvdread_pre])
AC_CONFIG_SRCDIR([src/dvd_reader.h])
AC_CONFIG_SRCDIR([src/dvdread/dvd_reader.h])
AM_INIT_AUTOMAKE([1.6])
dnl create a config.h file (Automake will add -DHAVE_CONFIG_H)
......@@ -35,7 +35,7 @@ AC_SUBST(DVDREAD_MINOR)
AC_SUBST(DVDREAD_SUB)
dnl The libtool version numbers (DVDREAD_LT_*); Don't even think about faking this!
dnl
dnl
dnl immediately before every release do:
dnl ===================================
dnl if (the interface is totally unchanged from previous release)
......@@ -48,7 +48,7 @@ dnl AGE ++;
dnl if (any interfaces have been _removed_ or _incompatibly changed_)
dnl AGE = 0;
dnl }
dnl
dnl
dnl If you want to know more about what you are doing, here are some details:
dnl * DVDREAD_LT_CURRENT is the current API version
dnl * DVDREAD_LT_REVISION is an internal revision number which is increased when the API
......@@ -145,12 +145,15 @@ case $host in
*cygwin*)
LDFLAGS="-no-undefined $LDFLAGS"
;;
*os2*)
LDFLAGS="-no-undefined -Zbin-files $LDFLAGS"
;;
*)
AC_CHECK_LIB(c, dlopen,
DYNAMIC_LD_LIBS="",
AC_CHECK_LIB(dl, dlopen,
DYNAMIC_LD_LIBS="-ldl",
AC_MSG_ERROR(dynamic linker needed)))
DYNAMIC_LD_LIBS="",
AC_CHECK_LIB(dl, dlopen,
DYNAMIC_LD_LIBS="-ldl",
AC_MSG_ERROR(dynamic linker needed)))
AC_SUBST(DYNAMIC_LD_LIBS)
;;
esac
......@@ -164,26 +167,6 @@ DEBUG_CFLAGS="-g -DDEBUG $CFLAGS"
AC_SUBST(DEBUG_CFLAGS)
dnl ---------------------------------------------
dnl Get where .m4 should be installed.
dnl ---------------------------------------------
case "`id`" in
uid=0\(* )
AC_MSG_CHECKING(for aclocal directory)
if (aclocal --version) < /dev/null > /dev/null 2>&1; then
ACLOCAL_DIR="`eval $ACLOCAL --print-ac-dir`"
AC_MSG_RESULT($ACLOCAL_DIR)
else
ACLOCAL_DIR="/usr/local/share/aclocal"
AC_MSG_RESULT(none - will be installed in $ACLOCAL_DIR)
fi
escapedprefix="`echo $prefix | sed -e 's/\\//\\\\\//g'`"
ACLOCAL_DIR="`echo $ACLOCAL_DIR|sed -e 's/^'$escapedprefix/'\${prefix}'/`"
AC_SUBST(ACLOCAL_DIR)
;;
esac
AM_CONDITIONAL(INSTALL_M4, test x"$ACLOCAL_DIR" != "x")
dnl ---------------------------------------------
dnl Check for doxygen (dynamic documentation generator)
dnl ---------------------------------------------
......@@ -199,7 +182,7 @@ dnl ---------------------------------------------
dnl Output configuration files
dnl ---------------------------------------------
AC_OUTPUT([
Makefile
Makefile
src/Makefile
misc/Makefile
misc/dvdread-config
......
#!/bin/sh
dvdread_sh_version=4.1.3
dvdread_sh_version=4.1.4
dvdread_sh_major=`echo $dvdread_sh_version | awk -F. '{print $1}'`
cc=gcc
......@@ -108,7 +108,20 @@ case $targetos in
;;
esac
cat > config.mak << EOF
echo -n "Checking if we're big-endian... "
bigendian=no
TMPD=`mktemp -d`
TMPC=$TMPD/endian.c
TMPO=$TMPD/endian.o
cat > $TMPC <<EOF
unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
EOF
$cc $optimizations $cflags -c -o $TMPO $TMPC
od -A n -t x1 $TMPO | grep -q '42 *49 *47 *45' && bigendian=yes
rm -rf $TMPD
echo "$bigendian"
cat > config.mak << EOF
# Automatically generated by configure, do not edit
PREFIX=$PREFIX
libdir=$libdir
......@@ -136,6 +149,7 @@ cat > config.h << EOF
/* Automatically generated by configure, do not edit */
#include "version.h"
EOF
test "$bigendian" == "yes" && echo "#define WORDS_BIGENDIAN" || echo "#undef WORDS_BIGENDIAN" >> config.h
# build tree in object directory if source path is different from current one
if test "$source_path_used" != "no"; then
......
......@@ -2,10 +2,6 @@ include $(top_srcdir)/misc/Makefile.common
EXTRA_DIST = dvdread.m4
if INSTALL_M4
m4datadir = @ACLOCAL_DIR@
else
m4datadir = $(datadir)/aclocal
endif
m4data_DATA = dvdread.m4
......@@ -8,20 +8,20 @@ exec_prefix_set=no
usage()
{
cat <<EOF
cat <<EOF
Usage: dvdnav-config [OPTIONS] [LIBRARIES]
Options:
[--prefix[=DIR]]
[--exec-prefix[=DIR]]
[--version]
[--prefix[=DIR]]
[--exec-prefix[=DIR]]
[--version]
[--libs]
[--cflags]
[--cflags]
EOF
exit $1
exit $1
}
if test $# -eq 0; then
usage 1 1>&2
usage 1 1>&2
fi
while test $# -gt 0; do
......@@ -64,11 +64,11 @@ while test $# -gt 0; do
done
if test "$echo_prefix" = "yes"; then
echo $prefix
echo $prefix
fi
if test "$echo_exec_prefix" = "yes"; then
echo $exec_prefix
echo $exec_prefix
fi
if test "$echo_cflags" = "yes"; then
......
......@@ -2,19 +2,19 @@ dvdreadlib="-ldvdread"
usage()
{
cat <<EOF
cat <<EOF
Usage: dvdread-config [OPTIONS] [LIBRARIES]
Options:
[--prefix[=DIR]]
[--version]
[--prefix[=DIR]]
[--version]
[--libs]
[--cflags]
[--cflags]
EOF
exit $1
exit $1
}
if test $# -eq 0; then
usage 1 1>&2
usage 1 1>&2
fi
while test $# -gt 0; do
......@@ -44,7 +44,7 @@ while test $# -gt 0; do
done
if test "$echo_prefix" = "yes"; then
echo $prefix
echo $prefix
fi
if test "$echo_cflags" = "yes"; then
......@@ -53,4 +53,4 @@ fi
if test "$echo_libs" = "yes"; then
echo -L$libdir $dvdreadlib
fi
fi
%define prefix @prefix@
%define prefix @prefix@
%define name @PACKAGE_NAME@
%define ver @PACKAGE_VERSION@
%define rel 0
Name: %{name}
Summary: Low level DVD access library
Version: %{ver}
Release: %{rel}
Group: Development/Libraries
Copyright: GPL
Url: http://dvd.sourceforge.net/
Source: %{name}-%{version}.tar.gz
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
Name: %{name}
Summary: Low level DVD access library
Version: %{ver}
Release: %{rel}
Group: Development/Libraries
Copyright: GPL
Url: http://dvd.sourceforge.net/
Source: %{name}-%{version}.tar.gz
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
%description
libdvdread provides support to applications wishing to make use of basic
......@@ -21,7 +21,7 @@ DVD reading features.
%setup
%build
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix}
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix}
make
%install
......
......@@ -14,7 +14,7 @@ getdir() {
else
filelist=`ls`
fi
for file in $filelist; do
if test -d $file -a $file != "CVS" -a $file != $distdir; then
......@@ -33,7 +33,7 @@ getdir() {
if test ! -e $distfile; then
missingfile=${orifile##$topdir}
echo "${missingfile#/} is missing in tarball" >> $logerror
echo "${missingfile#/} is missing in tarball" >> $logerror
fi
fi
......@@ -60,7 +60,7 @@ main() {
echo " * Log is ${log##*/}"
echo " * Error log is ${logerror##*/}"
}
main
/* config.h. Generated by hand. */
#ifndef LIBDVDREAD_CONFIG_H
#define LIBDVDREAD_CONFIG_H
#define HAVE_DLFCN_H 1
/* #undef HAVE_DVDCSS_DVDCSS_H*/
/* #undef HAVE_INTTYPES_H */
......@@ -49,3 +52,5 @@ typedef signed int int32_t;
typedef unsigned __int64 uint64_t;
typedef signed __int64 int64_t;
typedef unsigned int uintptr_t;
#endif /* LIBDVDREAD_CONFIG_H */
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
/*
* $Id: dlfcn.c 1135 2008-09-06 21:55:51Z rathann $
* $Name$
*
* Adopted from Apache DSO code.
* Portions copyright Apache Software Foundation
*
......
This diff is collapsed.
......@@ -14,8 +14,8 @@
* 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
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* WIN32 PORT,
* by Matthew Grooms <elon@altavista.com>
......@@ -28,75 +28,75 @@
#include "timer.h"
/*
this function returns somewhat
accurate unix time with the data
accurate to the first call to get
of day and the resolution accurate
to ~ miliseconds.
this function returns somewhat
accurate unix time with the data
accurate to the first call to get
of day and the resolution accurate
to ~ miliseconds.
*/
static time_t startseconds = 0;
int gettimeofday( struct timeval *tp, struct timezone *tzp )
{
MMTIME mmtime;
MMTIME mmtime;
// clock() returns time in miliseconds
// clock() returns time in miliseconds
if( !startseconds )
startseconds = time( 0 );
if( !startseconds )
startseconds = time( 0 );
timeGetSystemTime( &mmtime, sizeof( mmtime ) );
timeGetSystemTime( &mmtime, sizeof( mmtime ) );
tp->tv_sec = ( mmtime.u.ms / 1000 ) + startseconds;
tp->tv_usec = ( mmtime.u.ms % 1000 ) * 1000;
tp->tv_sec = ( mmtime.u.ms / 1000 ) + startseconds;
tp->tv_usec = ( mmtime.u.ms % 1000 ) * 1000;
return 0;
return 0;
};
/*
These functions are designed to mimick
a subset of itimer for use with the
alarm signal on win32. This is just
enough for xine to work.
These functions are designed to mimick
a subset of itimer for use with the
alarm signal on win32. This is just
enough for xine to work.
*/
static HANDLE sigalarm = 0;
int setitimer( int which, struct itimerval * value, struct itimerval *ovalue )
{
long int miliseconds;
long int miliseconds;
if( !sigalarm )
sigalarm = CreateEvent( 0, FALSE, TRUE, "SIGALARM" );
if( !sigalarm )
sigalarm = CreateEvent( 0, FALSE, TRUE, "SIGALARM" );
miliseconds = value->it_value.tv_usec / 1000;
timeSetEvent( miliseconds, 0, ( LPTIMECALLBACK ) sigalarm, 0, TIME_PERIODIC | TIME_CALLBACK_EVENT_PULSE );
timeSetEvent( miliseconds, 0, ( LPTIMECALLBACK ) sigalarm, 0, TIME_PERIODIC | TIME_CALLBACK_EVENT_PULSE );
return 0;
return 0;
}
/*
Wait for sigalarm to wake the thread
Wait for sigalarm to wake the thread
*/
int pause( void )
{
WaitForSingleObject( sigalarm, INFINITE );
WaitForSingleObject( sigalarm, INFINITE );
return 0;
return 0;
}
int nanosleep( const struct timespec * rqtp, struct timespec * rmtp )
{
Sleep( rqtp->tv_nsec / 1000000 );
Sleep( rqtp->tv_nsec / 1000000 );
return 0;
return 0;
}
unsigned int sleep( unsigned int seconds )
{
Sleep( seconds * 1000 );
return 0;
}
\ No newline at end of file
Sleep( seconds * 1000 );
return 0;
}
......@@ -5,23 +5,23 @@
#ifndef _ITIMER_
#define _ITIMER_
#define ITIMER_REAL 0
#define ITIMER_VIRTUAL 1
#define ITIMER_REAL 0
#define ITIMER_VIRTUAL 1
// time reference
// ----------------------------------
// time reference
// ----------------------------------
//
// 1,000 milliseconds / sec
// 1,000,000 microseconds / sec
// 1,000,000,000 nanoseconds / sec
// 1,000 milliseconds / sec
// 1,000,000 microseconds / sec
// 1,000,000,000 nanoseconds / sec
//
// timeval.time_sec = seconds
// timeval.time_usec = microseconds
struct itimerval
{
struct timeval it_interval; /* timer interval */
struct timeval it_value; /* current value */
struct timeval it_interval; /* timer interval */
struct timeval it_value; /* current value */
};
struct timezone {
......@@ -36,4 +36,4 @@ int pause( void );
unsigned int sleep( unsigned int seconds );
int nanosleep( const struct timespec *rqtp, struct timespec *rmtp );
#endif
\ No newline at end of file
#endif
File mode changed from 100755 to 100644
#ifndef __DLFCN_H__
# define __DLFCN_H__
/*
* $Id: dlfcn.h 1135 2008-09-06 21:55:51Z rathann $
* $Name$
*
*
*/
extern void *dlopen (const char *file, int mode);
extern int dlclose (void *handle);
extern void *dlsym (void * handle, const char * name);
......@@ -14,10 +9,10 @@ extern char *dlerror (void);
/* These don't mean anything on windows */
#define RTLD_NEXT ((void *) -1l)
#define RTLD_DEFAULT ((void *) 0)
#define RTLD_LAZY -1
#define RTLD_NOW -1
#define RTLD_LAZY -1
#define RTLD_NOW -1
#define RTLD_BINDING_MASK -1
#define RTLD_NOLOAD -1
#define RTLD_GLOBAL -1
#define RTLD_NOLOAD -1
#define RTLD_GLOBAL -1
#endif /* __DLFCN_H__ */
......@@ -14,16 +14,13 @@
* 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
*
* $Id: dvdnav_internal.h 1135 2008-09-06 21:55:51Z rathann $
*
* You should have received a copy of the GNU General Public License along
* with libdvdnav; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef DVDNAV_INTERNAL_H_INCLUDED
#define DVDNAV_INTERNAL_H_INCLUDED
#ifndef LIBDVDREAD_DVDNAV_INTERNAL_H
#define LIBDVDREAD_DVDNAV_INTERNAL_H
#ifdef HAVE_CONFIG_H
#include "config.h"
......@@ -182,4 +179,4 @@ struct dvdnav_s {
#define S_OK DVDNAV_STATUS_OK
#endif /* MSC_VER */
#endif /* DVDNAV_INTERNAL_H_INCLUDED */
#endif /* LIBDVDREAD_DVDNAV_INTERNAL_H */
......@@ -16,13 +16,13 @@
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
Floor, Boston, MA 02110-1301 USA. */
#ifndef _GETOPT_H
#define _GETOPT_H 1
#ifdef __cplusplus
#ifdef __cplusplus
extern "C"
{
#endif
......@@ -33,7 +33,7 @@ extern "C"
Also, when `ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
extern char *optarg;
extern char *optarg;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
......@@ -47,16 +47,16 @@ extern "C"
Otherwise, `optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
extern int optind;
extern int optind;
/* Callers store zero here to inhibit the error message `getopt' prints
for unrecognized options. */
extern int opterr;
extern int opterr;
/* Set to an option character which was unrecognized. */
extern int optopt;
extern int optopt;
/* Describe the long-named options requested by the application.
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
......@@ -79,56 +79,56 @@ extern "C"
one). For long options that have a zero `flag' field, `getopt'
returns the contents of the `val' field. */
struct option
{
struct option
{
#if defined (__STDC__) && __STDC__
const char *name;
const char *name;
#else
char *name;
char *name;
#endif
/* has_arg can't be an enum because some compilers complain about
type mismatches in all the code that assumes it is an int. */
int has_arg;
int *flag;
int val;
};
/* has_arg can't be an enum because some compilers complain about
type mismatches in all the code that assumes it is an int. */
int has_arg;
int *flag;
int val;
};
/* Names for the values of the `has_arg' field of `struct option'. */
#define no_argument 0
#define required_argument 1
#define optional_argument 2
#define no_argument 0
#define required_argument 1
#define optional_argument 2
#if defined (__STDC__) && __STDC__
#ifdef __GNU_LIBRARY__
/* Many other libraries have conflicting prototypes for getopt, with
differences in the consts, in stdlib.h. To avoid compilation
errors, only prototype getopt for the GNU C library. */
extern int getopt(int argc, char *const *argv, const char *shortopts);
#else /* not __GNU_LIBRARY__ */
extern int getopt();
#endif /* __GNU_LIBRARY__ */
extern int getopt_long(int argc, char *const *argv, const char *shortopts,
const struct option *longopts, int *longind);
extern int getopt_long_only(int argc, char *const *argv,
const char *shortopts,
const struct option *longopts, int *longind);
extern int getopt(int argc, char *const *argv, const char *shortopts);
#else /* not __GNU_LIBRARY__ */
extern int getopt();
#endif /* __GNU_LIBRARY__ */
extern int getopt_long(int argc, char *const *argv, const char *shortopts,
const struct option *longopts, int *longind);
extern int getopt_long_only(int argc, char *const *argv,
const char *shortopts,
const struct option *longopts, int *longind);
/* Internal only. Users should not call this directly. */
extern int _getopt_internal(int argc, char *const *argv,
const char *shortopts,
const struct option *longopts, int *longind,
int long_only);
#else /* not __STDC__ */
extern int getopt();
extern int getopt_long();
extern int getopt_long_only();
extern int _getopt_internal();
#endif /* __STDC__ */
#ifdef __cplusplus
extern int _getopt_internal(int argc, char *const *argv,
const char *shortopts,