1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-07-03 01:35:27 +03:00
openwrt-packages/mplayer/patches/010-jz47xx-vidix.patch
David Kühling 6a975d2489 mplayer: use svn versions of mplayer plus mplayer-internal ffmpeg from git
Mplayer project seems to have stopped providing release tarballs and recommends
use of the SVN version.  Package uses revision pinning, so still nice and
deterministic.
2011-04-24 11:00:16 +02:00

92 lines
3.0 KiB
Diff

Index: MPlayer-r33304/vidix/drivers.c
===================================================================
--- MPlayer-r33304.orig/vidix/drivers.c 2011-04-23 12:22:03.000000000 +0200
+++ MPlayer-r33304/vidix/drivers.c 2011-04-23 12:24:31.000000000 +0200
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <errno.h>
#include <string.h>
+#include <dlfcn.h>
#include "config.h"
#include "vidix.h"
@@ -103,6 +104,32 @@
#ifdef CONFIG_VIDIX_DRV_UNICHROME
vidix_register_driver (&unichrome_drv);
#endif
+
+ {
+ const char *lib = "jz47xx_vid.so";
+ const char *sym = "jz47xx_drv";
+ void *drv;
+ void *h = dlopen(lib, RTLD_NOW);
+ if (h)
+ {
+ printf ("vidix: managed to load %s\n", lib);
+ drv = dlsym(h, sym);
+ if (!drv)
+ {
+ printf ("vidix: failed to resove symbol '%s'\n", sym);
+ }
+ else
+ {
+ printf("registering %s (0x%lx)\n", sym, (long)drv);
+ vidix_register_driver((VDXDriver*)drv);
+ printf("registered %s (0x%lx)\n", sym, (long)drv);
+ }
+ }
+ else
+ {
+ printf ("vidix: loading %s failed: %m\n", lib);
+ }
+ }
}
static int vidix_probe_driver (VDXContext *ctx, VDXDriver *drv,
@@ -191,3 +218,11 @@
ctx->drv = NULL;
return 0;
}
+
+/*
+The following comments configure the Emacs editor. Just ignore them.
+
+Local Variables:
+compile-command: "cd ~/src/nanonote/MPlayer-1.0rc3 && ~/bin/quilt-export target && make -C ~/h/src/qi/openwrt-xburst package/mplayer/compile -j2 V=99"
+End:
+ */
Index: MPlayer-r33304/Makefile
===================================================================
--- MPlayer-r33304.orig/Makefile 2011-04-23 12:22:04.000000000 +0200
+++ MPlayer-r33304/Makefile 2011-04-23 12:24:31.000000000 +0200
@@ -598,11 +598,11 @@
libvo/vosub_vidix.c \
vidix/vidix.c \
vidix/drivers.c \
- vidix/dha.c \
- vidix/mtrr.c \
- vidix/pci.c \
- vidix/pci_names.c \
- vidix/pci_dev_ids.c\
+ vidix/dha.c
+# vidix/mtrr.c \
+# vidix/pci.c \
+# vidix/pci_names.c \
+# vidix/pci_dev_ids.c\
SRCS_MPLAYER-$(VIDIX_CYBERBLADE) += vidix/cyberblade_vid.c
SRCS_MPLAYER-$(VIDIX_IVTV) += vidix/ivtv_vid.c
Index: MPlayer-r33304/vidix/dha.c
===================================================================
--- MPlayer-r33304.orig/vidix/dha.c 2011-04-23 12:22:03.000000000 +0200
+++ MPlayer-r33304/vidix/dha.c 2011-04-23 12:24:31.000000000 +0200
@@ -185,7 +185,7 @@
#endif /* Generic mmap (not win32, nor os2) */
-#if !defined(__alpha__) && !defined(__powerpc__) && !defined(__sh__)
+#if !defined(__alpha__) && !defined(__powerpc__) && !defined(__sh__) && !defined(__mips__)
unsigned char INPORT8(unsigned idx)
{
return inb(idx);