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.c292
1 files changed, 126 insertions, 166 deletions
diff --git a/noncore/multimedia/opieplayer2/nullvideo.c b/noncore/multimedia/opieplayer2/nullvideo.c
index 6769a37..99fa329 100644
--- a/noncore/multimedia/opieplayer2/nullvideo.c
+++ b/noncore/multimedia/opieplayer2/nullvideo.c
@@ -2,7 +2,6 @@
2                This file is part of the Opie Project 2                This file is part of the Opie Project
3 3
4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> 4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
5 Copyright (c) 2002 LJP <>
6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> 5 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
7 Copyright (c) 2002-2003 Miguel Freitas of xine 6 Copyright (c) 2002-2003 Miguel Freitas of xine
8 =. 7 =.
@@ -40,7 +39,6 @@
40#include <xine.h> 39#include <xine.h>
41#include <xine/video_out.h> 40#include <xine/video_out.h>
42#include <xine/xine_internal.h> 41#include <xine/xine_internal.h>
43//#include <xine/xineutils.h>
44#include <xine/vo_scale.h> 42#include <xine/vo_scale.h>
45#include <xine/buffer.h> 43#include <xine/buffer.h>
46 44
@@ -51,40 +49,43 @@
51#define printf(x,...) 49#define printf(x,...)
52 50
53/* 51/*
54#define LOG 52 * #define LOG
55*/ 53 */
56 54
57/* the caller for our event draw handler */ 55/* the caller for our event draw handler */
58typedef void (*display_xine_frame_t) (void *user_data, uint8_t* frame, 56typedef void (*display_xine_frame_t) (void *user_data, uint8_t* frame,
59 int width, int height,int bytes ); 57 int width, int height,int bytes );
58typedef void (*vo_scale_cb) (void*, int, int, double,
59 int*, int*, int*, double*, int*, int* );
60typedef void (*dest_size_cb) (void*, int, int, double, int*, int*, double*);
61
60 62
61typedef struct null_driver_s null_driver_t; 63typedef struct null_driver_s null_driver_t;
62 64
63struct null_driver_s { 65struct null_driver_s {
64 vo_driver_t vo_driver; 66 vo_driver_t vo_driver;
65 67
66 uint32_t m_capabilities;
67 int m_show_video; 68 int m_show_video;
68 int m_video_fullscreen; 69 int m_video_fullscreen;
69 int m_is_scaling;
70 70
71 int depth, bpp, bytes_per_pixel; 71 int depth, bpp, bytes_per_pixel;
72 int yuv2rgb_mode; 72 int yuv2rgb_mode;
73 int yuv2rgb_swap; 73 int yuv2rgb_swap;
74 int yuv2rgb_gamma; 74 int yuv2rgb_brightness;
75 uint8_t *yuv2rgb_cmap; 75 uint8_t *yuv2rgb_cmap;
76 yuv2rgb_factory_t *yuv2rgb_factory; 76 yuv2rgb_factory_t *yuv2rgb_factory;
77 77
78 vo_overlay_t *overlay; 78 vo_overlay_t *overlay;
79 vo_scale_t sc; 79 vo_scale_t sc;
80
81 int gui_width;
82 int gui_height;
83 int gui_changed;
84 80
85 double display_ratio; 81 /*
86 void* caller; 82 * DISPLAY to widget...
83 */
87 display_xine_frame_t frameDis; 84 display_xine_frame_t frameDis;
85 void *userData;
86
87 xine_t *xine;
88 alphablend_t alphablend_extra_data;
88}; 89};
89 90
90typedef struct opie_frame_s opie_frame_t; 91typedef struct opie_frame_s opie_frame_t;
@@ -105,13 +106,13 @@ struct opie_frame_s {
105 uint8_t *rgb_dst; 106 uint8_t *rgb_dst;
106 int yuv_stride; 107 int yuv_stride;
107 int stripe_height, stripe_inc; 108 int stripe_height, stripe_inc;
108 109
109 null_driver_t *output; 110 null_driver_t *output;
110}; 111};
111 112
112static uint32_t null_get_capabilities( vo_driver_t *self ){ 113static uint32_t null_get_capabilities( vo_driver_t *self ){
113 null_driver_t* this = (null_driver_t*)self; 114 self = self;
114 return this->m_capabilities; 115 return VO_CAP_YUY2 | VO_CAP_YV12;
115} 116}
116 117
117static void null_frame_proc_slice (vo_frame_t *vo_img, uint8_t **src) { 118static void null_frame_proc_slice (vo_frame_t *vo_img, uint8_t **src) {
@@ -119,8 +120,18 @@ static void null_frame_proc_slice (vo_frame_t *vo_img, uint8_t **src) {
119 120
120 vo_img->proc_called = 1; 121 vo_img->proc_called = 1;
121 122
122 if (!frame->output->m_show_video) { 123 /*
123 /* printf("nullvideo: no video\n"); */ 124 * drop hard if we don't show the video
125 */
126 if (!frame->output->m_show_video)
127 return;
128
129 if( frame->frame.crop_left || frame->frame.crop_top ||
130 frame->frame.crop_right || frame->frame.crop_bottom )
131 {
132 /* we don't support crop, so don't even waste cpu cycles.
133 * cropping will be performed by video_out.c
134 */
124 return; 135 return;
125 } 136 }
126 137
@@ -142,15 +153,15 @@ static void null_frame_field (vo_frame_t *vo_img, int which_field) {
142 153
143 switch (which_field) { 154 switch (which_field) {
144 case VO_TOP_FIELD: 155 case VO_TOP_FIELD:
145 frame->rgb_dst = (uint8_t *)frame->data; 156 frame->rgb_dst = frame->data;
146 frame->stripe_inc = 2*frame->stripe_height * frame->bytes_per_line; 157 frame->stripe_inc = 2*frame->stripe_height * frame->bytes_per_line;
147 break; 158 break;
148 case VO_BOTTOM_FIELD: 159 case VO_BOTTOM_FIELD:
149 frame->rgb_dst = (uint8_t *)frame->data + frame->bytes_per_line ; 160 frame->rgb_dst = frame->data + frame->bytes_per_line ;
150 frame->stripe_inc = 2*frame->stripe_height * frame->bytes_per_line; 161 frame->stripe_inc = 2*frame->stripe_height * frame->bytes_per_line;
151 break; 162 break;
152 case VO_BOTH_FIELDS: 163 case VO_BOTH_FIELDS:
153 frame->rgb_dst = (uint8_t *)frame->data; 164 frame->rgb_dst = frame->data;
154 break; 165 break;
155 } 166 }
156} 167}
@@ -177,6 +188,8 @@ static vo_frame_t* null_alloc_frame( vo_driver_t* self ){
177#endif 188#endif
178 189
179 frame = (opie_frame_t*)xine_xmalloc ( sizeof(opie_frame_t) ); 190 frame = (opie_frame_t*)xine_xmalloc ( sizeof(opie_frame_t) );
191 if(!frame)
192 return NULL;
180 193
181 memcpy (&frame->sc, &this->sc, sizeof(vo_scale_t)); 194 memcpy (&frame->sc, &this->sc, sizeof(vo_scale_t));
182 195
@@ -187,6 +200,7 @@ static vo_frame_t* null_alloc_frame( vo_driver_t* self ){
187 /* initialize the frame*/ 200 /* initialize the frame*/
188 frame->frame.driver = self; 201 frame->frame.driver = self;
189 frame->frame.proc_slice = null_frame_proc_slice; 202 frame->frame.proc_slice = null_frame_proc_slice;
203 frame->frame.proc_frame = NULL;
190 frame->frame.field = null_frame_field; 204 frame->frame.field = null_frame_field;
191 frame->frame.dispose = null_frame_dispose; 205 frame->frame.dispose = null_frame_dispose;
192 206
@@ -199,7 +213,7 @@ static vo_frame_t* null_alloc_frame( vo_driver_t* self ){
199} 213}
200 214
201 215
202static void null_frame_compute_ideal_size( null_driver_t *this, 216static void null_frame_compute_ideal_size( null_driver_t *this,
203 opie_frame_t *frame ) { 217 opie_frame_t *frame ) {
204 this = this; 218 this = this;
205 219
@@ -229,23 +243,22 @@ static void null_frame_reallocate( null_driver_t *this, opie_frame_t *frame,
229 /* 243 /*
230 * (re-) allocate 244 * (re-) allocate
231 */ 245 */
232 if( frame->data ) { 246 if( frame->chunk[0] ){
233 if( frame->chunk[0] ){ 247 free( frame->chunk[0] );
234 free( frame->chunk[0] ); 248 frame->chunk[0] = NULL;
235 frame->chunk[0] = NULL; 249 }
236 } 250 if( frame->chunk[1] ){
237 if( frame->chunk[1] ){ 251 free ( frame->chunk[1] );
238 free ( frame->chunk[1] ); 252 frame->chunk[1] = NULL;
239 frame->chunk[1] = NULL;
240 }
241 if( frame->chunk[2] ){
242 free ( frame->chunk[2] );
243 frame->chunk[2] = NULL;
244 }
245 free ( frame->data );
246 } 253 }
254 if( frame->chunk[2] ){
255 free ( frame->chunk[2] );
256 frame->chunk[2] = NULL;
257 }
258 if(frame->data)
259 free ( frame->data );
247 260
248 frame->data = xine_xmalloc (frame->sc.output_width 261 frame->data = xine_xmalloc (frame->sc.output_width
249 * frame->sc.output_height 262 * frame->sc.output_height
250 * this->bytes_per_pixel ); 263 * this->bytes_per_pixel );
251 264
@@ -301,7 +314,7 @@ static void null_setup_colorspace_converter(opie_frame_t *frame, int flags ) {
301 314
302static void null_update_frame_format( vo_driver_t* self, vo_frame_t* img, 315static void null_update_frame_format( vo_driver_t* self, vo_frame_t* img,
303 uint32_t width, uint32_t height, 316 uint32_t width, uint32_t height,
304 double ratio_code, int format, 317 double ratio_code, int format,
305 int flags ){ 318 int flags ){
306 null_driver_t* this = (null_driver_t*) self; 319 null_driver_t* this = (null_driver_t*) self;
307 opie_frame_t* frame = (opie_frame_t*)img; 320 opie_frame_t* frame = (opie_frame_t*)img;
@@ -310,28 +323,33 @@ static void null_update_frame_format( vo_driver_t* self, vo_frame_t* img,
310 fprintf (stderr, "nullvideo: update_frame_format\n"); 323 fprintf (stderr, "nullvideo: update_frame_format\n");
311#endif 324#endif
312 325
326 int gui_width = 0;
327 int gui_height = 0;
328 double gui_pixel_aspect = 0.0;
329
313 flags &= VO_BOTH_FIELDS; 330 flags &= VO_BOTH_FIELDS;
314 331
315 /* find out if we need to adapt this frame */ 332 frame->sc.dest_size_cb(frame->sc.user_data, width, height,
333 frame->sc.video_pixel_aspect,
334 &gui_width, &gui_height, &gui_pixel_aspect);
316 335
336 /* find out if we need to adapt this frame */
317 if ((width != frame->sc.delivered_width) 337 if ((width != frame->sc.delivered_width)
318 || (height != frame->sc.delivered_height) 338 || (height != frame->sc.delivered_height)
319 || (ratio_code != frame->sc.delivered_ratio) 339 || (ratio_code != frame->sc.delivered_ratio)
320 || (flags != frame->flags) 340 || (flags != frame->flags)
321 || (format != frame->format) 341 || (format != frame->format)
322 || (this->sc.user_ratio != frame->sc.user_ratio) 342 || (this->sc.user_ratio != frame->sc.user_ratio)
323 || (this->gui_width != frame->sc.gui_width) 343 || (gui_width != frame->sc.gui_width)
324 || (this->gui_height != frame->sc.gui_height)) { 344 || (gui_height != frame->sc.gui_height)) {
325
326 frame->sc.delivered_width = width; 345 frame->sc.delivered_width = width;
327 frame->sc.delivered_height = height; 346 frame->sc.delivered_height = height;
328 frame->sc.delivered_ratio = ratio_code; 347 frame->sc.delivered_ratio = ratio_code;
329 frame->flags = flags; 348 frame->flags = flags;
330 frame->format = format; 349 frame->format = format;
331 frame->sc.user_ratio = this->sc.user_ratio; 350 frame->sc.user_ratio = this->sc.user_ratio;
332 frame->sc.gui_width = this->gui_width; 351 frame->sc.gui_width = gui_width;
333 frame->sc.gui_height = this->gui_height; 352 frame->sc.gui_height = gui_height;
334 frame->sc.gui_pixel_aspect = 1.0;
335 353
336 354
337 null_frame_compute_ideal_size(this, frame); 355 null_frame_compute_ideal_size(this, frame);
@@ -363,15 +381,15 @@ static void null_update_frame_format( vo_driver_t* self, vo_frame_t* img,
363 if (frame->data) { 381 if (frame->data) {
364 switch (flags) { 382 switch (flags) {
365 case VO_TOP_FIELD: 383 case VO_TOP_FIELD:
366 frame->rgb_dst = (uint8_t *)frame->data; 384 frame->rgb_dst = frame->data;
367 frame->stripe_inc = 2 * frame->stripe_height * frame->bytes_per_line; 385 frame->stripe_inc = 2 * frame->stripe_height * frame->bytes_per_line;
368 break; 386 break;
369 case VO_BOTTOM_FIELD: 387 case VO_BOTTOM_FIELD:
370 frame->rgb_dst = (uint8_t *)frame->data + frame->bytes_per_line ; 388 frame->rgb_dst = frame->data + frame->bytes_per_line ;
371 frame->stripe_inc = 2 * frame->stripe_height * frame->bytes_per_line; 389 frame->stripe_inc = 2 * frame->stripe_height * frame->bytes_per_line;
372 break; 390 break;
373 case VO_BOTH_FIELDS: 391 case VO_BOTH_FIELDS:
374 frame->rgb_dst = (uint8_t *)frame->data; 392 frame->rgb_dst = frame->data;
375 frame->stripe_inc = frame->stripe_height * frame->bytes_per_line; 393 frame->stripe_inc = frame->stripe_height * frame->bytes_per_line;
376 break; 394 break;
377 } 395 }
@@ -387,7 +405,7 @@ static void null_display_frame( vo_driver_t* self, vo_frame_t *frame_gen ){
387 return; 405 return;
388 406
389 if( display != NULL ) { 407 if( display != NULL ) {
390 (*display)(this->caller, frame->data, 408 (*display)(this->userData, frame->data,
391 frame->sc.output_width, frame->sc.output_height, 409 frame->sc.output_width, frame->sc.output_height,
392 frame->bytes_per_line ); 410 frame->bytes_per_line );
393 } 411 }
@@ -442,28 +460,31 @@ static void null_overlay_blend ( vo_driver_t *this_gen, vo_frame_t *frame_gen,
442 460
443 switch(this->bpp) { 461 switch(this->bpp) {
444 case 16: 462 case 16:
445 blend_rgb16((uint8_t *)frame->data, 463 blend_rgb16(frame->data,
446 overlay, 464 overlay,
447 frame->sc.output_width, 465 frame->sc.output_width,
448 frame->sc.output_height, 466 frame->sc.output_height,
449 frame->sc.delivered_width, 467 frame->sc.delivered_width,
450 frame->sc.delivered_height); 468 frame->sc.delivered_height,
469 &this->alphablend_extra_data);
451 break; 470 break;
452 case 24: 471 case 24:
453 blend_rgb24((uint8_t *)frame->data, 472 blend_rgb24(frame->data,
454 overlay, 473 overlay,
455 frame->sc.output_width, 474 frame->sc.output_width,
456 frame->sc.output_height, 475 frame->sc.output_height,
457 frame->sc.delivered_width, 476 frame->sc.delivered_width,
458 frame->sc.delivered_height); 477 frame->sc.delivered_height,
478 &this->alphablend_extra_data);
459 break; 479 break;
460 case 32: 480 case 32:
461 blend_rgb32((uint8_t *)frame->data, 481 blend_rgb32(frame->data,
462 overlay, 482 overlay,
463 frame->sc.output_width, 483 frame->sc.output_width,
464 frame->sc.output_height, 484 frame->sc.output_height,
465 frame->sc.delivered_width, 485 frame->sc.delivered_width,
466 frame->sc.delivered_height); 486 frame->sc.delivered_height,
487 &this->alphablend_extra_data);
467 break; 488 break;
468 default: 489 default:
469 /* It should never get here */ 490 /* It should never get here */
@@ -474,7 +495,6 @@ static void null_overlay_blend ( vo_driver_t *this_gen, vo_frame_t *frame_gen,
474 495
475 496
476static int null_get_property( vo_driver_t* self, int property ){ 497static int null_get_property( vo_driver_t* self, int property ){
477#if 0
478 null_driver_t *this = (null_driver_t *)self; 498 null_driver_t *this = (null_driver_t *)self;
479 499
480 switch(property) 500 switch(property)
@@ -490,16 +510,11 @@ static int null_get_property( vo_driver_t* self, int property ){
490 default: 510 default:
491 break; 511 break;
492 } 512 }
493#else
494 property = property;
495 self = self;
496#endif
497 513
498 return 0; 514 return 0;
499} 515}
500static int null_set_property( vo_driver_t* self, int property, 516static int null_set_property( vo_driver_t* self, int property,
501 int value ){ 517 int value ){
502#if 0
503 null_driver_t *this = (null_driver_t *)self; 518 null_driver_t *this = (null_driver_t *)self;
504 519
505 switch(property) 520 switch(property)
@@ -517,88 +532,84 @@ static int null_set_property( vo_driver_t* self, int property,
517 default: 532 default:
518 break; 533 break;
519 } 534 }
520#else
521 self = self;
522 property = property;
523#endif
524 535
525 return value; 536 return value;
526} 537}
527static void null_get_property_min_max( vo_driver_t* self, 538static void null_get_property_min_max( vo_driver_t* self,
528 int property, int *min, 539 int property, int *min,
529 int *max ){ 540 int *max ){
530 self = self; 541 if(property == VO_PROP_BRIGHTNESS) {
531 property = property; 542 *min = -100;
532 543 *max = +100;
533 *max = 0; 544 }else {
534 *min = 0; 545 *min = 0;
546 *max = 0;
547 }
535} 548}
536static int null_gui_data_exchange( vo_driver_t* self, 549static int null_gui_data_exchange( vo_driver_t* self,
537 int data_type, 550 int data_type,
538 void *data ){ 551 void *data ){
539 self = self;
540 data_type = data_type;
541 data = data;
542
543 return 0; 552 return 0;
544} 553}
545 554
546static void null_dispose ( vo_driver_t* self ){ 555static void null_dispose ( vo_driver_t* self ){
547 null_driver_t* this = (null_driver_t*)self; 556 null_driver_t* this = (null_driver_t*)self;
557 _x_alphablend_free(&this->alphablend_extra_data);
548 free ( this ); 558 free ( this );
549} 559}
550static int null_redraw_needed( vo_driver_t* self ){ 560static int null_redraw_needed( vo_driver_t* self ){
551 self = self; 561 null_driver_t *this = (null_driver_t*)self;
552 562 return _x_vo_scale_redraw_needed(&this->sc);
553 return 0;
554} 563}
555 564
556 565
557xine_video_port_t* init_video_out_plugin( xine_t *xine, 566xine_video_port_t* init_video_out_plugin( xine_t *xine,
558 void* video, 567 void* video,
559 display_xine_frame_t frameDisplayFunc, 568 display_xine_frame_t frameDisplayFunc,
560 void *userData ){ 569 void *userData, vo_scale_cb frame_cb,
561 video = video; 570 dest_size_cb dest_cb) {
562
563
564 null_driver_t *vo; 571 null_driver_t *vo;
565 vo = (null_driver_t*)malloc( sizeof(null_driver_t ) ); 572 vo = (null_driver_t*)xine_xmalloc(sizeof(null_driver_t ));
566 573 vo->xine = xine;
567 /* memset? */
568 memset(vo,0, sizeof(null_driver_t ) );
569 574
575 _x_alphablend_init(&vo->alphablend_extra_data, xine);
570 _x_vo_scale_init (&vo->sc, 0, 0, xine->config); 576 _x_vo_scale_init (&vo->sc, 0, 0, xine->config);
577 vo->sc.gui_width = 18;
578 vo->sc.gui_height = 6;
579 vo->sc.user_ratio = XINE_VO_ASPECT_AUTO;
580 vo->sc.user_data = userData;
581 vo->sc.frame_output_cb = frame_cb;
582 vo->sc.dest_size_cb = dest_cb;
571 583
572 vo->sc.gui_pixel_aspect = 1.0;
573 584
574 vo->m_show_video = 0; // false 585 vo->m_show_video = 0; // false
575 vo->m_video_fullscreen = 0;
576 vo->m_is_scaling = 0;
577 vo->display_ratio = 1.0;
578 vo->gui_width = 16;
579 vo->gui_height = 8;
580 vo->frameDis = NULL;
581 586
582 /* install callback handlers*/ 587 /* install callback handlers*/
583 vo->vo_driver.get_capabilities = null_get_capabilities; 588 vo->vo_driver.get_capabilities = null_get_capabilities;
584 vo->vo_driver.alloc_frame = null_alloc_frame; 589 vo->vo_driver.alloc_frame = null_alloc_frame;
585 vo->vo_driver.update_frame_format = null_update_frame_format; 590 vo->vo_driver.update_frame_format = null_update_frame_format;
586 vo->vo_driver.display_frame = null_display_frame; 591 vo->vo_driver.display_frame = null_display_frame;
587 vo->vo_driver.overlay_blend = null_overlay_blend; 592 vo->vo_driver.overlay_begin = 0;
588 vo->vo_driver.get_property = null_get_property; 593 vo->vo_driver.overlay_blend = null_overlay_blend;
589 vo->vo_driver.set_property = null_set_property; 594 vo->vo_driver.overlay_end = 0;
590 vo->vo_driver.get_property_min_max = null_get_property_min_max; 595 vo->vo_driver.get_property = null_get_property;
591 vo->vo_driver.gui_data_exchange = null_gui_data_exchange; 596 vo->vo_driver.set_property = null_set_property;
592 vo->vo_driver.dispose = null_dispose; 597 vo->vo_driver.get_property_min_max= null_get_property_min_max;
593 vo->vo_driver.redraw_needed = null_redraw_needed; 598 vo->vo_driver.gui_data_exchange = null_gui_data_exchange;
594 599 vo->vo_driver.dispose = null_dispose;
600 vo->vo_driver.redraw_needed = null_redraw_needed;
595 601
596 /* capabilities */ 602 /* capabilities */
597 vo->m_capabilities = VO_CAP_YUY2 | VO_CAP_YV12; 603 vo->yuv2rgb_mode = MODE_16_RGB;
598 vo->yuv2rgb_factory = yuv2rgb_factory_init (MODE_16_RGB, vo->yuv2rgb_swap, 604 vo->yuv2rgb_brightness = 0;
605 vo->yuv2rgb_factory = yuv2rgb_factory_init (vo->yuv2rgb_mode,
606 vo->yuv2rgb_swap,
599 vo->yuv2rgb_cmap); 607 vo->yuv2rgb_cmap);
608 vo->yuv2rgb_factory->set_csc_levels(vo->yuv2rgb_factory,
609 vo->yuv2rgb_brightness,
610 128,128);
600 611
601 vo->caller = userData; 612 vo->userData = userData;
602 vo->frameDis = frameDisplayFunc; 613 vo->frameDis = frameDisplayFunc;
603 614
604 return _x_vo_new_port(xine, &vo->vo_driver, 0); 615 return _x_vo_new_port(xine, &vo->vo_driver, 0);
@@ -621,31 +632,6 @@ void null_set_show_video( xine_vo_driver_t* self, int show ) {
621 ((null_driver_t*)self->driver)->m_show_video = show; 632 ((null_driver_t*)self->driver)->m_show_video = show;
622} 633}
623 634
624int null_is_fullscreen( xine_vo_driver_t* self ){
625 return ((null_driver_t*)self->driver)->m_video_fullscreen;
626}
627void null_set_fullscreen( xine_vo_driver_t* self, int screen ){
628 ((null_driver_t*)self->driver)->m_video_fullscreen = screen;
629}
630int null_is_scaling( xine_vo_driver_t* self ){
631 return ((null_driver_t*)self->driver)->m_is_scaling;
632}
633
634void null_set_videoGamma( xine_vo_driver_t* self , int value ) {
635 ((null_driver_t*) self->driver) ->yuv2rgb_gamma = value;
636 ((null_driver_t*) self->driver) ->yuv2rgb_factory->set_gamma( ((null_driver_t*) self->driver) ->yuv2rgb_factory, value );
637}
638
639void null_set_scaling( xine_vo_driver_t* self, int scale ) {
640 ((null_driver_t*)self->driver)->m_is_scaling = scale;
641}
642
643void null_set_gui_width( xine_vo_driver_t* self, int width ) {
644 ((null_driver_t*)self->driver)->gui_width = width;
645}
646void null_set_gui_height( xine_vo_driver_t* self, int height ) {
647 ((null_driver_t*)self->driver)->gui_height = height;
648}
649 635
650 636
651void null_set_mode( xine_vo_driver_t* self, int depth, int rgb ) { 637void null_set_mode( xine_vo_driver_t* self, int depth, int rgb ) {
@@ -654,7 +640,7 @@ void null_set_mode( xine_vo_driver_t* self, int depth, int rgb ) {
654 this->bytes_per_pixel = (depth + 7 ) / 8; 640 this->bytes_per_pixel = (depth + 7 ) / 8;
655 this->bpp = this->bytes_per_pixel * 8; 641 this->bpp = this->bytes_per_pixel * 8;
656 this->depth = depth; 642 this->depth = depth;
657 643
658 switch ( this->depth ) { 644 switch ( this->depth ) {
659 case 32: 645 case 32:
660 if( rgb == 0 ) 646 if( rgb == 0 )
@@ -697,39 +683,13 @@ void null_set_mode( xine_vo_driver_t* self, int depth, int rgb ) {
697 } 683 }
698 break; 684 break;
699 }; 685 };
700 //free(this->yuv2rgb_factory );
701 // this->yuv2rgb_factory = yuv2rgb_factory_init (this->yuv2rgb_mode, this->yuv2rgb_swap,
702 // this->yuv2rgb_cmap);
703}; 686};
704 687
705void null_display_handler( xine_vo_driver_t* self, display_xine_frame_t t, 688void null_display_handler( xine_vo_driver_t* self, display_xine_frame_t t,
706 void* user_data ) { 689 void* user_data ) {
707 null_driver_t* this = (null_driver_t*) self->driver; 690 null_driver_t* this = (null_driver_t*) self->driver;
708 this->caller = user_data; 691 this->userData = user_data;
709 this->frameDis = t; 692 this->frameDis = t;
710} 693}
711 694
712void null_preload_decoders( xine_stream_t *stream )
713{
714 static const uint32_t preloadedAudioDecoders[] = { BUF_AUDIO_MPEG, BUF_AUDIO_VORBIS };
715 static const uint8_t preloadedAudioDecoderCount = sizeof( preloadedAudioDecoders ) / sizeof( preloadedAudioDecoders[ 0 ] );
716 static const uint32_t preloadedVideoDecoders[] = { BUF_VIDEO_MPEG, BUF_VIDEO_MPEG4, BUF_VIDEO_DIVX5 };
717 static const uint8_t preloadedVideoDecoderCount = sizeof( preloadedVideoDecoders ) / sizeof( preloadedVideoDecoders[ 0 ] );
718
719 uint8_t i;
720#if 0
721
722 for ( i = 0; i < preloadedAudioDecoderCount; ++i ) {
723 audio_decoder_t *decoder = get_audio_decoder( stream, ( preloadedAudioDecoders[ i ] >> 16 ) & 0xff );
724 decoder = decoder;
725/* free_audio_decoder( stream, decoder ); */
726 }
727
728 for ( i = 0; i < preloadedVideoDecoderCount; ++i ) {
729 video_decoder_t *decoder = get_video_decoder( stream, ( preloadedVideoDecoders[ i ] >> 16 ) & 0xff );
730 decoder = decoder;
731/* free_video_decoder( stream, decoder ); */
732 }
733#endif
734}
735 695