-rw-r--r-- | noncore/multimedia/opieplayer2/nullvideo.c | 4 |
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 | |||
@@ -499,137 +499,137 @@ xine_vo_driver_t* init_video_out_plugin( xine_t *xine, | |||
499 | static vo_info_t vo_info_null = { | 499 | static vo_info_t vo_info_null = { |
500 | 5, | 500 | 5, |
501 | XINE_VISUAL_TYPE_FB | 501 | XINE_VISUAL_TYPE_FB |
502 | }; | 502 | }; |
503 | 503 | ||
504 | vo_info_t *get_video_out_plugin_info(){ | 504 | vo_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 | */ |
519 | int null_is_showing_video( xine_vo_driver_t* self ){ | 519 | int 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 | } |
523 | void null_set_show_video( xine_vo_driver_t* self, int show ) { | 523 | void 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 | ||
527 | int null_is_fullscreen( xine_vo_driver_t* self ){ | 527 | int 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 | } |
530 | void null_set_fullscreen( xine_vo_driver_t* self, int screen ){ | 530 | void 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 | } |
533 | int null_is_scaling( xine_vo_driver_t* self ){ | 533 | int 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 | ||
537 | void null_set_videoGamma( xine_vo_driver_t* self , int value ) { | 537 | void 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 | ||
542 | void null_set_scaling( xine_vo_driver_t* self, int scale ) { | 542 | void 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 | ||
546 | void null_set_gui_width( xine_vo_driver_t* self, int width ) { | 546 | void 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 | } |
549 | void null_set_gui_height( xine_vo_driver_t* self, int height ) { | 549 | void 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 | ||
554 | void null_set_mode( xine_vo_driver_t* self, int depth, int rgb ) { | 554 | void 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 | ||
609 | void null_display_handler( xine_vo_driver_t* self, display_xine_frame_t t, | 609 | void 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 | ||
616 | void null_preload_decoders( xine_stream_t *stream ) | 616 | void 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 | ||