[-]
[+]
|
Changed |
libdvdread.spec
|
|
[-]
[+]
|
Added |
libdvdread_udf.patch
^
|
@@ -0,0 +1,114 @@
+diff -ru libdvdread-0.9.7.orig/dvdread/dvd_input.c libdvdread-0.9.7/dvdread/dvd_input.c
+--- libdvdread-0.9.7.orig/dvdread/dvd_input.c 2005-09-19 15:43:08.000000000 +0200
++++ libdvdread-0.9.7/dvdread/dvd_input.c 2007-11-06 13:56:28.000000000 +0100
+@@ -376,6 +376,9 @@
+ }
+ #endif /* HAVE_DVDCSS_DVDCSS_H */
+
++
++ fprintf(stderr, "libdvdread patched to play DVDs with DVD-Movie-Protect\n");
++
+ dvdcss_library_init = 1;
+
+ if(dvdcss_library) {
+diff -ru libdvdread-0.9.7.orig/dvdread/dvd_udf.c libdvdread-0.9.7/dvdread/dvd_udf.c
+--- libdvdread-0.9.7.orig/dvdread/dvd_udf.c 2005-09-19 15:43:08.000000000 +0200
++++ libdvdread-0.9.7/dvdread/dvd_udf.c 2007-10-31 22:44:50.000000000 +0100
+@@ -39,6 +39,9 @@
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <errno.h>
++#ifndef __WIN32__
++#include <fnmatch.h>
++#endif
+
+ #if defined(HAVE_INTTYPES_H)
+ #include <inttypes.h>
+@@ -50,6 +53,9 @@
+ #include "dvd_udf.h"
+ #include "dvdread_internal.h"
+
++#include "ifo_types.h"
++#include "ifo_read.h"
++
+ #ifndef EMEDIUMTYPE
+ #define EMEDIUMTYPE ENOENT
+ #endif
+@@ -965,6 +971,77 @@
+ uint32_t UDFFindFile( dvd_reader_t *device, char *filename,
+ uint32_t *filesize )
+ {
++ uint32_t offset=0;
++#ifndef __WIN32__
++ if (!fnmatch("/VIDEO_TS/VTS_[0-9][0-9]_[0-9].???", filename, FNM_PATHNAME)) {
++#else
++ if (strlen("/VIDEO_TS/VTS_01_1.VOB") == strlen(filename)
++ && !strncmp(filename, "/VIDEO_TS/VTS_", strlen("/VIDEO_TS/VTS_")) ) {
++#endif
++ size_t len = strlen(filename);
++ char *extension = &filename[len-3];
++ if (!strcmp(extension, "IFO") || !strcmp(extension, "VOB")) {
++ int title = atoi(&filename[len-8]);
++ int part = atoi(&filename[len-5]);
++
++ ifo_handle_t *ifo_handle = ifoOpen(device, 0);
++ if (0 == ifo_handle)
++ return 0;
++
++ if (title > ifo_handle->tt_srpt->nr_of_srpts) {
++ ifoClose(ifo_handle);
++ return 0;
++
++ }
++
++ uint32_t tmp_filesize;
++ offset += UDFFindFile(device, "/VIDEO_TS/VIDEO_TS.IFO", &tmp_filesize);
++
++
++ int i;
++ for (i=0; i<ifo_handle->tt_srpt->nr_of_srpts; i++)
++ if (title == ifo_handle->tt_srpt->title[i].title_set_nr)
++ break;
++
++ if (i == ifo_handle->tt_srpt->nr_of_srpts) {
++ /* not found */
++ ifoClose(ifo_handle);
++ return 0;
++ }
++ offset += ifo_handle->tt_srpt->title[i].title_set_sector;
++
++ ifoClose(ifo_handle);
++
++ if (!strcmp(extension, "VOB")) {
++ ifo_handle = ifoOpen(device, title);
++ if (0 == ifo_handle)
++ return 0;
++
++ switch(part) {
++ case 0:
++ if (0 == ifo_handle->vtsi_mat->vtsm_vobs)
++ return 0;
++ offset += ifo_handle->vtsi_mat->vtsm_vobs;
++ break;
++ case 1:
++ if (0 == ifo_handle->vtsi_mat->vtstt_vobs)
++ return 0;
++ offset += ifo_handle->vtsi_mat->vtstt_vobs;
++ break;
++ default: /* can't get other parts (also no need to) */
++ offset = 0;
++ break;
++ }
++
++ ifoClose(ifo_handle);
++ }
++
++ }
++
++ *filesize = 1000000; /* File size unknown */
++ if (offset != 0)
++ return offset;
++ }
+ uint8_t *LogBlock;
+ uint32_t lbnum;
+ uint16_t TagID;
|
[-]
[+]
|
Added |
libdvdread.spec.orig
^
|
@@ -0,0 +1,161 @@
+# definition von softwarename, version und release
+%define name libdvdread
+%define version 0.9.7
+%define release 1
+
+%define major 3
+%define libname %{name}
+
+Name: %{name}
+Summary: Library to access video DVDs
+Summary(de): Bibliothek um auf Video-DVDs zuzugreifen
+License: GPL
+Group: Productivity/Multimedia/Other
+URL: http://www.dtek.chalmers.se/groups/dvd/index.shtml
+Version: %{version}
+Release: %{release}
+
+Source0: libdvdread-0.9.7.tar.bz2
+
+Patch0: libdvdread-0.9.7-udffindfile.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
+Prefix: %{_prefix}
+Provides: %{name}2 = %{version}, %{name}%{major} = %{version}, libdvdread.so.2
+BuildRequires: gcc
+
+%description
+libdvdread provides a simple foundation for reading DVD-Video images.
+It offers DVD applications:
+
+1. A simple abstraction for reading the files on a DVD image
+ (dvd_reader.h).
+2. A simple library for parsing the information (IFO) files
+ (ifo_read.h/ifo_types.h).
+3. A simple library for parsing the navigation (NAV) packets
+ (nav_read.h/nav_types.h).
+
+This allows application designers to access some of the more advanced
+features of the DVD format.
+
+libdvdread currently uses libdl to dynamically probe for libdvdcss at
+runtime. If libdvdcss is found, then it will be used to decrypt the
+encrypted sections of a DVD.
+
+Authors:
+--------
+ Björn Englund <d4bjorn@dtek.chalmers.se>
+ Håkan Hjort <d95hjort@dtek.chalmers.se>
+ Billy Biggs <vektor@dumbterm.net>
+ Christian Wolff <scarabaeus@convergence.de>
+
+%description -l de
+Die libdvdread Bibliothek stellt einfache Basisfunktionen für den Zugriff
+auf Video-DVDs zuzugreifen.
+Es stellt DVD-Programmen folgendes zur Verfügung:
+
+1. Eine einfache Abstraktion zumr lesen der Dateien eines DVD-Images
+ (dvd_reader.h).
+2. Eine einfache Bibliothek zum parsen der Informationen der IFO Datei
+ (ifo_read.h/ifo_types.h).
+3. Eine einfache Bibliothek zum Parsen des navigation Pakets
+ (nav_read.h/nav_types.h).
+
+Dies ermöglicht Programmierern weitereichende Funktionen des DVD-Formats
+zu unterstützen.
+
+libdvdread benutzt libdl um zur Laufzeit dynamisch zu prüfen, ob die
+libdvdcss vorhanden ist. Diese wird benötigt um auf CSS verschlüsselte
+Video-DVDs zuzugreifen.
+
+Autoren:
+--------
+ Björn Englund <d4bjorn@dtek.chalmers.se>
+ Håkan Hjort <d95hjort@dtek.chalmers.se>
+ Billy Biggs <vektor@dumbterm.net>
+ Christian Wolff <scarabaeus@convergence.de>
+
+%package -n %{libname}-devel
+Summary: Development tools for programs which will use the libdvdread library
+Summary(de): Entwicklertools für Programme, die die libdvdread Bibliothek verwenden
+Group: Development/Libraries/C and C++
+Requires: %{libname} = %{version}-%{release}
+Provides: %{name}-devel = %{version}, %{name}2-devel = %{version}, %{name}%{major}-devel = %{version}
+
+%description -n %{libname}-devel
+The libdvdread-devel package includes the header files and static libraries
+necessary for developing programs which will manipulate DVDs files using
+the libdvdread library.
+
+If you are going to develop programs which will manipulate DVDs, you
+should install libdvdread-devel. You'll also need to have the libdvdread
+package installed.
+
+Authors:
+--------
+ Björn Englund <d4bjorn@dtek.chalmers.se>
+ Håkan Hjort <d95hjort@dtek.chalmers.se>
+ Billy Biggs <vektor@dumbterm.net>
+ Christian Wolff <scarabaeus@convergence.de>
+
+%description -n %{libname}-devel -l de
+Das libdvdread-devel Paket enthällt die Header-Dateien sowie die statischen
+Bibliotheken, welche für Entwickler notwendig sind, die Programme erstellen,
+die DVD-Dateien mit Hilfe der libdvdread auf DVD-Dateien zuzugreifen.
+
+Falls Sie Programme entwickeln oder compilieren, die auf Video-DVDs
+zugreifen, sollten Sie das libdvdread-devel Paket installiern. Es wird
+ebenfalls das libdvdread benötigt.
+
+Autoren:
+--------
+ Björn Englund <d4bjorn@dtek.chalmers.se>
+ Håkan Hjort <d95hjort@dtek.chalmers.se>
+ Billy Biggs <vektor@dumbterm.net>
+ Christian Wolff <scarabaeus@convergence.de>
+
+%prep
+%setup
+%patch0
+
+%build
+mv configure configurex
+cat configurex | sed -e "s/linux-gnu\*)/linux\*)/g" > configure
+chmod 777 configure
+%configure
+
+mv libtool libtoolx
+cat libtoolx | sed -e "s/\${SED}/sed/g" > libtool
+chmod 777 libtool
+%__make
+
+%install
+[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
+%makeinstall
+cd ${RPM_BUILD_ROOT}%{_libdir}
+%{__ln_s} libdvdread.so.%{major} libdvdread.so.2
+
+%clean
+[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
+
+%post
+%run_ldconfig
+
+%postun
+%run_ldconfig
+
+
+%files -n %{libname}
+%defattr(-, root, root)
+%doc AUTHORS COPYING NEWS README
+%{_libdir}/*.so.*
+
+%files -n %{libname}-devel
+%defattr(-, root, root)
+%{_includedir}/dvdread/*.h
+%{_libdir}/*.so
+%{_libdir}/*.*a
+
+%changelog
+* Sun Sep 30 2007 Carsten Schoene <cs@linux-administrator.com>
+- import for SLE_10 build
+
|