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 @@ +/* + This file is part of the Opie Project + + Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> + Copyright (c) 2002 L. Potter <ljp@llornkcor.com> + Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> + =. + .=l. + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ /*#include <xine.h>*/ #include <stdlib.h> #include <stdio.h> #include <math.h> #include <xine/video_out.h> #include <xine/xine_internal.h> #include <xine/xineutils.h> #include <xine/configfile.h> @@ -22,25 +54,25 @@ typedef void (*display_xine_frame_t) (void *user_data, uint8_t* frame, typedef struct null_driver_s null_driver_t; struct null_driver_s { vo_driver_t vo_driver; uint32_t m_capabilities; int m_show_video; int m_video_fullscreen; int m_is_scaling; int depth, bpp, bytes_per_pixel; int yuv2rgb_mode; int yuv2rgb_swap; - int zuv2rgb_gamma; + int yuv2rgb_gamma; uint8_t *yuv2rgb_cmap; yuv2rgb_factory_t *yuv2rgb_factory; vo_overlay_t *overlay; int user_ratio; double output_scale_factor; int last_frame_output_width; int last_frame_output_height; int gui_width; int gui_height; int gui_changed; double display_ratio; void* caller; @@ -596,34 +628,42 @@ void null_set_show_video( vo_driver_t* self, int show ) { ((null_driver_t*)self)->m_show_video = show; } int null_is_fullscreen( vo_driver_t* self ){ return ((null_driver_t*)self)->m_video_fullscreen; } void null_set_fullscreen( vo_driver_t* self, int screen ){ ((null_driver_t*)self)->m_video_fullscreen = screen; } int null_is_scaling( vo_driver_t* self ){ return ((null_driver_t*)self)->m_is_scaling; } + +void null_set_videoGamma( vo_driver_t* self , int value ) { + ((null_driver_t*) self) ->yuv2rgb_gamma = value; + ((null_driver_t*) self) ->yuv2rgb_factory->set_gamma( ((null_driver_t*) self) ->yuv2rgb_factory, value ); +} + void null_set_scaling( vo_driver_t* self, int scale ){ ((null_driver_t*)self)->m_is_scaling = scale; } void null_set_gui_width( vo_driver_t* self, int width ){ ((null_driver_t*)self)->gui_width = width; } void null_set_gui_height( vo_driver_t* self, int height ){ ((null_driver_t*)self)->gui_height = height; } + + void null_set_mode( vo_driver_t* self, int depth, int rgb ){ null_driver_t* this = (null_driver_t*)self; this->bytes_per_pixel = (depth + 7 ) / 8; this->bpp = this->bytes_per_pixel * 8; this->depth = depth; printf("depth %d %d\n", depth, this->bpp); printf("pixeltype %d\n", rgb ); switch ( this->depth ){ case 32: if( rgb == 0 ) this->yuv2rgb_mode = MODE_32_RGB; @@ -661,12 +701,13 @@ void null_set_mode( vo_driver_t* self, int depth, int rgb ){ this->yuv2rgb_mode = MODE_8_BGR; break; }; //free(this->yuv2rgb_factory ); // this->yuv2rgb_factory = yuv2rgb_factory_init (this->yuv2rgb_mode, this->yuv2rgb_swap, // this->yuv2rgb_cmap); }; void null_display_handler(vo_driver_t* self, display_xine_frame_t t, void* user_data) { null_driver_t* this = (null_driver_t*) self; this->caller = user_data; this->frameDis = t; } + |