summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/lib.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/lib.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp29
1 files changed, 13 insertions, 16 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index eb57b67..00c534a 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -73,10 +73,5 @@ Lib::Lib(XineVideoWidget* widget) {
73 printf("!0\n" ); 73 printf("!0\n" );
74 ::null_set_gui_width( m_videoOutput, m_wid->image()->width() ); 74 resize ( m_wid-> size ( ));
75 ::null_set_gui_height(m_videoOutput, m_wid->image()->height() );
76 ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() ); 75 ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() );
77 m_bytes_per_pixel = ( qt_screen->depth() + 7 ) / 8; 76 m_wid-> setImage ( new QImage ( Resource::loadImage("")));
78 QImage image = Resource::loadImage("");
79 image = image.smoothScale( m_wid->width(), m_wid->height() );
80 QImage* img = new QImage( image );
81 m_wid->setImage( img );
82 m_wid->repaint(); 77 m_wid->repaint();
@@ -102,2 +97,10 @@ Lib::~Lib() {
102 97
98void Lib::resize ( const QSize &s )
99{
100 if ( s. width ( ) && s. height ( )) {
101 ::null_set_gui_width( m_videoOutput, s. width() );
102 ::null_set_gui_height(m_videoOutput, s. height() );
103 }
104}
105
103QCString Lib::version() { 106QCString Lib::version() {
@@ -189,5 +192,4 @@ void Lib::xine_display_frame( void* user_data, uint8_t *frame,
189 int width, int height, int bytes ) { 192 int width, int height, int bytes ) {
190// printf("display x frame"); 193
191 ((Lib*)user_data)->drawFrame( frame, width, height, bytes ); 194 ((Lib*)user_data)->drawFrame( frame, width, height, bytes );
192// printf("displayed x frame\n");
193} 195}
@@ -200,8 +202,3 @@ void Lib::drawFrame( uint8_t* frame, int width, int height, int bytes ) {
200 202
201 QSize size = m_wid->size(); 203 m_wid->setImage( frame, width, height, bytes );
202 int xoffset = (size.width() - width) / 2;
203 int yoffset = (size.height() - height) / 2;
204 int linestep = qt_screen->linestep();
205
206 m_wid->setImage( frame, yoffset, xoffset, width, height, linestep, bytes, m_bytes_per_pixel );
207// m_wid->repaint(false); 204// m_wid->repaint(false);