summaryrefslogtreecommitdiff
path: root/core
authorzecke <zecke>2004-03-14 18:05:28 (UTC)
committer zecke <zecke>2004-03-14 18:05:28 (UTC)
commit9e54b8bd8343af7c301da17d82596d6027e53309 (patch) (unidiff)
tree693613ff9f1a0f3415e0623e636d47ac4798da2d /core
parent98bbe5561e8e1a862e19a3d0a0d49ed90ef15b54 (diff)
downloadopie-9e54b8bd8343af7c301da17d82596d6027e53309.zip
opie-9e54b8bd8343af7c301da17d82596d6027e53309.tar.gz
opie-9e54b8bd8343af7c301da17d82596d6027e53309.tar.bz2
OpiePlayer -> ODP
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiowidget.cpp1
-rw-r--r--core/multimedia/opieplayer/audiowidget.h4
-rw-r--r--core/multimedia/opieplayer/config.in2
-rw-r--r--core/multimedia/opieplayer/inputDialog.cpp3
-rw-r--r--core/multimedia/opieplayer/libflash/libflashpluginimpl.cpp2
-rw-r--r--core/multimedia/opieplayer/libmad/libmadpluginimpl.cpp2
-rw-r--r--core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.cpp2
-rw-r--r--core/multimedia/opieplayer/modplug/modpluginimpl.cpp2
-rw-r--r--core/multimedia/opieplayer/opieplayer.pro2
-rw-r--r--core/multimedia/opieplayer/videowidget.cpp6
-rw-r--r--core/multimedia/opieplayer/vorbis/libtremorpluginimpl.cpp2
-rw-r--r--core/multimedia/opieplayer/wavplugin/wavpluginimpl.cpp2
12 files changed, 23 insertions, 7 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp
index 8bcc567..7da2d54 100644
--- a/core/multimedia/opieplayer/audiowidget.cpp
+++ b/core/multimedia/opieplayer/audiowidget.cpp
@@ -13,48 +13,49 @@
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include <qpe/qpeapplication.h> 20#include <qpe/qpeapplication.h>
21#include <qpe/resource.h> 21#include <qpe/resource.h>
22#include <qpe/config.h> 22#include <qpe/config.h>
23 23
24#include <qdir.h> 24#include <qdir.h>
25#include "audiowidget.h" 25#include "audiowidget.h"
26#include "mediaplayerstate.h" 26#include "mediaplayerstate.h"
27 27
28#include <stdlib.h> 28#include <stdlib.h>
29#include <stdio.h> 29#include <stdio.h>
30 30
31extern MediaPlayerState *mediaPlayerState; 31extern MediaPlayerState *mediaPlayerState;
32 32
33 33
34static const int xo = -2; // movable x offset 34static const int xo = -2; // movable x offset
35static const int yo = 22; // movable y offset 35static const int yo = 22; // movable y offset
36 36
37using namespace Opie::Ui;
37struct MediaButton { 38struct MediaButton {
38 bool isToggle, isHeld, isDown; 39 bool isToggle, isHeld, isDown;
39}; 40};
40 41
41//Layout information for the audioButtons (and if it is a toggle button or not) 42//Layout information for the audioButtons (and if it is a toggle button or not)
42MediaButton audioButtons[] = { 43MediaButton audioButtons[] = {
43 { TRUE, FALSE, FALSE }, // play 44 { TRUE, FALSE, FALSE }, // play
44 { FALSE, FALSE, FALSE }, // stop 45 { FALSE, FALSE, FALSE }, // stop
45 { FALSE, FALSE, FALSE }, // next 46 { FALSE, FALSE, FALSE }, // next
46 { FALSE, FALSE, FALSE }, // previous 47 { FALSE, FALSE, FALSE }, // previous
47 { FALSE, FALSE, FALSE }, // volume up 48 { FALSE, FALSE, FALSE }, // volume up
48 { FALSE, FALSE, FALSE }, // volume down 49 { FALSE, FALSE, FALSE }, // volume down
49 { TRUE, FALSE, FALSE }, // repeat/loop 50 { TRUE, FALSE, FALSE }, // repeat/loop
50 { FALSE, FALSE, FALSE }, // playlist 51 { FALSE, FALSE, FALSE }, // playlist
51 { FALSE, FALSE, FALSE }, // forward 52 { FALSE, FALSE, FALSE }, // forward
52 { FALSE, FALSE, FALSE } // back 53 { FALSE, FALSE, FALSE } // back
53}; 54};
54 55
55const char *skin_mask_file_names[10] = { 56const char *skin_mask_file_names[10] = {
56 "play", "stop", "next", "prev", "up", 57 "play", "stop", "next", "prev", "up",
57 "down", "loop", "playlist", "forward", "back" 58 "down", "loop", "playlist", "forward", "back"
58}; 59};
59 60
60static void changeTextColor( QWidget *w ) { 61static void changeTextColor( QWidget *w ) {
diff --git a/core/multimedia/opieplayer/audiowidget.h b/core/multimedia/opieplayer/audiowidget.h
index 96bc55c..0a7cb26 100644
--- a/core/multimedia/opieplayer/audiowidget.h
+++ b/core/multimedia/opieplayer/audiowidget.h
@@ -10,49 +10,49 @@
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#ifndef AUDIO_WIDGET_H 21#ifndef AUDIO_WIDGET_H
22#define AUDIO_WIDGET_H 22#define AUDIO_WIDGET_H
23 23
24#include <qwidget.h> 24#include <qwidget.h>
25#include <qpainter.h> 25#include <qpainter.h>
26#include <qdrawutil.h> 26#include <qdrawutil.h>
27#include <qpixmap.h> 27#include <qpixmap.h>
28#include <qbitmap.h> 28#include <qbitmap.h>
29#include <qstring.h> 29#include <qstring.h>
30#include <qslider.h> 30#include <qslider.h>
31#include <qlineedit.h> 31#include <qlineedit.h>
32#include <qframe.h> 32#include <qframe.h>
33 33
34#include <opie/oticker.h> 34#include <opie2/oticker.h>
35 35
36class QPixmap; 36class QPixmap;
37 37
38enum AudioButtons { 38enum AudioButtons {
39 AudioPlay=0, 39 AudioPlay=0,
40 AudioStop, 40 AudioStop,
41 AudioNext, 41 AudioNext,
42 AudioPrevious, 42 AudioPrevious,
43 AudioVolumeUp, 43 AudioVolumeUp,
44 AudioVolumeDown, 44 AudioVolumeDown,
45 AudioLoop, 45 AudioLoop,
46 AudioPlayList, 46 AudioPlayList,
47 AudioForward, 47 AudioForward,
48 AudioBack 48 AudioBack
49}; 49};
50 50
51 51
52//#define USE_DBLBUF 52//#define USE_DBLBUF
53 53
54class AudioWidget : public QWidget { 54class AudioWidget : public QWidget {
55 Q_OBJECT 55 Q_OBJECT
56public: 56public:
57 AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); 57 AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 );
58 ~AudioWidget(); 58 ~AudioWidget();
@@ -85,34 +85,34 @@ protected:
85 void doUnblank(); 85 void doUnblank();
86 void paintEvent( QPaintEvent *pe ); 86 void paintEvent( QPaintEvent *pe );
87 void showEvent( QShowEvent *se ); 87 void showEvent( QShowEvent *se );
88 void resizeEvent( QResizeEvent *re ); 88 void resizeEvent( QResizeEvent *re );
89 void mouseMoveEvent( QMouseEvent *event ); 89 void mouseMoveEvent( QMouseEvent *event );
90 void mousePressEvent( QMouseEvent *event ); 90 void mousePressEvent( QMouseEvent *event );
91 void mouseReleaseEvent( QMouseEvent *event ); 91 void mouseReleaseEvent( QMouseEvent *event );
92 void timerEvent( QTimerEvent *event ); 92 void timerEvent( QTimerEvent *event );
93 void closeEvent( QCloseEvent *event ); 93 void closeEvent( QCloseEvent *event );
94 void keyReleaseEvent( QKeyEvent *e); 94 void keyReleaseEvent( QKeyEvent *e);
95private: 95private:
96 void toggleButton( int ); 96 void toggleButton( int );
97 void setToggleButton( int, bool ); 97 void setToggleButton( int, bool );
98 void paintButton( QPainter *p, int i ); 98 void paintButton( QPainter *p, int i );
99 QString skin; 99 QString skin;
100 QPixmap *pixBg; 100 QPixmap *pixBg;
101 QImage *imgUp; 101 QImage *imgUp;
102 QImage *imgDn; 102 QImage *imgDn;
103 QImage *imgButtonMask; 103 QImage *imgButtonMask;
104 QBitmap *masks[11]; 104 QBitmap *masks[11];
105 QPixmap *buttonPixUp[11]; 105 QPixmap *buttonPixUp[11];
106 QPixmap *buttonPixDown[11]; 106 QPixmap *buttonPixDown[11];
107 107
108 QPixmap *pixmaps[4]; 108 QPixmap *pixmaps[4];
109 OTicker songInfo; 109 Opie::Ui::OTicker songInfo;
110 QSlider slider; 110 QSlider slider;
111 QLineEdit time; 111 QLineEdit time;
112 int xoff, yoff; 112 int xoff, yoff;
113 113
114}; 114};
115 115
116 116
117#endif // AUDIO_WIDGET_H 117#endif // AUDIO_WIDGET_H
118 118
diff --git a/core/multimedia/opieplayer/config.in b/core/multimedia/opieplayer/config.in
index dc1b79a..d25b11f 100644
--- a/core/multimedia/opieplayer/config.in
+++ b/core/multimedia/opieplayer/config.in
@@ -1,12 +1,12 @@
1 config OPIEPLAYER 1 config OPIEPLAYER
2 boolean "opie-mediaplayer (mediaplayer that plays mp3, mpeg, and wav)" 2 boolean "opie-mediaplayer (mediaplayer that plays mp3, mpeg, and wav)"
3 default "y" 3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE 4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIEUI2
5 5
6 source core/multimedia/opieplayer/libflash/config.in 6 source core/multimedia/opieplayer/libflash/config.in
7 source core/multimedia/opieplayer/libmad/config.in 7 source core/multimedia/opieplayer/libmad/config.in
8 source core/multimedia/opieplayer/libmpeg3/config.in 8 source core/multimedia/opieplayer/libmpeg3/config.in
9 source core/multimedia/opieplayer/modplug/config.in 9 source core/multimedia/opieplayer/modplug/config.in
10 source core/multimedia/opieplayer/wavplugin/config.in 10 source core/multimedia/opieplayer/wavplugin/config.in
11 source core/multimedia/opieplayer/vorbis/tremor/config.in 11 source core/multimedia/opieplayer/vorbis/tremor/config.in
12 source core/multimedia/opieplayer/vorbis/config.in 12 source core/multimedia/opieplayer/vorbis/config.in
diff --git a/core/multimedia/opieplayer/inputDialog.cpp b/core/multimedia/opieplayer/inputDialog.cpp
index 38b8f53..44a1cdd 100644
--- a/core/multimedia/opieplayer/inputDialog.cpp
+++ b/core/multimedia/opieplayer/inputDialog.cpp
@@ -1,33 +1,34 @@
1#include "inputDialog.h" 1#include "inputDialog.h"
2 2
3#include <qpe/resource.h> 3#include <qpe/resource.h>
4 4
5#include <opie/ofiledialog.h> 5#include <opie2/ofiledialog.h>
6 6
7#include <qlineedit.h> 7#include <qlineedit.h>
8#include <qpushbutton.h> 8#include <qpushbutton.h>
9 9
10using namespace Opie::Ui;
10InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) 11InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
11 : QDialog( parent, name, modal, fl ) { 12 : QDialog( parent, name, modal, fl ) {
12 if ( !name ) { 13 if ( !name ) {
13 setName( "InputDialog" ); 14 setName( "InputDialog" );
14 } 15 }
15 resize( 234, 115); 16 resize( 234, 115);
16 setMaximumSize( QSize( 240, 40)); 17 setMaximumSize( QSize( 240, 40));
17 setCaption( tr( name ) ); 18 setCaption( tr( name ) );
18 19
19 QPushButton *browserButton; 20 QPushButton *browserButton;
20 browserButton = new QPushButton( Resource::loadIconSet("fileopen"),"",this,"BrowseButton"); 21 browserButton = new QPushButton( Resource::loadIconSet("fileopen"),"",this,"BrowseButton");
21 browserButton->setGeometry( QRect( 205, 10, 22, 22)); 22 browserButton->setGeometry( QRect( 205, 10, 22, 22));
22 connect( browserButton, SIGNAL(released()),this,SLOT(browse())); 23 connect( browserButton, SIGNAL(released()),this,SLOT(browse()));
23 LineEdit1 = new QLineEdit( this, "LineEdit1" ); 24 LineEdit1 = new QLineEdit( this, "LineEdit1" );
24 LineEdit1->setGeometry( QRect( 4, 10, 190, 22 ) ); 25 LineEdit1->setGeometry( QRect( 4, 10, 190, 22 ) );
25 LineEdit1->setFocus(); 26 LineEdit1->setFocus();
26} 27}
27/* 28/*
28 * return the current text(input) 29 * return the current text(input)
29 */ 30 */
30QString InputDialog::text() const { 31QString InputDialog::text() const {
31 return LineEdit1->text(); 32 return LineEdit1->text();
32} 33}
33/* 34/*
diff --git a/core/multimedia/opieplayer/libflash/libflashpluginimpl.cpp b/core/multimedia/opieplayer/libflash/libflashpluginimpl.cpp
index af2c07e..b2a1b5d 100644
--- a/core/multimedia/opieplayer/libflash/libflashpluginimpl.cpp
+++ b/core/multimedia/opieplayer/libflash/libflashpluginimpl.cpp
@@ -35,36 +35,38 @@ LibFlashPluginImpl::~LibFlashPluginImpl()
35 35
36 36
37MediaPlayerDecoder *LibFlashPluginImpl::decoder() 37MediaPlayerDecoder *LibFlashPluginImpl::decoder()
38{ 38{
39 if ( !libflashplugin ) 39 if ( !libflashplugin )
40 libflashplugin = new LibFlashPlugin; 40 libflashplugin = new LibFlashPlugin;
41 return libflashplugin; 41 return libflashplugin;
42} 42}
43 43
44 44
45MediaPlayerEncoder *LibFlashPluginImpl::encoder() 45MediaPlayerEncoder *LibFlashPluginImpl::encoder()
46{ 46{
47 return NULL; 47 return NULL;
48} 48}
49 49
50 50
51#ifndef QT_NO_COMPONENT 51#ifndef QT_NO_COMPONENT
52 52
53 53
54QRESULT LibFlashPluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 54QRESULT LibFlashPluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
55{ 55{
56 *iface = 0; 56 *iface = 0;
57 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) ) 57 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) )
58 *iface = this, (*iface)->addRef(); 58 *iface = this, (*iface)->addRef();
59 else
60 return QS_FALSE;
59 return QS_OK; 61 return QS_OK;
60} 62}
61 63
62 64
63Q_EXPORT_INTERFACE() 65Q_EXPORT_INTERFACE()
64{ 66{
65 Q_CREATE_INSTANCE( LibFlashPluginImpl ) 67 Q_CREATE_INSTANCE( LibFlashPluginImpl )
66} 68}
67 69
68 70
69#endif 71#endif
70 72
diff --git a/core/multimedia/opieplayer/libmad/libmadpluginimpl.cpp b/core/multimedia/opieplayer/libmad/libmadpluginimpl.cpp
index 67779e8..b3e01e5 100644
--- a/core/multimedia/opieplayer/libmad/libmadpluginimpl.cpp
+++ b/core/multimedia/opieplayer/libmad/libmadpluginimpl.cpp
@@ -35,36 +35,38 @@ LibMadPluginImpl::~LibMadPluginImpl()
35 35
36 36
37MediaPlayerDecoder *LibMadPluginImpl::decoder() 37MediaPlayerDecoder *LibMadPluginImpl::decoder()
38{ 38{
39 if ( !libmadplugin ) 39 if ( !libmadplugin )
40 libmadplugin = new LibMadPlugin; 40 libmadplugin = new LibMadPlugin;
41 return libmadplugin; 41 return libmadplugin;
42} 42}
43 43
44 44
45MediaPlayerEncoder *LibMadPluginImpl::encoder() 45MediaPlayerEncoder *LibMadPluginImpl::encoder()
46{ 46{
47 return NULL; 47 return NULL;
48} 48}
49 49
50 50
51#ifndef QT_NO_COMPONENT 51#ifndef QT_NO_COMPONENT
52 52
53 53
54QRESULT LibMadPluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 54QRESULT LibMadPluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
55{ 55{
56 *iface = 0; 56 *iface = 0;
57 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) ) 57 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) )
58 *iface = this, (*iface)->addRef(); 58 *iface = this, (*iface)->addRef();
59 else
60 return QS_FALSE;
59 return QS_OK; 61 return QS_OK;
60} 62}
61 63
62 64
63Q_EXPORT_INTERFACE() 65Q_EXPORT_INTERFACE()
64{ 66{
65 Q_CREATE_INSTANCE( LibMadPluginImpl ) 67 Q_CREATE_INSTANCE( LibMadPluginImpl )
66} 68}
67 69
68 70
69#endif 71#endif
70 72
diff --git a/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.cpp b/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.cpp
index bf3f372..f6d34b8 100644
--- a/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.cpp
+++ b/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.cpp
@@ -35,36 +35,38 @@ LibMpeg3PluginImpl::~LibMpeg3PluginImpl()
35 35
36 36
37MediaPlayerDecoder *LibMpeg3PluginImpl::decoder() 37MediaPlayerDecoder *LibMpeg3PluginImpl::decoder()
38{ 38{
39 if ( !libmpeg3plugin ) 39 if ( !libmpeg3plugin )
40 libmpeg3plugin = new LibMpeg3Plugin; 40 libmpeg3plugin = new LibMpeg3Plugin;
41 return libmpeg3plugin; 41 return libmpeg3plugin;
42} 42}
43 43
44 44
45MediaPlayerEncoder *LibMpeg3PluginImpl::encoder() 45MediaPlayerEncoder *LibMpeg3PluginImpl::encoder()
46{ 46{
47 return NULL; 47 return NULL;
48} 48}
49 49
50 50
51#ifndef QT_NO_COMPONENT 51#ifndef QT_NO_COMPONENT
52 52
53 53
54QRESULT LibMpeg3PluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 54QRESULT LibMpeg3PluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
55{ 55{
56 *iface = 0; 56 *iface = 0;
57 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) ) 57 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) )
58 *iface = this, (*iface)->addRef(); 58 *iface = this, (*iface)->addRef();
59 else
60 return QS_FALSE;
59 return QS_OK; 61 return QS_OK;
60} 62}
61 63
62 64
63Q_EXPORT_INTERFACE() 65Q_EXPORT_INTERFACE()
64{ 66{
65 Q_CREATE_INSTANCE( LibMpeg3PluginImpl ) 67 Q_CREATE_INSTANCE( LibMpeg3PluginImpl )
66} 68}
67 69
68 70
69#endif 71#endif
70 72
diff --git a/core/multimedia/opieplayer/modplug/modpluginimpl.cpp b/core/multimedia/opieplayer/modplug/modpluginimpl.cpp
index 6e64e76..6205779 100644
--- a/core/multimedia/opieplayer/modplug/modpluginimpl.cpp
+++ b/core/multimedia/opieplayer/modplug/modpluginimpl.cpp
@@ -16,45 +16,47 @@
16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. 17 Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#include "modplugin.h" 20#include "modplugin.h"
21#include "modpluginimpl.h" 21#include "modpluginimpl.h"
22 22
23ModPluginImpl::ModPluginImpl() 23ModPluginImpl::ModPluginImpl()
24 :m_plugin( 0 ), ref( 0 ) 24 :m_plugin( 0 ), ref( 0 )
25{ 25{
26} 26}
27 27
28ModPluginImpl::~ModPluginImpl() 28ModPluginImpl::~ModPluginImpl()
29{ 29{
30 delete m_plugin; 30 delete m_plugin;
31} 31}
32 32
33#ifndef QT_NO_COMPONENT 33#ifndef QT_NO_COMPONENT
34 34
35QRESULT ModPluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 35QRESULT ModPluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
36{ 36{
37 *iface = 0; 37 *iface = 0;
38 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) ) 38 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) )
39 *iface = this, (*iface)->addRef(); 39 *iface = this, (*iface)->addRef();
40 else
41 return QS_FALSE;
40 return QS_OK; 42 return QS_OK;
41} 43}
42 44
43Q_EXPORT_INTERFACE() 45Q_EXPORT_INTERFACE()
44{ 46{
45 Q_CREATE_INSTANCE( ModPluginImpl ) 47 Q_CREATE_INSTANCE( ModPluginImpl )
46} 48}
47 49
48#endif 50#endif
49 51
50MediaPlayerDecoder *ModPluginImpl::decoder() 52MediaPlayerDecoder *ModPluginImpl::decoder()
51{ 53{
52 if ( !m_plugin ) 54 if ( !m_plugin )
53 m_plugin = new ModPlugin; 55 m_plugin = new ModPlugin;
54 return m_plugin; 56 return m_plugin;
55} 57}
56 58
57MediaPlayerEncoder *ModPluginImpl::encoder() 59MediaPlayerEncoder *ModPluginImpl::encoder()
58{ 60{
59 return 0; 61 return 0;
60} 62}
diff --git a/core/multimedia/opieplayer/opieplayer.pro b/core/multimedia/opieplayer/opieplayer.pro
index 03d8a89..d7b0fb8 100644
--- a/core/multimedia/opieplayer/opieplayer.pro
+++ b/core/multimedia/opieplayer/opieplayer.pro
@@ -1,21 +1,21 @@
1TEMPLATE = app 1TEMPLATE = app
2CONFIG = qt warn_on release 2CONFIG = qt warn_on release
3#release 3#release
4DESTDIR = $(OPIEDIR)/bin 4DESTDIR = $(OPIEDIR)/bin
5HEADERS = loopcontrol.h mediaplayerplugininterface.h \ 5HEADERS = loopcontrol.h mediaplayerplugininterface.h \
6 playlistselection.h mediaplayerstate.h \ 6 playlistselection.h mediaplayerstate.h \
7 videowidget.h audiowidget.h playlistwidget.h \ 7 videowidget.h audiowidget.h playlistwidget.h \
8 mediaplayer.h audiodevice.h inputDialog.h om3u.h 8 mediaplayer.h audiodevice.h inputDialog.h om3u.h
9SOURCES = main.cpp \ 9SOURCES = main.cpp \
10 loopcontrol.cpp playlistselection.cpp mediaplayerstate.cpp \ 10 loopcontrol.cpp playlistselection.cpp mediaplayerstate.cpp \
11 videowidget.cpp audiowidget.cpp playlistwidget.cpp \ 11 videowidget.cpp audiowidget.cpp playlistwidget.cpp \
12 mediaplayer.cpp audiodevice.cpp inputDialog.cpp om3u.cpp 12 mediaplayer.cpp audiodevice.cpp inputDialog.cpp om3u.cpp
13TARGET = opieplayer 13TARGET = opieplayer
14INCLUDEPATH += $(OPIEDIR)/include 14INCLUDEPATH += $(OPIEDIR)/include
15DEPENDPATH += $(OPIEDIR)/include 15DEPENDPATH += $(OPIEDIR)/include
16LIBS += -lqpe -lpthread -lopie 16LIBS += -lqpe -lpthread -lopieui2
17 17
18INCLUDEPATH += $(OPIEDIR)/include 18INCLUDEPATH += $(OPIEDIR)/include
19DEPENDPATH += $(OPIEDIR)/include 19DEPENDPATH += $(OPIEDIR)/include
20 20
21include ( $(OPIEDIR)/include.pro ) 21include ( $(OPIEDIR)/include.pro )
diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp
index d002c42..164458b 100644
--- a/core/multimedia/opieplayer/videowidget.cpp
+++ b/core/multimedia/opieplayer/videowidget.cpp
@@ -544,52 +544,54 @@ bool VideoWidget::playVideo() {
544 0, 0, sw, sh, w, h, format, 0) == 0; 544 0, 0, sw, sh, w, h, format, 0) == 0;
545 545
546 if ( result && mediaPlayerState->fullscreen() ) 546 if ( result && mediaPlayerState->fullscreen() )
547 { 547 {
548 548
549 int rw = h, rh = w; 549 int rw = h, rh = w;
550 QImage rotatedFrame( rw, rh, bytes << 3 ); 550 QImage rotatedFrame( rw, rh, bytes << 3 );
551 551
552 ushort* in = (ushort*)tempFrame.bits(); 552 ushort* in = (ushort*)tempFrame.bits();
553 ushort* out = (ushort*)rotatedFrame.bits(); 553 ushort* out = (ushort*)rotatedFrame.bits();
554 int spl = rotatedFrame.bytesPerLine() / bytes; 554 int spl = rotatedFrame.bytesPerLine() / bytes;
555 555
556 for (int x=0; x<h; x++) 556 for (int x=0; x<h; x++)
557 { 557 {
558 if ( bytes == 2 ) 558 if ( bytes == 2 )
559 { 559 {
560 ushort* lout = out++ + (w - 1)*spl; 560 ushort* lout = out++ + (w - 1)*spl;
561 for (int y=0; y<w; y++) { 561 for (int y=0; y<w; y++) {
562 *lout=*in++; 562 *lout=*in++;
563 lout-=spl; 563 lout-=spl;
564 } 564 }
565 } 565 }
566 else 566 else
567 { 567 {
568 ulong* lout = ((ulong *)out)++ + (w - 1)*spl; 568 ulong* _out = (ulong *)out;
569 ulong* lout = _out++ + (w - 1)*spl;
569 for (int y=0; y<w; y++) 570 for (int y=0; y<w; y++)
570 { 571 {
571 *lout=*((ulong*)in)++; 572 ulong *_in = (ulong*)in;
573 *lout=*_in++;
572 lout-=spl; 574 lout-=spl;
573 } 575 }
574 } 576 }
575 } 577 }
576 578
577 p.drawImage( (240 - rw) / 2, (320 - rh) / 2, rotatedFrame, 0, 0, rw, rh ); 579 p.drawImage( (240 - rw) / 2, (320 - rh) / 2, rotatedFrame, 0, 0, rw, rh );
578 } 580 }
579#ifdef USE_DIRECT_PAINTER 581#ifdef USE_DIRECT_PAINTER
580 } 582 }
581#endif 583#endif
582 } 584 }
583 else 585 else
584 { 586 {
585 587
586 w = 220; 588 w = 220;
587 h = 160; 589 h = 160;
588 590
589 // maintain aspect ratio 591 // maintain aspect ratio
590 if ( w * sh > sw * h ) 592 if ( w * sh > sw * h )
591 w = sw * h / sh; 593 w = sw * h / sh;
592 else 594 else
593 h = sh * w / sw; 595 h = sh * w / sw;
594 596
595 result = mediaPlayerState->curDecoder()->videoReadScaledFrame( currentFrame->jumpTable(), 0, 0, sw, sh, w, h, format, 0) == 0; 597 result = mediaPlayerState->curDecoder()->videoReadScaledFrame( currentFrame->jumpTable(), 0, 0, sw, sh, w, h, format, 0) == 0;
diff --git a/core/multimedia/opieplayer/vorbis/libtremorpluginimpl.cpp b/core/multimedia/opieplayer/vorbis/libtremorpluginimpl.cpp
index 440747a..0c7b1ea 100644
--- a/core/multimedia/opieplayer/vorbis/libtremorpluginimpl.cpp
+++ b/core/multimedia/opieplayer/vorbis/libtremorpluginimpl.cpp
@@ -36,36 +36,38 @@ LibTremorPluginImpl::~LibTremorPluginImpl()
36 36
37 37
38MediaPlayerDecoder *LibTremorPluginImpl::decoder() 38MediaPlayerDecoder *LibTremorPluginImpl::decoder()
39{ 39{
40 if ( !libtremorplugin ) 40 if ( !libtremorplugin )
41 libtremorplugin = new LibTremorPlugin; 41 libtremorplugin = new LibTremorPlugin;
42 return libtremorplugin; 42 return libtremorplugin;
43} 43}
44 44
45 45
46MediaPlayerEncoder *LibTremorPluginImpl::encoder() 46MediaPlayerEncoder *LibTremorPluginImpl::encoder()
47{ 47{
48 return NULL; 48 return NULL;
49} 49}
50 50
51 51
52#ifndef QT_NO_COMPONENT 52#ifndef QT_NO_COMPONENT
53 53
54 54
55QRESULT LibTremorPluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 55QRESULT LibTremorPluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
56{ 56{
57 *iface = 0; 57 *iface = 0;
58 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) ) 58 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) )
59 *iface = this, (*iface)->addRef(); 59 *iface = this, (*iface)->addRef();
60 else
61 return QS_FALSE;
60 return QS_OK; 62 return QS_OK;
61} 63}
62 64
63 65
64Q_EXPORT_INTERFACE() 66Q_EXPORT_INTERFACE()
65{ 67{
66 Q_CREATE_INSTANCE( LibTremorPluginImpl ) 68 Q_CREATE_INSTANCE( LibTremorPluginImpl )
67} 69}
68 70
69 71
70#endif 72#endif
71 73
diff --git a/core/multimedia/opieplayer/wavplugin/wavpluginimpl.cpp b/core/multimedia/opieplayer/wavplugin/wavpluginimpl.cpp
index c232d7b..4280880 100644
--- a/core/multimedia/opieplayer/wavplugin/wavpluginimpl.cpp
+++ b/core/multimedia/opieplayer/wavplugin/wavpluginimpl.cpp
@@ -34,36 +34,38 @@ WavPluginImpl::~WavPluginImpl()
34 34
35 35
36MediaPlayerDecoder *WavPluginImpl::decoder() 36MediaPlayerDecoder *WavPluginImpl::decoder()
37{ 37{
38 if ( !libmadplugin ) 38 if ( !libmadplugin )
39 libmadplugin = new WavPlugin; 39 libmadplugin = new WavPlugin;
40 return libmadplugin; 40 return libmadplugin;
41} 41}
42 42
43 43
44MediaPlayerEncoder *WavPluginImpl::encoder() 44MediaPlayerEncoder *WavPluginImpl::encoder()
45{ 45{
46 return NULL; 46 return NULL;
47} 47}
48 48
49 49
50#ifndef QT_NO_COMPONENT 50#ifndef QT_NO_COMPONENT
51 51
52 52
53QRESULT WavPluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 53QRESULT WavPluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
54{ 54{
55 *iface = 0; 55 *iface = 0;
56 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) ) 56 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) )
57 *iface = this, (*iface)->addRef(); 57 *iface = this, (*iface)->addRef();
58 else
59 return QS_FALSE;
58 return QS_OK; 60 return QS_OK;
59} 61}
60 62
61 63
62Q_EXPORT_INTERFACE() 64Q_EXPORT_INTERFACE()
63{ 65{
64 Q_CREATE_INSTANCE( WavPluginImpl ) 66 Q_CREATE_INSTANCE( WavPluginImpl )
65} 67}
66 68
67 69
68#endif 70#endif
69 71