summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/lib.cpp
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opieplayer2/lib.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index b2143a0..748ae1f 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -51,24 +51,25 @@ typedef void (*display_xine_frame_t) (void *user_data, uint8_t* frame,
extern "C" {
vo_driver_t* init_video_out_plugin( config_values_t* conf, void* video);
int null_is_showing_video( vo_driver_t* self );
void null_set_show_video( vo_driver_t* self, int show );
int null_is_fullscreen( vo_driver_t* self );
void null_set_fullscreen( vo_driver_t* self, int screen );
int null_is_scaling( vo_driver_t* self );
void null_set_scaling( vo_driver_t* self, int scale );
void null_set_gui_width( vo_driver_t* self, int width );
void null_set_gui_height( vo_driver_t* self, int height );
void null_set_mode( vo_driver_t* self, int depth, int rgb );
+ void null_set_videoGamma( vo_driver_t* self , int value );
void null_display_handler(vo_driver_t* self, display_xine_frame_t t, void* user_data);
}
using namespace XINE;
Lib::Lib(XineVideoWidget* widget) {
m_video = false;
m_wid = widget;
printf("Lib");
QCString str( getenv("HOME") );
str += "/Settings/opiexine.cf";
// get the configuration
@@ -83,25 +84,25 @@ Lib::Lib(XineVideoWidget* widget) {
}
m_config = xine_config_file_init( str.data() );
// allocate oss for sound
// and fb for framebuffer
m_audioOutput= xine_load_audio_output_plugin( m_config, "oss") ;
m_videoOutput = ::init_video_out_plugin( m_config, NULL );
if (m_wid != 0 ) {
printf("!0\n" );
resize ( m_wid-> size ( ));
::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() );
- m_wid-> setImage ( new QImage ( Resource::loadImage("")));
+ m_wid-> setImage ( new QImage ( Resource::loadImage("") ) );
m_wid->repaint();
}
null_display_handler( m_videoOutput,
xine_display_frame,
this );
m_xine = xine_init( m_videoOutput,
m_audioOutput, m_config );
// install the event handler
xine_register_event_listener( m_xine, xine_event_handler, this );
}
@@ -194,24 +195,30 @@ void Lib::setShowVideo( bool video ) {
bool Lib::isShowingVideo() {
return ::null_is_showing_video( m_videoOutput );
}
void Lib::showVideoFullScreen( bool fullScreen ) {
::null_set_fullscreen( m_videoOutput, fullScreen );
}
bool Lib::isVideoFullScreen() {
return ::null_is_fullscreen( m_videoOutput );
}
void Lib::setScaling( bool scale ) {
::null_set_scaling( m_videoOutput, scale );
}
+
+void Lib::setGamma( int value ) {
+ //qDebug( QString( "%1").arg(value) );
+ ::null_set_videoGamma( m_videoOutput, value );
+}
+
bool Lib::isScaling() {
return ::null_is_scaling( m_videoOutput );
}
void Lib::xine_event_handler( void* user_data, xine_event_t* t ) {
((Lib*)user_data)->handleXineEvent( t );
}
void Lib::xine_display_frame( void* user_data, uint8_t *frame,
int width, int height, int bytes ) {
((Lib*)user_data)->drawFrame( frame, width, height, bytes );
}
void Lib::drawFrame( uint8_t* frame, int width, int height, int bytes ) {