summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-14 17:00:16 (UTC)
committer simon <simon>2002-12-14 17:00:16 (UTC)
commitbbdeff25bd0cc5ff59d52fd8bf25cdfbeac8f251 (patch) (unidiff)
tree6357471675db58fbf6d1d9d168618635c2e5cbf6
parent354b07f236773c0dbb642972a7dffb598ea1af2f (diff)
downloadopie-bbdeff25bd0cc5ff59d52fd8bf25cdfbeac8f251.zip
opie-bbdeff25bd0cc5ff59d52fd8bf25cdfbeac8f251.tar.gz
opie-bbdeff25bd0cc5ff59d52fd8bf25cdfbeac8f251.tar.bz2
- skip the free_(audio|video)_decoder calls. today's libvorbis doesn't
like it
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/nullvideo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/nullvideo.c b/noncore/multimedia/opieplayer2/nullvideo.c
index e2eb663..a49f9d3 100644
--- a/noncore/multimedia/opieplayer2/nullvideo.c
+++ b/noncore/multimedia/opieplayer2/nullvideo.c
@@ -435,201 +435,201 @@ static void null_get_property_min_max( vo_driver_t* self,
435 *min = 0; 435 *min = 0;
436} 436}
437static int null_gui_data_exchange( vo_driver_t* self, 437static int null_gui_data_exchange( vo_driver_t* self,
438 int data_type, 438 int data_type,
439 void *data ){ 439 void *data ){
440 return 0; 440 return 0;
441} 441}
442 442
443static void null_dispose ( vo_driver_t* self ){ 443static void null_dispose ( vo_driver_t* self ){
444 null_driver_t* this = (null_driver_t*)self; 444 null_driver_t* this = (null_driver_t*)self;
445 free ( this ); 445 free ( this );
446} 446}
447static int null_redraw_needed( vo_driver_t* self ){ 447static int null_redraw_needed( vo_driver_t* self ){
448 return 0; 448 return 0;
449} 449}
450 450
451 451
452xine_vo_driver_t* init_video_out_plugin( xine_t *xine, 452xine_vo_driver_t* init_video_out_plugin( xine_t *xine,
453 void* video, display_xine_frame_t frameDisplayFunc, void *userData ){ 453 void* video, display_xine_frame_t frameDisplayFunc, void *userData ){
454 null_driver_t *vo; 454 null_driver_t *vo;
455 vo = (null_driver_t*)malloc( sizeof(null_driver_t ) ); 455 vo = (null_driver_t*)malloc( sizeof(null_driver_t ) );
456 456
457 /* memset? */ 457 /* memset? */
458 memset(vo,0, sizeof(null_driver_t ) ); 458 memset(vo,0, sizeof(null_driver_t ) );
459 459
460 vo_scale_init (&vo->sc, 0, 0, xine->config); 460 vo_scale_init (&vo->sc, 0, 0, xine->config);
461 461
462 vo->sc.gui_pixel_aspect = 1.0; 462 vo->sc.gui_pixel_aspect = 1.0;
463 463
464 vo->m_show_video = 0; // false 464 vo->m_show_video = 0; // false
465 vo->m_video_fullscreen = 0; 465 vo->m_video_fullscreen = 0;
466 vo->m_is_scaling = 0; 466 vo->m_is_scaling = 0;
467 vo->display_ratio = 1.0; 467 vo->display_ratio = 1.0;
468 vo->gui_width = 16; 468 vo->gui_width = 16;
469 vo->gui_height = 8; 469 vo->gui_height = 8;
470 vo->frameDis = NULL; 470 vo->frameDis = NULL;
471 471
472 /* install callback handlers*/ 472 /* install callback handlers*/
473 vo->vo_driver.get_capabilities = null_get_capabilities; 473 vo->vo_driver.get_capabilities = null_get_capabilities;
474 vo->vo_driver.alloc_frame = null_alloc_frame; 474 vo->vo_driver.alloc_frame = null_alloc_frame;
475 vo->vo_driver.update_frame_format = null_update_frame_format; 475 vo->vo_driver.update_frame_format = null_update_frame_format;
476 vo->vo_driver.display_frame = null_display_frame; 476 vo->vo_driver.display_frame = null_display_frame;
477 vo->vo_driver.overlay_blend = null_overlay_blend; 477 vo->vo_driver.overlay_blend = null_overlay_blend;
478 vo->vo_driver.get_property = null_get_property; 478 vo->vo_driver.get_property = null_get_property;
479 vo->vo_driver.set_property = null_set_property; 479 vo->vo_driver.set_property = null_set_property;
480 vo->vo_driver.get_property_min_max = null_get_property_min_max; 480 vo->vo_driver.get_property_min_max = null_get_property_min_max;
481 vo->vo_driver.gui_data_exchange = null_gui_data_exchange; 481 vo->vo_driver.gui_data_exchange = null_gui_data_exchange;
482 vo->vo_driver.dispose = null_dispose; 482 vo->vo_driver.dispose = null_dispose;
483 vo->vo_driver.redraw_needed = null_redraw_needed; 483 vo->vo_driver.redraw_needed = null_redraw_needed;
484 484
485 485
486 /* capabilities */ 486 /* capabilities */
487 vo->m_capabilities = VO_CAP_COPIES_IMAGE | VO_CAP_YUY2 | VO_CAP_YV12; 487 vo->m_capabilities = VO_CAP_COPIES_IMAGE | VO_CAP_YUY2 | VO_CAP_YV12;
488 vo->yuv2rgb_factory = yuv2rgb_factory_init (MODE_16_RGB, vo->yuv2rgb_swap, 488 vo->yuv2rgb_factory = yuv2rgb_factory_init (MODE_16_RGB, vo->yuv2rgb_swap,
489 vo->yuv2rgb_cmap); 489 vo->yuv2rgb_cmap);
490 490
491 vo->caller = userData; 491 vo->caller = userData;
492 vo->frameDis = frameDisplayFunc; 492 vo->frameDis = frameDisplayFunc;
493 493
494 /* return ( vo_driver_t*) vo; */ 494 /* return ( vo_driver_t*) vo; */
495 return vo_new_port( xine, ( vo_driver_t* )vo ); 495 return vo_new_port( xine, ( vo_driver_t* )vo );
496} 496}
497 497
498#if 0 498#if 0
499static vo_info_t vo_info_null = { 499static vo_info_t vo_info_null = {
500 5, 500 5,
501 XINE_VISUAL_TYPE_FB 501 XINE_VISUAL_TYPE_FB
502}; 502};
503 503
504vo_info_t *get_video_out_plugin_info(){ 504vo_info_t *get_video_out_plugin_info(){
505 vo_info_null.description = ("xine video output plugin using null device"); 505 vo_info_null.description = ("xine video output plugin using null device");
506 return &vo_info_null; 506 return &vo_info_null;
507} 507}
508 508
509#endif 509#endif
510 510
511/* this is special for this device */ 511/* this is special for this device */
512/** 512/**
513 * We know that we will be controled by the XINE LIB++ 513 * We know that we will be controled by the XINE LIB++
514 */ 514 */
515 515
516/** 516/**
517 * 517 *
518 */ 518 */
519int null_is_showing_video( xine_vo_driver_t* self ){ 519int null_is_showing_video( xine_vo_driver_t* self ){
520 null_driver_t* this = (null_driver_t*)self->driver; 520 null_driver_t* this = (null_driver_t*)self->driver;
521 return this->m_show_video; 521 return this->m_show_video;
522} 522}
523void null_set_show_video( xine_vo_driver_t* self, int show ) { 523void null_set_show_video( xine_vo_driver_t* self, int show ) {
524 ((null_driver_t*)self->driver)->m_show_video = show; 524 ((null_driver_t*)self->driver)->m_show_video = show;
525} 525}
526 526
527int null_is_fullscreen( xine_vo_driver_t* self ){ 527int null_is_fullscreen( xine_vo_driver_t* self ){
528 return ((null_driver_t*)self->driver)->m_video_fullscreen; 528 return ((null_driver_t*)self->driver)->m_video_fullscreen;
529} 529}
530void null_set_fullscreen( xine_vo_driver_t* self, int screen ){ 530void null_set_fullscreen( xine_vo_driver_t* self, int screen ){
531 ((null_driver_t*)self->driver)->m_video_fullscreen = screen; 531 ((null_driver_t*)self->driver)->m_video_fullscreen = screen;
532} 532}
533int null_is_scaling( xine_vo_driver_t* self ){ 533int null_is_scaling( xine_vo_driver_t* self ){
534 return ((null_driver_t*)self->driver)->m_is_scaling; 534 return ((null_driver_t*)self->driver)->m_is_scaling;
535} 535}
536 536
537void null_set_videoGamma( xine_vo_driver_t* self , int value ) { 537void null_set_videoGamma( xine_vo_driver_t* self , int value ) {
538 ((null_driver_t*) self->driver) ->yuv2rgb_gamma = value; 538 ((null_driver_t*) self->driver) ->yuv2rgb_gamma = value;
539 ((null_driver_t*) self->driver) ->yuv2rgb_factory->set_gamma( ((null_driver_t*) self->driver) ->yuv2rgb_factory, value ); 539 ((null_driver_t*) self->driver) ->yuv2rgb_factory->set_gamma( ((null_driver_t*) self->driver) ->yuv2rgb_factory, value );
540} 540}
541 541
542void null_set_scaling( xine_vo_driver_t* self, int scale ) { 542void null_set_scaling( xine_vo_driver_t* self, int scale ) {
543 ((null_driver_t*)self->driver)->m_is_scaling = scale; 543 ((null_driver_t*)self->driver)->m_is_scaling = scale;
544} 544}
545 545
546void null_set_gui_width( xine_vo_driver_t* self, int width ) { 546void null_set_gui_width( xine_vo_driver_t* self, int width ) {
547 ((null_driver_t*)self->driver)->gui_width = width; 547 ((null_driver_t*)self->driver)->gui_width = width;
548} 548}
549void null_set_gui_height( xine_vo_driver_t* self, int height ) { 549void null_set_gui_height( xine_vo_driver_t* self, int height ) {
550 ((null_driver_t*)self->driver)->gui_height = height; 550 ((null_driver_t*)self->driver)->gui_height = height;
551} 551}
552 552
553 553
554void null_set_mode( xine_vo_driver_t* self, int depth, int rgb ) { 554void null_set_mode( xine_vo_driver_t* self, int depth, int rgb ) {
555 null_driver_t* this = (null_driver_t*)self->driver; 555 null_driver_t* this = (null_driver_t*)self->driver;
556 556
557 this->bytes_per_pixel = (depth + 7 ) / 8; 557 this->bytes_per_pixel = (depth + 7 ) / 8;
558 this->bpp = this->bytes_per_pixel * 8; 558 this->bpp = this->bytes_per_pixel * 8;
559 this->depth = depth; 559 this->depth = depth;
560 printf("depth %d %d\n", depth, this->bpp); 560 printf("depth %d %d\n", depth, this->bpp);
561 printf("pixeltype %d\n", rgb ); 561 printf("pixeltype %d\n", rgb );
562 switch ( this->depth ) { 562 switch ( this->depth ) {
563 case 32: 563 case 32:
564 if( rgb == 0 ) 564 if( rgb == 0 )
565 this->yuv2rgb_mode = MODE_32_RGB; 565 this->yuv2rgb_mode = MODE_32_RGB;
566 else 566 else
567 this->yuv2rgb_mode = MODE_32_BGR; 567 this->yuv2rgb_mode = MODE_32_BGR;
568 case 24: 568 case 24:
569 if( this->bpp == 32 ) { 569 if( this->bpp == 32 ) {
570 if( rgb == 0 ) { 570 if( rgb == 0 ) {
571 this->yuv2rgb_mode = MODE_32_RGB; 571 this->yuv2rgb_mode = MODE_32_RGB;
572 } else { 572 } else {
573 this->yuv2rgb_mode = MODE_32_BGR; 573 this->yuv2rgb_mode = MODE_32_BGR;
574 } 574 }
575 }else{ 575 }else{
576 if( rgb == 0 ) 576 if( rgb == 0 )
577 this->yuv2rgb_mode = MODE_24_RGB; 577 this->yuv2rgb_mode = MODE_24_RGB;
578 else 578 else
579 this->yuv2rgb_mode = MODE_24_BGR; 579 this->yuv2rgb_mode = MODE_24_BGR;
580 }; 580 };
581 break; 581 break;
582 case 16: 582 case 16:
583 if( rgb == 0 ) { 583 if( rgb == 0 ) {
584 this->yuv2rgb_mode = MODE_16_RGB; 584 this->yuv2rgb_mode = MODE_16_RGB;
585 } else { 585 } else {
586 this->yuv2rgb_mode = MODE_16_BGR; 586 this->yuv2rgb_mode = MODE_16_BGR;
587 } 587 }
588 break; 588 break;
589 case 15: 589 case 15:
590 if( rgb == 0 ) { 590 if( rgb == 0 ) {
591 this->yuv2rgb_mode = MODE_15_RGB; 591 this->yuv2rgb_mode = MODE_15_RGB;
592 } else { 592 } else {
593 this->yuv2rgb_mode = MODE_15_BGR; 593 this->yuv2rgb_mode = MODE_15_BGR;
594 } 594 }
595 break; 595 break;
596 case 8: 596 case 8:
597 if( rgb == 0 ) { 597 if( rgb == 0 ) {
598 this->yuv2rgb_mode = MODE_8_RGB; 598 this->yuv2rgb_mode = MODE_8_RGB;
599 } else { 599 } else {
600 this->yuv2rgb_mode = MODE_8_BGR; 600 this->yuv2rgb_mode = MODE_8_BGR;
601 } 601 }
602 break; 602 break;
603 }; 603 };
604 //free(this->yuv2rgb_factory ); 604 //free(this->yuv2rgb_factory );
605 // this->yuv2rgb_factory = yuv2rgb_factory_init (this->yuv2rgb_mode, this->yuv2rgb_swap, 605 // this->yuv2rgb_factory = yuv2rgb_factory_init (this->yuv2rgb_mode, this->yuv2rgb_swap,
606 // this->yuv2rgb_cmap); 606 // this->yuv2rgb_cmap);
607}; 607};
608 608
609void null_display_handler( xine_vo_driver_t* self, display_xine_frame_t t, 609void null_display_handler( xine_vo_driver_t* self, display_xine_frame_t t,
610 void* user_data ) { 610 void* user_data ) {
611 null_driver_t* this = (null_driver_t*) self->driver; 611 null_driver_t* this = (null_driver_t*) self->driver;
612 this->caller = user_data; 612 this->caller = user_data;
613 this->frameDis = t; 613 this->frameDis = t;
614} 614}
615 615
616void null_preload_decoders( xine_stream_t *stream ) 616void null_preload_decoders( xine_stream_t *stream )
617{ 617{
618 static const uint32_t preloadedAudioDecoders[] = { BUF_AUDIO_MPEG, BUF_AUDIO_VORBIS }; 618 static const uint32_t preloadedAudioDecoders[] = { BUF_AUDIO_MPEG, BUF_AUDIO_VORBIS };
619 static const uint8_t preloadedAudioDecoderCount = sizeof( preloadedAudioDecoders ) / sizeof( preloadedAudioDecoders[ 0 ] ); 619 static const uint8_t preloadedAudioDecoderCount = sizeof( preloadedAudioDecoders ) / sizeof( preloadedAudioDecoders[ 0 ] );
620 static const uint32_t preloadedVideoDecoders[] = { BUF_VIDEO_MPEG, BUF_VIDEO_MPEG4, BUF_VIDEO_DIVX5 }; 620 static const uint32_t preloadedVideoDecoders[] = { BUF_VIDEO_MPEG, BUF_VIDEO_MPEG4, BUF_VIDEO_DIVX5 };
621 static const uint8_t preloadedVideoDecoderCount = sizeof( preloadedVideoDecoders ) / sizeof( preloadedVideoDecoders[ 0 ] ); 621 static const uint8_t preloadedVideoDecoderCount = sizeof( preloadedVideoDecoders ) / sizeof( preloadedVideoDecoders[ 0 ] );
622 622
623 uint8_t i; 623 uint8_t i;
624 624
625 for ( i = 0; i < preloadedAudioDecoderCount; ++i ) { 625 for ( i = 0; i < preloadedAudioDecoderCount; ++i ) {
626 audio_decoder_t *decoder = get_audio_decoder( stream, ( preloadedAudioDecoders[ i ] >> 16 ) & 0xff ); 626 audio_decoder_t *decoder = get_audio_decoder( stream, ( preloadedAudioDecoders[ i ] >> 16 ) & 0xff );
627 free_audio_decoder( stream, decoder ); 627/* free_audio_decoder( stream, decoder ); */
628 } 628 }
629 629
630 for ( i = 0; i < preloadedVideoDecoderCount; ++i ) { 630 for ( i = 0; i < preloadedVideoDecoderCount; ++i ) {
631 video_decoder_t *decoder = get_video_decoder( stream, ( preloadedVideoDecoders[ i ] >> 16 ) & 0xff ); 631 video_decoder_t *decoder = get_video_decoder( stream, ( preloadedVideoDecoders[ i ] >> 16 ) & 0xff );
632 free_video_decoder( stream, decoder ); 632/* free_video_decoder( stream, decoder ); */
633 } 633 }
634} 634}
635 635