summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/nullvideo.c
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/nullvideo.c') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/nullvideo.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/nullvideo.c b/noncore/multimedia/opieplayer2/nullvideo.c
index 3a18a40..5ee8d5d 100644
--- a/noncore/multimedia/opieplayer2/nullvideo.c
+++ b/noncore/multimedia/opieplayer2/nullvideo.c
@@ -55,24 +55,25 @@ struct opie_frame_s {
55 int version; 55 int version;
56 int width; 56 int width;
57 int height; 57 int height;
58 int ratio_code; 58 int ratio_code;
59 int format; 59 int format;
60 int flags; 60 int flags;
61 int user_ratio; 61 int user_ratio;
62 62
63 double ratio_factor; 63 double ratio_factor;
64 int ideal_width; 64 int ideal_width;
65 int ideal_height; 65 int ideal_height;
66 int output_width, output_height; 66 int output_width, output_height;
67 int gui_width, gui_height;
67 uint8_t *chunk[3]; 68 uint8_t *chunk[3];
68 69
69 yuv2rgb_t *yuv2rgb; 70 yuv2rgb_t *yuv2rgb;
70 uint8_t *rgb_dst; 71 uint8_t *rgb_dst;
71 int yuv_stride; 72 int yuv_stride;
72 int stripe_height, stripe_inc; 73 int stripe_height, stripe_inc;
73 74
74 int bytes_per_line; 75 int bytes_per_line;
75 uint8_t *data; 76 uint8_t *data;
76 77
77// int show_video; 78// int show_video;
78 null_driver_t *output; 79 null_driver_t *output;
@@ -284,35 +285,37 @@ static void null_update_frame_format( vo_driver_t* self, vo_frame_t* img,
284 printf("al crash aye?\n"); 285 printf("al crash aye?\n");
285 286
286 flags &= VO_BOTH_FIELDS; 287 flags &= VO_BOTH_FIELDS;
287 288
288 /* find out if we need to adapt this frame */ 289 /* find out if we need to adapt this frame */
289 290
290 if ((width != frame->width) 291 if ((width != frame->width)
291 || (height != frame->height) 292 || (height != frame->height)
292 || (ratio_code != frame->ratio_code) 293 || (ratio_code != frame->ratio_code)
293 || (flags != frame->flags) 294 || (flags != frame->flags)
294 || (format != frame->format) 295 || (format != frame->format)
295 || (this->user_ratio != frame->user_ratio) 296 || (this->user_ratio != frame->user_ratio)
296 || this->gui_changed ) { 297 || (this->gui_width != frame-> gui_width )
298 || (this-> gui_height != frame-> gui_height)) {
297 299
298 frame->width = width; 300 frame->width = width;
299 frame->height = height; 301 frame->height = height;
300 frame->ratio_code = ratio_code; 302 frame->ratio_code = ratio_code;
301 frame->flags = flags; 303 frame->flags = flags;
302 frame->format = format; 304 frame->format = format;
303 frame->user_ratio = this->user_ratio; 305 frame->user_ratio = this->user_ratio;
304 this->gui_changed = 0; 306 this->gui_changed = 0;
305 //frame->show_video = this->m_show_video; 307 //frame->show_video = this->m_show_video;
306 308 frame->gui_width = this->gui_width;
309 frame->gui_height = this->gui_height;
307 310
308 null_compute_ideal_size (this, frame); 311 null_compute_ideal_size (this, frame);
309 null_compute_rgb_size (this, frame); 312 null_compute_rgb_size (this, frame);
310 313
311 /* 314 /*
312 * (re-) allocate 315 * (re-) allocate
313 */ 316 */
314 if( frame->data ) { 317 if( frame->data ) {
315 if(frame->chunk[0] ){ 318 if(frame->chunk[0] ){
316 free( frame->chunk[0] ); 319 free( frame->chunk[0] );
317 frame->chunk[0] = NULL; 320 frame->chunk[0] = NULL;
318 } 321 }
@@ -527,26 +530,26 @@ static int null_redraw_needed( vo_driver_t* self ){
527vo_driver_t* init_video_out_plugin( config_values_t* conf, 530vo_driver_t* init_video_out_plugin( config_values_t* conf,
528 void* video ){ 531 void* video ){
529 null_driver_t *vo; 532 null_driver_t *vo;
530 vo = (null_driver_t*)malloc( sizeof(null_driver_t ) ); 533 vo = (null_driver_t*)malloc( sizeof(null_driver_t ) );
531 534
532 /* memset? */ 535 /* memset? */
533 memset(vo,0, sizeof(null_driver_t ) ); 536 memset(vo,0, sizeof(null_driver_t ) );
534 vo->m_show_video = 0; // false 537 vo->m_show_video = 0; // false
535 vo->m_video_fullscreen = 0; 538 vo->m_video_fullscreen = 0;
536 vo->m_is_scaling = 0; 539 vo->m_is_scaling = 0;
537 vo->user_ratio = ASPECT_AUTO; 540 vo->user_ratio = ASPECT_AUTO;
538 vo->display_ratio = 1.0; 541 vo->display_ratio = 1.0;
539 vo->gui_width = 200; 542 vo->gui_width = 16;
540 vo->gui_height = 150; 543 vo->gui_height = 8;
541 vo->frameDis = NULL; 544 vo->frameDis = NULL;
542 545
543 /* install callback handlers*/ 546 /* install callback handlers*/
544 vo->vo_driver.get_capabilities = null_get_capabilities; 547 vo->vo_driver.get_capabilities = null_get_capabilities;
545 vo->vo_driver.alloc_frame = null_alloc_frame; 548 vo->vo_driver.alloc_frame = null_alloc_frame;
546 vo->vo_driver.update_frame_format = null_update_frame_format; 549 vo->vo_driver.update_frame_format = null_update_frame_format;
547 vo->vo_driver.display_frame = null_display_frame; 550 vo->vo_driver.display_frame = null_display_frame;
548 vo->vo_driver.overlay_blend = null_overlay_blend; 551 vo->vo_driver.overlay_blend = null_overlay_blend;
549 vo->vo_driver.get_property = null_get_property; 552 vo->vo_driver.get_property = null_get_property;
550 vo->vo_driver.set_property = null_set_property; 553 vo->vo_driver.set_property = null_set_property;
551 vo->vo_driver.get_property_min_max = null_get_property_min_max; 554 vo->vo_driver.get_property_min_max = null_get_property_min_max;
552 vo->vo_driver.gui_data_exchange = null_gui_data_exchange; 555 vo->vo_driver.gui_data_exchange = null_gui_data_exchange;