Diffstat (limited to 'noncore/multimedia/opieplayer2/nullvideo.c') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/nullvideo.c | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/nullvideo.c b/noncore/multimedia/opieplayer2/nullvideo.c index bd52869..ceda333 100644 --- a/noncore/multimedia/opieplayer2/nullvideo.c +++ b/noncore/multimedia/opieplayer2/nullvideo.c | |||
@@ -1,12 +1,44 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> | ||
5 | Copyright (c) 2002 L. Potter <ljp@llornkcor.com> | ||
6 | Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> | ||
7 | =. | ||
8 | .=l. | ||
9 | .>+-= | ||
10 | _;:, .> :=|. This program is free software; you can | ||
11 | .> <`_, > . <= redistribute it and/or modify it under | ||
12 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
13 | .="- .-=="i, .._ License as published by the Free Software | ||
14 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
15 | ._= =} : or (at your option) any later version. | ||
16 | .%`+i> _;_. | ||
17 | .i_,=:_. -<s. This program is distributed in the hope that | ||
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
19 | : .. .:, . . . without even the implied warranty of | ||
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
22 | ..}^=.= = ; General Public License for more | ||
23 | ++= -. .` .: details. | ||
24 | : = ...= . :.=- | ||
25 | -. .:....=;==+<; You should have received a copy of the GNU | ||
26 | -_. . . )=. = General Public License along with | ||
27 | -- :-=` this library; see the file COPYING.LIB. | ||
28 | If not, write to the Free Software Foundation, | ||
29 | Inc., 59 Temple Place - Suite 330, | ||
30 | Boston, MA 02111-1307, USA. | ||
31 | |||
32 | */ | ||
1 | 33 | ||
2 | /*#include <xine.h>*/ | 34 | /*#include <xine.h>*/ |
3 | #include <stdlib.h> | 35 | #include <stdlib.h> |
4 | #include <stdio.h> | 36 | #include <stdio.h> |
5 | 37 | ||
6 | #include <math.h> | 38 | #include <math.h> |
7 | 39 | ||
8 | #include <xine/video_out.h> | 40 | #include <xine/video_out.h> |
9 | #include <xine/xine_internal.h> | 41 | #include <xine/xine_internal.h> |
10 | #include <xine/xineutils.h> | 42 | #include <xine/xineutils.h> |
11 | #include <xine/configfile.h> | 43 | #include <xine/configfile.h> |
12 | 44 | ||
@@ -22,25 +54,25 @@ typedef void (*display_xine_frame_t) (void *user_data, uint8_t* frame, | |||
22 | 54 | ||
23 | typedef struct null_driver_s null_driver_t; | 55 | typedef struct null_driver_s null_driver_t; |
24 | 56 | ||
25 | struct null_driver_s { | 57 | struct null_driver_s { |
26 | vo_driver_t vo_driver; | 58 | vo_driver_t vo_driver; |
27 | uint32_t m_capabilities; | 59 | uint32_t m_capabilities; |
28 | int m_show_video; | 60 | int m_show_video; |
29 | int m_video_fullscreen; | 61 | int m_video_fullscreen; |
30 | int m_is_scaling; | 62 | int m_is_scaling; |
31 | int depth, bpp, bytes_per_pixel; | 63 | int depth, bpp, bytes_per_pixel; |
32 | int yuv2rgb_mode; | 64 | int yuv2rgb_mode; |
33 | int yuv2rgb_swap; | 65 | int yuv2rgb_swap; |
34 | int zuv2rgb_gamma; | 66 | int yuv2rgb_gamma; |
35 | uint8_t *yuv2rgb_cmap; | 67 | uint8_t *yuv2rgb_cmap; |
36 | yuv2rgb_factory_t *yuv2rgb_factory; | 68 | yuv2rgb_factory_t *yuv2rgb_factory; |
37 | vo_overlay_t *overlay; | 69 | vo_overlay_t *overlay; |
38 | int user_ratio; | 70 | int user_ratio; |
39 | double output_scale_factor; | 71 | double output_scale_factor; |
40 | int last_frame_output_width; | 72 | int last_frame_output_width; |
41 | int last_frame_output_height; | 73 | int last_frame_output_height; |
42 | int gui_width; | 74 | int gui_width; |
43 | int gui_height; | 75 | int gui_height; |
44 | int gui_changed; | 76 | int gui_changed; |
45 | double display_ratio; | 77 | double display_ratio; |
46 | void* caller; | 78 | void* caller; |
@@ -596,34 +628,42 @@ void null_set_show_video( vo_driver_t* self, int show ) { | |||
596 | ((null_driver_t*)self)->m_show_video = show; | 628 | ((null_driver_t*)self)->m_show_video = show; |
597 | } | 629 | } |
598 | 630 | ||
599 | int null_is_fullscreen( vo_driver_t* self ){ | 631 | int null_is_fullscreen( vo_driver_t* self ){ |
600 | return ((null_driver_t*)self)->m_video_fullscreen; | 632 | return ((null_driver_t*)self)->m_video_fullscreen; |
601 | } | 633 | } |
602 | void null_set_fullscreen( vo_driver_t* self, int screen ){ | 634 | void null_set_fullscreen( vo_driver_t* self, int screen ){ |
603 | ((null_driver_t*)self)->m_video_fullscreen = screen; | 635 | ((null_driver_t*)self)->m_video_fullscreen = screen; |
604 | } | 636 | } |
605 | int null_is_scaling( vo_driver_t* self ){ | 637 | int null_is_scaling( vo_driver_t* self ){ |
606 | return ((null_driver_t*)self)->m_is_scaling; | 638 | return ((null_driver_t*)self)->m_is_scaling; |
607 | } | 639 | } |
640 | |||
641 | void null_set_videoGamma( vo_driver_t* self , int value ) { | ||
642 | ((null_driver_t*) self) ->yuv2rgb_gamma = value; | ||
643 | ((null_driver_t*) self) ->yuv2rgb_factory->set_gamma( ((null_driver_t*) self) ->yuv2rgb_factory, value ); | ||
644 | } | ||
645 | |||
608 | void null_set_scaling( vo_driver_t* self, int scale ){ | 646 | void null_set_scaling( vo_driver_t* self, int scale ){ |
609 | ((null_driver_t*)self)->m_is_scaling = scale; | 647 | ((null_driver_t*)self)->m_is_scaling = scale; |
610 | } | 648 | } |
611 | 649 | ||
612 | void null_set_gui_width( vo_driver_t* self, int width ){ | 650 | void null_set_gui_width( vo_driver_t* self, int width ){ |
613 | ((null_driver_t*)self)->gui_width = width; | 651 | ((null_driver_t*)self)->gui_width = width; |
614 | } | 652 | } |
615 | void null_set_gui_height( vo_driver_t* self, int height ){ | 653 | void null_set_gui_height( vo_driver_t* self, int height ){ |
616 | ((null_driver_t*)self)->gui_height = height; | 654 | ((null_driver_t*)self)->gui_height = height; |
617 | } | 655 | } |
656 | |||
657 | |||
618 | void null_set_mode( vo_driver_t* self, int depth, int rgb ){ | 658 | void null_set_mode( vo_driver_t* self, int depth, int rgb ){ |
619 | null_driver_t* this = (null_driver_t*)self; | 659 | null_driver_t* this = (null_driver_t*)self; |
620 | 660 | ||
621 | this->bytes_per_pixel = (depth + 7 ) / 8; | 661 | this->bytes_per_pixel = (depth + 7 ) / 8; |
622 | this->bpp = this->bytes_per_pixel * 8; | 662 | this->bpp = this->bytes_per_pixel * 8; |
623 | this->depth = depth; | 663 | this->depth = depth; |
624 | printf("depth %d %d\n", depth, this->bpp); | 664 | printf("depth %d %d\n", depth, this->bpp); |
625 | printf("pixeltype %d\n", rgb ); | 665 | printf("pixeltype %d\n", rgb ); |
626 | switch ( this->depth ){ | 666 | switch ( this->depth ){ |
627 | case 32: | 667 | case 32: |
628 | if( rgb == 0 ) | 668 | if( rgb == 0 ) |
629 | this->yuv2rgb_mode = MODE_32_RGB; | 669 | this->yuv2rgb_mode = MODE_32_RGB; |
@@ -661,12 +701,13 @@ void null_set_mode( vo_driver_t* self, int depth, int rgb ){ | |||
661 | this->yuv2rgb_mode = MODE_8_BGR; | 701 | this->yuv2rgb_mode = MODE_8_BGR; |
662 | break; | 702 | break; |
663 | }; | 703 | }; |
664 | //free(this->yuv2rgb_factory ); | 704 | //free(this->yuv2rgb_factory ); |
665 | // this->yuv2rgb_factory = yuv2rgb_factory_init (this->yuv2rgb_mode, this->yuv2rgb_swap, | 705 | // this->yuv2rgb_factory = yuv2rgb_factory_init (this->yuv2rgb_mode, this->yuv2rgb_swap, |
666 | // this->yuv2rgb_cmap); | 706 | // this->yuv2rgb_cmap); |
667 | }; | 707 | }; |
668 | void null_display_handler(vo_driver_t* self, display_xine_frame_t t, void* user_data) { | 708 | void null_display_handler(vo_driver_t* self, display_xine_frame_t t, void* user_data) { |
669 | null_driver_t* this = (null_driver_t*) self; | 709 | null_driver_t* this = (null_driver_t*) self; |
670 | this->caller = user_data; | 710 | this->caller = user_data; |
671 | this->frameDis = t; | 711 | this->frameDis = t; |
672 | } | 712 | } |
713 | |||