Root/mplayer/patches/010-jz47xx-vidix.patch

1Index: MPlayer-r33304/vidix/drivers.c
2===================================================================
3--- MPlayer-r33304.orig/vidix/drivers.c 2011-04-23 12:22:03.000000000 +0200
4+++ MPlayer-r33304/vidix/drivers.c 2011-04-23 12:24:31.000000000 +0200
5@@ -23,6 +23,7 @@
6 #include <stdio.h>
7 #include <errno.h>
8 #include <string.h>
9+#include <dlfcn.h>
10 
11 #include "config.h"
12 #include "vidix.h"
13@@ -103,6 +104,32 @@
14 #ifdef CONFIG_VIDIX_DRV_UNICHROME
15   vidix_register_driver (&unichrome_drv);
16 #endif
17+
18+ {
19+ const char *lib = "jz47xx_vid.so";
20+ const char *sym = "jz47xx_drv";
21+ void *drv;
22+ void *h = dlopen(lib, RTLD_NOW);
23+ if (h)
24+ {
25+ printf ("vidix: managed to load %s\n", lib);
26+ drv = dlsym(h, sym);
27+ if (!drv)
28+ {
29+ printf ("vidix: failed to resove symbol '%s'\n", sym);
30+ }
31+ else
32+ {
33+ printf("registering %s (0x%lx)\n", sym, (long)drv);
34+ vidix_register_driver((VDXDriver*)drv);
35+ printf("registered %s (0x%lx)\n", sym, (long)drv);
36+ }
37+ }
38+ else
39+ {
40+ printf ("vidix: loading %s failed: %m\n", lib);
41+ }
42+ }
43 }
44 
45 static int vidix_probe_driver (VDXContext *ctx, VDXDriver *drv,
46@@ -191,3 +218,11 @@
47   ctx->drv = NULL;
48   return 0;
49 }
50+
51+/*
52+The following comments configure the Emacs editor. Just ignore them.
53+
54+Local Variables:
55+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"
56+End:
57+ */
58Index: MPlayer-r33304/Makefile
59===================================================================
60--- MPlayer-r33304.orig/Makefile 2011-04-23 12:22:04.000000000 +0200
61+++ MPlayer-r33304/Makefile 2011-04-23 12:24:31.000000000 +0200
62@@ -598,11 +598,11 @@
63                                  libvo/vosub_vidix.c \
64                                  vidix/vidix.c \
65                                  vidix/drivers.c \
66- vidix/dha.c \
67- vidix/mtrr.c \
68- vidix/pci.c \
69- vidix/pci_names.c \
70- vidix/pci_dev_ids.c\
71+ vidix/dha.c
72+# vidix/mtrr.c \
73+# vidix/pci.c \
74+# vidix/pci_names.c \
75+# vidix/pci_dev_ids.c\
76 
77 SRCS_MPLAYER-$(VIDIX_CYBERBLADE) += vidix/cyberblade_vid.c
78 SRCS_MPLAYER-$(VIDIX_IVTV) += vidix/ivtv_vid.c
79Index: MPlayer-r33304/vidix/dha.c
80===================================================================
81--- MPlayer-r33304.orig/vidix/dha.c 2011-04-23 12:22:03.000000000 +0200
82+++ MPlayer-r33304/vidix/dha.c 2011-04-23 12:24:31.000000000 +0200
83@@ -185,7 +185,7 @@
84 
85 #endif /* Generic mmap (not win32, nor os2) */
86 
87-#if !defined(__alpha__) && !defined(__powerpc__) && !defined(__sh__)
88+#if !defined(__alpha__) && !defined(__powerpc__) && !defined(__sh__) && !defined(__mips__)
89 unsigned char INPORT8(unsigned idx)
90 {
91   return inb(idx);
92

Archive Download this file



interactive