author | zecke <zecke> | 2002-07-02 15:25:38 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-07-02 15:25:38 (UTC) |
commit | e26bf96e2e4f2d1edf19e81dc67eace3cb8622dc (patch) (unidiff) | |
tree | 0346837eed0c9acc55f25601e495a188fb1111fb | |
parent | d4a5bcbba0e6f67ef9d41e08c7d5ae598caa61a8 (diff) | |
download | opie-e26bf96e2e4f2d1edf19e81dc67eace3cb8622dc.zip opie-e26bf96e2e4f2d1edf19e81dc67eace3cb8622dc.tar.gz opie-e26bf96e2e4f2d1edf19e81dc67eace3cb8622dc.tar.bz2 |
my hacky null video output plugin
This will become our smart opie video widget
controller...
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mainTest.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/nullvideo.c | 137 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/zeckeplayer.pro | 6 |
4 files changed, 142 insertions, 5 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp index ecaeeea..4b13f00 100644 --- a/noncore/multimedia/opieplayer2/lib.cpp +++ b/noncore/multimedia/opieplayer2/lib.cpp | |||
@@ -1,17 +1,17 @@ | |||
1 | 1 | ||
2 | #include <stdio.h> | 2 | #include <stdio.h> |
3 | #include <stdlib.h> | 3 | #include <stdlib.h> |
4 | //#include <qpe/qpeapplication.h> | 4 | //#include <qpe/qpeapplication.h> |
5 | 5 | ||
6 | #include <qfile.h> | 6 | #include <qfile.h> |
7 | 7 | ||
8 | #include "frame.h" | 8 | #include "frame.h" |
9 | #include "xinelib.h" | 9 | #include "lib.h" |
10 | 10 | ||
11 | 11 | ||
12 | 12 | ||
13 | 13 | ||
14 | using namespace XINE; | 14 | using namespace XINE; |
15 | 15 | ||
16 | Lib::Lib() { | 16 | Lib::Lib() { |
17 | printf("Lib"); | 17 | printf("Lib"); |
diff --git a/noncore/multimedia/opieplayer2/mainTest.cpp b/noncore/multimedia/opieplayer2/mainTest.cpp index f130c51..58a8b47 100644 --- a/noncore/multimedia/opieplayer2/mainTest.cpp +++ b/noncore/multimedia/opieplayer2/mainTest.cpp | |||
@@ -1,13 +1,13 @@ | |||
1 | 1 | ||
2 | #include <stdlib.h> | 2 | #include <stdlib.h> |
3 | #include <stdio.h> | 3 | #include <stdio.h> |
4 | 4 | ||
5 | #include "xinelib.h" | 5 | #include "lib.h" |
6 | 6 | ||
7 | int main( int argc, char *argv[] ) { | 7 | int main( int argc, char *argv[] ) { |
8 | printf("FixME\n"); | 8 | printf("FixME\n"); |
9 | //return 0; | 9 | //return 0; |
10 | XINE::Lib lib; | 10 | XINE::Lib lib; |
11 | QString str = QString::fromLatin1( argv[1] ); | 11 | QString str = QString::fromLatin1( argv[1] ); |
12 | lib.play( str ); | 12 | lib.play( str ); |
13 | for (;;); | 13 | for (;;); |
diff --git a/noncore/multimedia/opieplayer2/nullvideo.c b/noncore/multimedia/opieplayer2/nullvideo.c new file mode 100644 index 0000000..c97800c --- a/dev/null +++ b/noncore/multimedia/opieplayer2/nullvideo.c | |||
@@ -0,0 +1,137 @@ | |||
1 | |||
2 | /*#include <xine.h>*/ | ||
3 | #include <stdlib.h> | ||
4 | #include <stdio.h> | ||
5 | |||
6 | #include <xine/video_out.h> | ||
7 | #include <xine/xine_internal.h> | ||
8 | #include <xine/xineutils.h> | ||
9 | #include <xine/configfile.h> | ||
10 | |||
11 | typedef struct null_driver_s null_driver_t; | ||
12 | |||
13 | struct null_driver_s { | ||
14 | vo_driver_t vo_driver; | ||
15 | uint32_t m_capabilities; | ||
16 | |||
17 | }; | ||
18 | typedef struct opie_frame_s opie_frame_t; | ||
19 | struct opie_frame_s { | ||
20 | vo_frame_t frame; | ||
21 | char* name; | ||
22 | int version; | ||
23 | null_driver_t *output; | ||
24 | }; | ||
25 | |||
26 | static uint32_t null_get_capabilities(vo_driver_t *self ){ | ||
27 | null_driver_t* this = (null_driver_t*)self; | ||
28 | return this->m_capabilities; | ||
29 | } | ||
30 | |||
31 | /* take care of the frame*/ | ||
32 | static void null_frame_dispose( vo_frame_t* vo_img){ | ||
33 | opie_frame_t* frame = (opie_frame_t*)vo_img; | ||
34 | free (frame); | ||
35 | } | ||
36 | static void null_frame_field( vo_frame_t* frame, int inti ){ | ||
37 | /* not needed */ | ||
38 | } | ||
39 | |||
40 | /* end take care of frames*/ | ||
41 | |||
42 | static vo_frame_t* null_alloc_frame( vo_driver_t* self ){ | ||
43 | null_driver_t* this = (null_driver_t*)self; | ||
44 | opie_frame_t* frame = (opie_frame_t*)malloc ( sizeof(opie_frame_t) ); | ||
45 | memset( frame, 0, sizeof( opie_frame_t) ); | ||
46 | frame->name = "opie\0"; | ||
47 | frame->version = 1; | ||
48 | frame->output = this; | ||
49 | |||
50 | /* initialize the frame*/ | ||
51 | frame->frame.driver = self; | ||
52 | /*frame.frame.free = null_frame_free;*/ | ||
53 | frame->frame.copy = NULL; | ||
54 | frame->frame.field = null_frame_field; | ||
55 | frame->frame.dispose = null_frame_dispose; | ||
56 | |||
57 | return (vo_frame_t*) frame; | ||
58 | } | ||
59 | static void null_update_frame_format( vo_driver_t* self, vo_frame_t* img, | ||
60 | uint32_t width, uint32_t height, | ||
61 | int ratio_code, int format, int flags ){ | ||
62 | /* not needed now */ | ||
63 | } | ||
64 | static void null_display_frame( vo_driver_t* self, vo_frame_t *frame ){ | ||
65 | printf("display frame"); | ||
66 | } | ||
67 | static void null_overlay_blend( vo_driver_t* self, vo_frame_t* frame, | ||
68 | vo_overlay_t* overlay ){ | ||
69 | /* sure */ | ||
70 | } | ||
71 | static int null_get_property( vo_driver_t* self, | ||
72 | int property ){ | ||
73 | return 0; | ||
74 | } | ||
75 | static int null_set_property( vo_driver_t* self, | ||
76 | int property, | ||
77 | int value ){ | ||
78 | return value; | ||
79 | } | ||
80 | static void null_get_property_min_max( vo_driver_t* self, | ||
81 | int property, int *min, | ||
82 | int *max ){ | ||
83 | *max = 0; | ||
84 | *min = 0; | ||
85 | } | ||
86 | static int null_gui_data_exchange( vo_driver_t* self, | ||
87 | int data_type, | ||
88 | void *data ){ | ||
89 | return 0; | ||
90 | } | ||
91 | static void null_exit( vo_driver_t* self ){ | ||
92 | null_driver_t* this = (null_driver_t*)self; | ||
93 | free ( this ); | ||
94 | } | ||
95 | static int null_redraw_needed( vo_driver_t* self ){ | ||
96 | return 0; | ||
97 | } | ||
98 | |||
99 | |||
100 | vo_driver_t* init_video_out_plugin( config_values_t* conf, | ||
101 | void* video ){ | ||
102 | null_driver_t *vo; | ||
103 | vo = (null_driver_t*)malloc( sizeof(null_driver_t ) ); | ||
104 | /* memset? */ | ||
105 | |||
106 | /* install callback handlers*/ | ||
107 | vo->vo_driver.get_capabilities = null_get_capabilities; | ||
108 | vo->vo_driver.alloc_frame = null_alloc_frame; | ||
109 | vo->vo_driver.update_frame_format = null_update_frame_format; | ||
110 | vo->vo_driver.display_frame = null_display_frame; | ||
111 | vo->vo_driver.overlay_blend = null_overlay_blend; | ||
112 | vo->vo_driver.get_property = null_get_property; | ||
113 | vo->vo_driver.set_property = null_set_property; | ||
114 | vo->vo_driver.get_property_min_max = null_get_property_min_max; | ||
115 | vo->vo_driver.gui_data_exchange = null_gui_data_exchange; | ||
116 | vo->vo_driver.exit = null_exit; | ||
117 | vo->vo_driver.redraw_needed = null_redraw_needed; | ||
118 | |||
119 | |||
120 | /* capabilities */ | ||
121 | vo->m_capabilities = /*VO_CAP_COPIES_IMAGE |*/ VO_CAP_YV12 | VO_CAP_BRIGHTNESS; | ||
122 | printf("done initialisation\n"); | ||
123 | return (vo_driver_t*) vo; | ||
124 | } | ||
125 | |||
126 | static vo_info_t vo_info_null = { | ||
127 | 5, | ||
128 | "null plugin", | ||
129 | NULL, | ||
130 | VISUAL_TYPE_FB, | ||
131 | 5 | ||
132 | }; | ||
133 | |||
134 | vo_info_t *get_video_out_plugin_info(){ | ||
135 | vo_info_null.description = _("xine video output plugin using null device"); | ||
136 | return &vo_info_null; | ||
137 | } | ||
diff --git a/noncore/multimedia/opieplayer2/zeckeplayer.pro b/noncore/multimedia/opieplayer2/zeckeplayer.pro index e63713f..2484c86 100644 --- a/noncore/multimedia/opieplayer2/zeckeplayer.pro +++ b/noncore/multimedia/opieplayer2/zeckeplayer.pro | |||
@@ -1,10 +1,10 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | DESTDIR = . | 2 | DESTDIR = . |
3 | #CONFIG = qt warn_on debug | 3 | #CONFIG = qt warn_on debug |
4 | CONFIG = qt warn_on release | 4 | CONFIG = qt warn_on release |
5 | HEADERS = frame.h lib.h | 5 | HEADERS = frame.h lib.h |
6 | SOURCES = frame.cpp lib.cpp main.cpp | 6 | SOURCES = nullvideo.o frame.cpp lib.cpp mainTest.cpp |
7 | INCLUDEPATH+= $(OPIEDIR)/include /usr/locale/include | 7 | INCLUDEPATH+= $(OPIEDIR)/include /usr/include |
8 | DEPENDPATH+= $(OPIEDIR)/include /usr/locale/include | 8 | DEPENDPATH+= $(OPIEDIR)/include /usr/include |
9 | LIBS += -lxine -lxineutils | 9 | LIBS += -lxine -lxineutils |
10 | TARGET = zeckeplayer \ No newline at end of file | 10 | TARGET = zeckeplayer \ No newline at end of file |