summaryrefslogtreecommitdiff
path: root/extra/ogle
diff options
context:
space:
mode:
Diffstat (limited to 'extra/ogle')
-rw-r--r--extra/ogle/PKGBUILD39
-rw-r--r--extra/ogle/dvdread-4.1.3.patch129
-rw-r--r--extra/ogle/gcc34alsafix.patch15
-rw-r--r--extra/ogle/gcc4.patch12
-rw-r--r--extra/ogle/xvideofix.patch205
5 files changed, 400 insertions, 0 deletions
diff --git a/extra/ogle/PKGBUILD b/extra/ogle/PKGBUILD
new file mode 100644
index 000000000..9d9b19c50
--- /dev/null
+++ b/extra/ogle/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 63949 2010-01-19 05:22:55Z eric $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
+
+pkgname=ogle
+pkgver=0.9.2
+pkgrel=12
+pkgdesc="A simple DVD player for Linux"
+arch=('i686' 'x86_64')
+url="http://www.dtek.chalmers.se/groups/dvd/"
+license=('GPL')
+depends=('libxml2' 'libdvdread' 'libjpeg' 'libmad' 'libxinerama' 'libxv'
+ 'alsa-lib' 'a52dec' 'libsm' 'libxxf86vm')
+options=('!libtool')
+source=(http://www.dtek.chalmers.se/groups/dvd/dist/${pkgname}-${pkgver}.tar.gz
+ xvideofix.patch
+ gcc34alsafix.patch
+ gcc4.patch
+ dvdread-4.1.3.patch)
+md5sums=('a76a9892bdb807a4bcf859d15a91f0f9'
+ '57f1cf36eed82c56f24e9c0fc25ce2b3'
+ '4ebc822b252fade6b53c5ceb5be45bf5'
+ 'd08cff87c5ec41a7eebc0d2384835688'
+ '597906c64ff7f5185de8430fdae3107d')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np0 -i "${srcdir}/dvdread-4.1.3.patch" || return 1
+ patch -Np1 -i ../xvideofix.patch || return 1
+ patch -Np1 -i ../gcc34alsafix.patch || return 1
+ patch -Np1 -i ../gcc4.patch || return 1
+ # fix alsa detection - stolen from their cvs
+ sed -i 's|^.*MINOR\=\=5.*$|#if SND_LIB_MAJOR==0 && SND_LIB_MINOR<6|' configure || return 1
+ sed -i 's|__diga_end:|\0;|' libogleao/alsa_audio.c || return 1
+ ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --with-x || return 1
+ make || return 1
+ export LIBRARY_PATH="${pkgdir}/usr/lib/ogle"
+ make DESTDIR="${pkgdir}" install || return 1
+}
diff --git a/extra/ogle/dvdread-4.1.3.patch b/extra/ogle/dvdread-4.1.3.patch
new file mode 100644
index 000000000..d928ac2aa
--- /dev/null
+++ b/extra/ogle/dvdread-4.1.3.patch
@@ -0,0 +1,129 @@
+$NetBSD: patch-ad,v 1.1 2009/01/27 02:06:49 jmcneill Exp $
+
+--- vmg/ifo_dump.c.orig 2009-01-26 21:00:17.000000000 -0500
++++ vmg/ifo_dump.c 2009-01-26 21:00:33.000000000 -0500
+@@ -65,38 +65,38 @@ static void print_ifo(char *path, int ti
+ if(h->vmgi_mat != NULL) {
+
+ printf("VMG top level\n-------------\n");
+- ifoPrint_VMGI_MAT(h->vmgi_mat);
++ ifo_print_VMGI_MAT(h->vmgi_mat);
+
+ printf("\nFirst Play PGC\n--------------\n");
+- ifoPrint_PGC(h->first_play_pgc);
++ ifo_print_PGC(h->first_play_pgc);
+
+ printf("\nTitle Track search pointer table\n");
+ printf( "------------------------------------------------\n");
+- ifoPrint_TT_SRPT(h->tt_srpt);
++ ifo_print_TT_SRPT(h->tt_srpt);
+
+ printf("\nMenu PGCI Unit table\n");
+ printf( "--------------------\n");
+ if(h->vmgi_mat->vmgm_pgci_ut != 0) {
+- ifoPrint_PGCI_UT(h->pgci_ut);
++ ifo_print_PGCI_UT(h->pgci_ut);
+ } else
+ printf("No Menu PGCI Unit table present\n");
+
+ printf("\nParental Manegment Information table\n");
+ printf( "------------------------------------\n");
+ if(h->vmgi_mat->ptl_mait != 0) {
+- ifoPrint_PTL_MAIT(h->ptl_mait);
++ ifo_print_PTL_MAIT(h->ptl_mait);
+ } else
+ printf("No Parental Management Information present\n");
+
+ printf("\nVideo Title Set Attribute Table\n");
+ printf( "-------------------------------\n");
+- ifoPrint_VTS_ATRT(h->vts_atrt);
++ ifo_print_VTS_ATRT(h->vts_atrt);
+
+
+ printf("\nText Data Manager Information\n");
+ printf( "-----------------------------\n");
+ if(h->vmgi_mat->txtdt_mgi != 0) {
+- //ifoPrint_TXTDT_MGI(h->txtdt_mgi);
++ //ifo_print_TXTDT_MGI(h->txtdt_mgi);
+ printf("Can't print Text Data Manager Information yet\n");
+ } else
+ printf("No Text Data Manager Information present\n");
+@@ -106,14 +106,14 @@ static void print_ifo(char *path, int ti
+ printf("\nCell Address table\n");
+ printf( "-----------------\n");
+ if(h->vmgi_mat->vmgm_c_adt != 0) {
+- ifoPrint_C_ADT(h->menu_c_adt);
++ ifo_print_C_ADT(h->menu_c_adt);
+ } else
+ printf("No Cell Address table present\n");
+
+ printf("\nVideo Title set Menu VOBU address map\n");
+ printf( "-----------------\n");
+ if(h->vmgi_mat->vmgm_vobu_admap != 0) {
+- ifoPrint_VOBU_ADMAP(h->menu_vobu_admap);
++ ifo_print_VOBU_ADMAP(h->menu_vobu_admap);
+ } else
+ printf("No Menu VOBU address map present\n");
+ }
+@@ -122,20 +122,20 @@ static void print_ifo(char *path, int ti
+ if(h->vtsi_mat != NULL) {
+
+ printf("VTS top level\n-------------\n");
+- ifoPrint_VTSI_MAT(h->vtsi_mat);
++ ifo_print_VTSI_MAT(h->vtsi_mat);
+
+ printf("\nPart of title search pointer table information\n");
+ printf( "----------------------------------------------\n");
+- ifoPrint_VTS_PTT_SRPT(h->vts_ptt_srpt);
++ ifo_print_VTS_PTT_SRPT(h->vts_ptt_srpt);
+
+ printf("\nPGCI Unit table\n");
+ printf( "--------------------\n");
+- ifoPrint_PGCIT(h->vts_pgcit);
++ ifo_print_PGCIT(h->vts_pgcit);
+
+ printf("\nMenu PGCI Unit table\n");
+ printf( "--------------------\n");
+ if(h->vtsi_mat->vtsm_pgci_ut != 0) {
+- ifoPrint_PGCI_UT(h->pgci_ut);
++ ifo_print_PGCI_UT(h->pgci_ut);
+ } else
+ printf("No Menu PGCI Unit table present\n");
+
+@@ -144,31 +144,31 @@ static void print_ifo(char *path, int ti
+ printf("\nTime Map table\n");
+ printf( "-----------------\n");
+ if(h->vtsi_mat->vts_tmapt != 0) {
+- ifoPrint_VTS_TMAPT(h->vts_tmapt);
++ ifo_print_VTS_TMAPT(h->vts_tmapt);
+ } else
+ printf("No Time Map table present\n");
+
+ printf("\nMenu Cell Address table\n");
+ printf( "-----------------\n");
+ if(h->vtsi_mat->vtsm_c_adt != 0) {
+- ifoPrint_C_ADT(h->menu_c_adt);
++ ifo_print_C_ADT(h->menu_c_adt);
+ } else
+ printf("No Cell Address table present\n");
+
+ printf("\nVideo Title Set Menu VOBU address map\n");
+ printf( "-----------------\n");
+ if(h->vtsi_mat->vtsm_vobu_admap != 0) {
+- ifoPrint_VOBU_ADMAP(h->menu_vobu_admap);
++ ifo_print_VOBU_ADMAP(h->menu_vobu_admap);
+ } else
+ printf("No Menu VOBU address map present\n");
+
+ printf("\nCell Address table\n");
+ printf( "-----------------\n");
+- ifoPrint_C_ADT(h->vts_c_adt);
++ ifo_print_C_ADT(h->vts_c_adt);
+
+ printf("\nVideo Title Set VOBU address map\n");
+ printf( "-----------------\n");
+- ifoPrint_VOBU_ADMAP(h->vts_vobu_admap);
++ ifo_print_VOBU_ADMAP(h->vts_vobu_admap);
+
+ }
+ }
diff --git a/extra/ogle/gcc34alsafix.patch b/extra/ogle/gcc34alsafix.patch
new file mode 100644
index 000000000..76de3462d
--- /dev/null
+++ b/extra/ogle/gcc34alsafix.patch
@@ -0,0 +1,15 @@
+--- ogle-0.9.2/libogleao/alsa_audio.c 2003-10-18 17:38:30.000000000 -0700
++++ ogle-0.9.2-patch/libogleao/alsa_audio.c 2005-04-22 18:21:23.000000000 -0700
+@@ -248,10 +248,9 @@
+ //Shouldn't ctl_handle be closed here?
+ }
+
+- snd_ctl_close(ctl_handle);
+-
+- __diga_end:
++ snd_ctl_close(ctl_handle);
+ }
++ __diga_end:
+
+ return 0;
+ }
diff --git a/extra/ogle/gcc4.patch b/extra/ogle/gcc4.patch
new file mode 100644
index 000000000..b6a10a325
--- /dev/null
+++ b/extra/ogle/gcc4.patch
@@ -0,0 +1,12 @@
+diff -urN ogle-0.9.2-old/ac3/ac3dec_wrap.c ogle-0.9.2/ac3/ac3dec_wrap.c
+--- ogle-0.9.2-old/ac3/ac3dec_wrap.c 2003-03-02 15:50:03.000000000 +0000
++++ ogle-0.9.2/ac3/ac3dec_wrap.c 2005-09-30 17:07:27.000000000 +0000
+@@ -48,7 +48,7 @@
+ static void handle_events(MsgEventQ_t *q, MsgEvent_t *ev);
+
+
+-static char *program_name;
++char *program_name;
+
+ static FILE *outfile;
+
diff --git a/extra/ogle/xvideofix.patch b/extra/ogle/xvideofix.patch
new file mode 100644
index 000000000..aafde447a
--- /dev/null
+++ b/extra/ogle/xvideofix.patch
@@ -0,0 +1,205 @@
+--- ogle-0.9.2/mpeg2_video/video_output_x11.c 2003-11-04 04:02:10.000000000 -0800
++++ ogle-0.9.2-patch/mpeg2_video/video_output_x11.c 2005-04-22 18:37:56.000000000 -0700
+@@ -286,6 +286,7 @@
+ }
+ }
+
++
+ /* This section of the code looks for the Xv extension for hardware
+ * yuv->rgb and scaling. If it is not found, or any suitable adapter
+ * is not found, use_xv will be set to 0. Otherwise it allocates a
+@@ -299,121 +300,136 @@
+ {
+ int xv_found = 0;
+ #ifdef HAVE_XV
+- int i, j;
++ int i, j, k;
+ int result;
+
+ xv_port = 0; /* We have no port yet. */
+-
++
+ /* Check for the Xvideo extension */
+- result = XvQueryExtension(mydisplay, &xv_version, &xv_release,
+- &xv_request_base, &xv_event_base,
++ result = XvQueryExtension(mydisplay, &xv_version, &xv_release,
++ &xv_request_base, &xv_event_base,
+ &xv_error_base);
+ if(result != Success) {
+ WARNING("%s", "Xvideo extension not found\n");
+ use_xv = 0;
+ return;
+ }
+-
++
+ NOTE("Found Xv extension %d.%d, checking for suitable adaptors\n",
+ xv_version, xv_release);
+-
++
+ /* Check for available adaptors */
+- result = XvQueryAdaptors(mydisplay, DefaultRootWindow (mydisplay),
++ result = XvQueryAdaptors(mydisplay, DefaultRootWindow (mydisplay),
+ &xv_num_adaptors, &xv_adaptor_info);
+ if(result != Success) {
+ WARNING("%s", "No Xv adaptors found\n");
+ use_xv = 0;
+ return;
+ }
+-
++
+ /* Check adaptors */
+ for(i = 0; i < xv_num_adaptors; i++) {
+-
++
+ /* Is it usable for displaying XvImages */
+ if(!(xv_adaptor_info[i].type & XvInputMask) ||
+ !(xv_adaptor_info[i].type & XvImageMask))
+ continue;
+-
+- xv_port = xv_adaptor_info[i].base_id;
+-
+- /* Check image formats of adaptor */
+- xv_formats = XvListImageFormats(mydisplay, xv_port, &xv_num_formats);
+- for(j = 0; j < xv_num_formats; j++) {
+- if(xv_formats[j].id == 0x32315659) { /* YV12 */
+- //if(xv_formats[j].id == 0x30323449) { /* I420 */
+- xv_id = xv_formats[j].id;
+- break;
+- }
+- }
+- /* No matching format found */
+- if(j == xv_num_formats)
+- continue;
+-
+- NOTE("Xv adaptor \"%s\" port %li image format %i\n",
+- xv_adaptor_info[i].name, xv_port, xv_id);
+-
+- /* Allocate XvImages */
++
++ /* Check Available Ports */
++ for (j = 0; j < xv_adaptor_info[i].num_ports && !xv_port ; j++) {
++
++ /* Check Image formats of adaptor */
++ xv_formats = XvListImageFormats(mydisplay,xv_adaptor_info[i].base_id + j, &xv_num_formats);
++ for (k = 0; k < xv_num_formats; k ++) {
++
++ /* Check for proper format (YV12) and see if we can grab the port */
++ if ( (xv_formats[k].id == 0x32315659) && (XvGrabPort(mydisplay,xv_adaptor_info[i].base_id + j,0) == Success) ) {
++ xv_id = xv_formats[k].id;
++ xv_port = xv_adaptor_info[i].base_id + j;
++ break;
++ }
++
++ }
++
++ /* delete stuff nicely */
++ XFree(xv_formats);
++ }
++
++ /* Check next Adapter */
++ if (xv_port==0) continue;
++
++ /* Report what we found */
++ NOTE("Xv adaptor \"%s\" port %li image format %i\n", xv_adaptor_info[i].name, xv_port, xv_id);
++
++ /* Allocate XvImage */
+ xv_image = XvShmCreateImage(mydisplay, xv_port, xv_id, NULL,
+ padded_width,
+- padded_height,
++ padded_height,
+ &shm_info);
+-
+- /* Got an Image? */
++
++ /* Got an milk? */
+ if(xv_image == NULL)
+ continue;
+-
++
+ /* Test and see if we really got padded_width x padded_height */
+ if(xv_image->width != padded_width ||
+ xv_image->height != padded_height) {
+ FATAL("XvShmCreateImage got size: %d x %d\n",
+ xv_image->width, xv_image->height);
+ exit(1);
+- }
+-
++ }
++
++ /* Now Finish Up */
+ shm_info.shmid = picture_buffer_shmid;
+ shm_info.shmaddr = picture_buffer_addr;
+-
+- /* Set the data pointer to the decoders picture segment. */
++
++ /* Set the data pointer to the decoders picture segment. */
+ // xv_image->data = picture_data->y;
+ shm_info.readOnly = True;
+-
++
+ /* make sure we don't have any unhandled errors */
+ XSync(mydisplay, False);
+-
++
+ /* set error handler so we can check if xshmattach failed */
+ prev_xerrhandler = XSetErrorHandler(xshm_errorhandler);
+-
++
+ /* get the serial of the xshmattach request */
+ req_serial = NextRequest(mydisplay);
+-
++
+ /* try to attach */
+ XShmAttach(mydisplay, &shm_info);
+-
++
+ /* make sure xshmattach has been processed and any errors
+ have been returned to us */
+ XSync(mydisplay, False);
+-
++
+ /* revert to the previous xerrorhandler */
+ XSetErrorHandler(prev_xerrhandler);
+-
++
+ if(use_xshm) {
+ #if 0
+ shmctl(shm_info.shmid, IPC_RMID, 0); // only works on Linux..
+ #endif
+-
++
+ CompletionType = XShmGetEventBase(mydisplay) + ShmCompletion;
+ }
+ xv_found = 1;
+
+ /* All set up! */
+ break;
+- }
++ }
++
++ /* Clean up */
++ XvFreeAdaptorInfo(xv_adaptor_info);
++
+ #endif /* HAVE_XV */
++ /* In case we didn't find a working Xv */
+ if(!xv_found) {
+ use_xv = 0;
+- }
+-}
+-
++ }
++
++ }
++
+
+ /* This section of the code tries to use the MIT XShm extension for
+ * accellerated transfers to to X. XShm extension is need and only
+@@ -1726,6 +1742,8 @@
+
+ if(mydisplay) {
+ XSync(mydisplay,True);
++ if (use_xv)
++ XvUngrabPort(mydisplay,xv_port,CurrentTime);
+ if(use_xshm)
+ XShmDetach(mydisplay, &shm_info);
+ if(window.ximage != 0)