Diffstat (limited to 'noncore/multimedia/opieplayer2/xinecontrol.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 1c489e3..a392f4a 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp | |||
@@ -35,24 +35,25 @@ | |||
35 | #include <qtimer.h> | 35 | #include <qtimer.h> |
36 | #include <qmessagebox.h> | 36 | #include <qmessagebox.h> |
37 | #include <qpe/qcopenvelope_qws.h> | 37 | #include <qpe/qcopenvelope_qws.h> |
38 | #include <qpe/qpeapplication.h> | 38 | #include <qpe/qpeapplication.h> |
39 | |||
39 | #include "xinecontrol.h" | 40 | #include "xinecontrol.h" |
40 | #include "mediaplayerstate.h" | 41 | #include "mediaplayerstate.h" |
41 | #include "xinevideowidget.h" | 42 | #include "xinevideowidget.h" |
42 | 43 | ||
43 | XineControl::XineControl( XineVideoWidget *xineWidget, | 44 | XineControl::XineControl( XineVideoWidget *xineWidget, |
44 | MediaPlayerState &_mediaPlayerState, | 45 | MediaPlayerState &_mediaPlayerState, |
45 | QObject *parent, const char *name ) | 46 | QObject *parent, const char *name ) |
46 | : QObject( parent, name ), mediaPlayerState( _mediaPlayerState ), xineVideoWidget( xineWidget ) | 47 | : QObject( parent, name ), mediaPlayerState( _mediaPlayerState ), xineVideoWidget( xineWidget ) |
47 | { | 48 | { |
48 | libXine = new XINE::Lib( XINE::Lib::InitializeImmediately, xineWidget ); | 49 | libXine = new XINE::Lib( XINE::Lib::InitializeImmediately, xineWidget ); |
49 | 50 | ||
50 | init(); | 51 | init(); |
51 | } | 52 | } |
52 | 53 | ||
53 | XineControl::XineControl( XINE::Lib *xine, XineVideoWidget *xineWidget, | 54 | XineControl::XineControl( XINE::Lib *xine, XineVideoWidget *xineWidget, |
54 | MediaPlayerState &_mediaPlayerState, | 55 | MediaPlayerState &_mediaPlayerState, |
55 | QObject *parent, const char *name ) | 56 | QObject *parent, const char *name ) |
56 | : QObject( parent, name ), libXine( xine ), mediaPlayerState( _mediaPlayerState ), xineVideoWidget( xineWidget ) | 57 | : QObject( parent, name ), libXine( xine ), mediaPlayerState( _mediaPlayerState ), xineVideoWidget( xineWidget ) |
57 | { | 58 | { |
58 | xine->ensureInitialized(); | 59 | xine->ensureInitialized(); |
@@ -87,8 +88,9 @@ XineControl::~XineControl() { | |||
87 | delete libXine; | 88 | delete libXine; |
88 | } | 89 | } |
89 | 90 | ||
90 | void XineControl::play( const QString& fileName ) { | 91 | void XineControl::play( const QString& fileName ) { |
92 | |||
91 | hasVideoChannel = FALSE; | 93 | hasVideoChannel = FALSE; |
92 | hasAudioChannel = FALSE; | 94 | hasAudioChannel = FALSE; |
93 | m_fileName = fileName; | 95 | m_fileName = fileName; |
94 | 96 | ||
@@ -102,9 +104,8 @@ void XineControl::play( const QString& fileName ) { | |||
102 | } | 104 | } |
103 | mediaPlayerState.setPlaying( true ); | 105 | mediaPlayerState.setPlaying( true ); |
104 | 106 | ||
105 | MediaPlayerState::DisplayType displayType; | 107 | MediaPlayerState::DisplayType displayType; |
106 | // qDebug( QString( "libXine->hasVideo() return : %1 ").arg( libXine->hasVideo() ) ); | ||
107 | if ( !libXine->hasVideo() ) { | 108 | if ( !libXine->hasVideo() ) { |
108 | displayType = MediaPlayerState::Audio; | 109 | displayType = MediaPlayerState::Audio; |
109 | qDebug("HAS AUDIO"); | 110 | qDebug("HAS AUDIO"); |
110 | libXine->setShowVideo( false ); | 111 | libXine->setShowVideo( false ); |
@@ -196,9 +197,8 @@ long XineControl::position() { | |||
196 | if( mediaPlayerState.isPlaying() ) { | 197 | if( mediaPlayerState.isPlaying() ) { |
197 | // needs to be stopped the media is stopped | 198 | // needs to be stopped the media is stopped |
198 | QTimer::singleShot( 1000, this, SLOT( position() ) ); | 199 | QTimer::singleShot( 1000, this, SLOT( position() ) ); |
199 | } | 200 | } |
200 | // qDebug("POSITION : %d", m_position); | ||
201 | return m_position; | 201 | return m_position; |
202 | } | 202 | } |
203 | 203 | ||
204 | /** | 204 | /** |