Diffstat (limited to 'noncore/multimedia/opieplayer2/nullvideo.c') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/nullvideo.c | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/nullvideo.c b/noncore/multimedia/opieplayer2/nullvideo.c index 5224862..b8b8eb3 100644 --- a/noncore/multimedia/opieplayer2/nullvideo.c +++ b/noncore/multimedia/opieplayer2/nullvideo.c | |||
@@ -1,40 +1,42 @@ | |||
1 | 1 | ||
2 | /*#include <xine.h>*/ | 2 | /*#include <xine.h>*/ |
3 | #include <stdlib.h> | 3 | #include <stdlib.h> |
4 | #include <stdio.h> | 4 | #include <stdio.h> |
5 | 5 | ||
6 | #include <xine/video_out.h> | 6 | #include <xine/video_out.h> |
7 | #include <xine/xine_internal.h> | 7 | #include <xine/xine_internal.h> |
8 | #include <xine/xineutils.h> | 8 | #include <xine/xineutils.h> |
9 | #include <xine/configfile.h> | 9 | #include <xine/configfile.h> |
10 | 10 | ||
11 | typedef struct null_driver_s null_driver_t; | 11 | typedef struct null_driver_s null_driver_t; |
12 | 12 | ||
13 | struct null_driver_s { | 13 | struct null_driver_s { |
14 | vo_driver_t vo_driver; | 14 | vo_driver_t vo_driver; |
15 | uint32_t m_capabilities; | 15 | uint32_t m_capabilities; |
16 | 16 | int m_show_video; | |
17 | int m_video_fullscreen; | ||
18 | int m_is_scaling; | ||
17 | }; | 19 | }; |
18 | typedef struct opie_frame_s opie_frame_t; | 20 | typedef struct opie_frame_s opie_frame_t; |
19 | struct opie_frame_s { | 21 | struct opie_frame_s { |
20 | vo_frame_t frame; | 22 | vo_frame_t frame; |
21 | char* name; | 23 | char* name; |
22 | int version; | 24 | int version; |
23 | int m_width; | 25 | int m_width; |
24 | int m_height; | 26 | int m_height; |
25 | uint8_t *chunk[3]; | 27 | uint8_t *chunk[3]; |
26 | null_driver_t *output; | 28 | null_driver_t *output; |
27 | }; | 29 | }; |
28 | 30 | ||
29 | static uint32_t null_get_capabilities(vo_driver_t *self ){ | 31 | static uint32_t null_get_capabilities(vo_driver_t *self ){ |
30 | null_driver_t* this = (null_driver_t*)self; | 32 | null_driver_t* this = (null_driver_t*)self; |
31 | printf("capabilities\n"); | 33 | printf("capabilities\n"); |
32 | return this->m_capabilities; | 34 | return this->m_capabilities; |
33 | } | 35 | } |
34 | 36 | ||
35 | /* take care of the frame*/ | 37 | /* take care of the frame*/ |
36 | static void null_frame_dispose( vo_frame_t* vo_img){ | 38 | static void null_frame_dispose( vo_frame_t* vo_img){ |
37 | opie_frame_t* frame = (opie_frame_t*)vo_img; | 39 | opie_frame_t* frame = (opie_frame_t*)vo_img; |
38 | printf("frame_dispose\n"); | 40 | printf("frame_dispose\n"); |
39 | free (frame); | 41 | free (frame); |
40 | } | 42 | } |
@@ -126,58 +128,91 @@ static void null_get_property_min_max( vo_driver_t* self, | |||
126 | int property, int *min, | 128 | int property, int *min, |
127 | int *max ){ | 129 | int *max ){ |
128 | printf("min max\n"); | 130 | printf("min max\n"); |
129 | *max = 0; | 131 | *max = 0; |
130 | *min = 0; | 132 | *min = 0; |
131 | } | 133 | } |
132 | static int null_gui_data_exchange( vo_driver_t* self, | 134 | static int null_gui_data_exchange( vo_driver_t* self, |
133 | int data_type, | 135 | int data_type, |
134 | void *data ){ | 136 | void *data ){ |
135 | return 0; | 137 | return 0; |
136 | } | 138 | } |
137 | static void null_exit( vo_driver_t* self ){ | 139 | static void null_exit( vo_driver_t* self ){ |
138 | null_driver_t* this = (null_driver_t*)self; | 140 | null_driver_t* this = (null_driver_t*)self; |
139 | free ( this ); | 141 | free ( this ); |
140 | } | 142 | } |
141 | static int null_redraw_needed( vo_driver_t* self ){ | 143 | static int null_redraw_needed( vo_driver_t* self ){ |
142 | return 0; | 144 | return 0; |
143 | } | 145 | } |
144 | 146 | ||
145 | 147 | ||
146 | vo_driver_t* init_video_out_plugin( config_values_t* conf, | 148 | vo_driver_t* init_video_out_plugin( config_values_t* conf, |
147 | void* video ){ | 149 | void* video ){ |
148 | null_driver_t *vo; | 150 | null_driver_t *vo; |
149 | vo = (null_driver_t*)malloc( sizeof(null_driver_t ) ); | 151 | vo = (null_driver_t*)malloc( sizeof(null_driver_t ) ); |
152 | vo->m_show_video = 0; // false | ||
153 | vo->m_video_fullscreen = 0; | ||
154 | vo->m_is_scaling = 0; | ||
150 | /* memset? */ | 155 | /* memset? */ |
151 | 156 | ||
152 | /* install callback handlers*/ | 157 | /* install callback handlers*/ |
153 | vo->vo_driver.get_capabilities = null_get_capabilities; | 158 | vo->vo_driver.get_capabilities = null_get_capabilities; |
154 | vo->vo_driver.alloc_frame = null_alloc_frame; | 159 | vo->vo_driver.alloc_frame = null_alloc_frame; |
155 | vo->vo_driver.update_frame_format = null_update_frame_format; | 160 | vo->vo_driver.update_frame_format = null_update_frame_format; |
156 | vo->vo_driver.display_frame = null_display_frame; | 161 | vo->vo_driver.display_frame = null_display_frame; |
157 | vo->vo_driver.overlay_blend = null_overlay_blend; | 162 | vo->vo_driver.overlay_blend = null_overlay_blend; |
158 | vo->vo_driver.get_property = null_get_property; | 163 | vo->vo_driver.get_property = null_get_property; |
159 | vo->vo_driver.set_property = null_set_property; | 164 | vo->vo_driver.set_property = null_set_property; |
160 | vo->vo_driver.get_property_min_max = null_get_property_min_max; | 165 | vo->vo_driver.get_property_min_max = null_get_property_min_max; |
161 | vo->vo_driver.gui_data_exchange = null_gui_data_exchange; | 166 | vo->vo_driver.gui_data_exchange = null_gui_data_exchange; |
162 | vo->vo_driver.exit = null_exit; | 167 | vo->vo_driver.exit = null_exit; |
163 | vo->vo_driver.redraw_needed = null_redraw_needed; | 168 | vo->vo_driver.redraw_needed = null_redraw_needed; |
164 | 169 | ||
165 | 170 | ||
166 | /* capabilities */ | 171 | /* capabilities */ |
167 | vo->m_capabilities = /*VO_CAP_COPIES_IMAGE |*/ VO_CAP_YV12 | VO_CAP_BRIGHTNESS; | 172 | vo->m_capabilities = /*VO_CAP_COPIES_IMAGE |*/ VO_CAP_YV12 | VO_CAP_BRIGHTNESS; |
168 | printf("done initialisation\n"); | 173 | printf("done initialisation\n"); |
169 | return (vo_driver_t*) vo; | 174 | return (vo_driver_t*) vo; |
170 | } | 175 | } |
171 | 176 | ||
172 | static vo_info_t vo_info_null = { | 177 | static vo_info_t vo_info_null = { |
173 | 5, | 178 | 5, |
174 | "null plugin", | 179 | "null plugin", |
175 | NULL, | 180 | NULL, |
176 | VISUAL_TYPE_FB, | 181 | VISUAL_TYPE_FB, |
177 | 5 | 182 | 5 |
178 | }; | 183 | }; |
179 | 184 | ||
180 | vo_info_t *get_video_out_plugin_info(){ | 185 | vo_info_t *get_video_out_plugin_info(){ |
181 | vo_info_null.description = _("xine video output plugin using null device"); | 186 | vo_info_null.description = _("xine video output plugin using null device"); |
182 | return &vo_info_null; | 187 | return &vo_info_null; |
183 | } | 188 | } |
189 | |||
190 | /* this is special for this device */ | ||
191 | /** | ||
192 | * We know that we will be controled by the XINE LIB++ | ||
193 | */ | ||
194 | |||
195 | /** | ||
196 | * | ||
197 | */ | ||
198 | int null_is_showing_video( vo_driver_t* self ){ | ||
199 | null_driver_t* this = (null_driver_t*)self; | ||
200 | return this->m_show_video; | ||
201 | } | ||
202 | void null_set_show_video( vo_driver_t* self, int show ) { | ||
203 | ((null_driver_t*)self)->m_show_video = show; | ||
204 | } | ||
205 | |||
206 | int null_is_fullscreen( vo_driver_t* self ){ | ||
207 | return ((null_driver_t*)self)->m_video_fullscreen; | ||
208 | } | ||
209 | void null_set_fullscreen( vo_driver_t* self, int screen ){ | ||
210 | ((null_driver_t*)self)->m_video_fullscreen = screen; | ||
211 | } | ||
212 | int null_is_scaling( vo_driver_t* self ){ | ||
213 | return ((null_driver_t*)self)->m_is_scaling; | ||
214 | } | ||
215 | void null_set_scaling( vo_driver_t* self, int scale ){ | ||
216 | ((null_driver_t*)self)->m_is_scaling = scale; | ||
217 | } | ||
218 | |||