author | llornkcor <llornkcor> | 2002-08-03 14:19:05 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-08-03 14:19:05 (UTC) |
commit | aa06a62511cabebeaad1d3dda34b30640f967dea (patch) (unidiff) | |
tree | a6887240b094f46de46b743135a2e918ba3254ad /noncore/multimedia/opieplayer2/xinecontrol.cpp | |
parent | d3c13036415713932f1706e46fa7c99ef38188df (diff) | |
download | opie-aa06a62511cabebeaad1d3dda34b30640f967dea.zip opie-aa06a62511cabebeaad1d3dda34b30640f967dea.tar.gz opie-aa06a62511cabebeaad1d3dda34b30640f967dea.tar.bz2 |
audiowidget now shows time and slider moves.
Diffstat (limited to 'noncore/multimedia/opieplayer2/xinecontrol.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 878cd4a..19a9172 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp | |||
@@ -71,61 +71,60 @@ void XineControl::play( const QString& fileName ) { | |||
71 | libXine->setShowVideo( false ); | 71 | libXine->setShowVideo( false ); |
72 | } else { | 72 | } else { |
73 | libXine->setShowVideo( true ); | 73 | libXine->setShowVideo( true ); |
74 | } | 74 | } |
75 | 75 | ||
76 | // determine if slider is shown | 76 | // determine if slider is shown |
77 | // mediaPlayerState->setIsStreaming( mdetect.isStreaming( fileName ) ); | 77 | // mediaPlayerState->setIsStreaming( mdetect.isStreaming( fileName ) ); |
78 | mediaPlayerState->setIsStreaming( libXine->isSeekable() ); | 78 | mediaPlayerState->setIsStreaming( libXine->isSeekable() ); |
79 | // which gui (video / audio) | 79 | // which gui (video / audio) |
80 | mediaPlayerState->setView( whichGui ); | 80 | mediaPlayerState->setView( whichGui ); |
81 | length(); | 81 | length(); |
82 | position(); | 82 | position(); |
83 | |||
84 | } | 83 | } |
85 | 84 | ||
86 | void XineControl::stop( bool isSet ) { | 85 | void XineControl::stop( bool isSet ) { |
87 | if ( !isSet) { | 86 | if ( !isSet) { |
88 | libXine->stop(); | 87 | libXine->stop(); |
89 | mediaPlayerState->setList(); | 88 | mediaPlayerState->setList(); |
90 | //mediaPlayerState->setPlaying( false ); | 89 | //mediaPlayerState->setPlaying( false ); |
91 | } else { | 90 | } else { |
92 | // play again | 91 | // play again |
93 | } | 92 | } |
94 | } | 93 | } |
95 | 94 | ||
96 | void XineControl::pause( bool isSet) { | 95 | void XineControl::pause( bool isSet) { |
97 | libXine->pause(); | 96 | libXine->pause(); |
98 | } | 97 | } |
99 | 98 | ||
100 | int XineControl::currentTime() { | 99 | long XineControl::currentTime() { |
101 | // todo: jede sekunde überprüfen | 100 | // todo: jede sekunde überprüfen |
102 | m_currentTime = libXine->currentTime(); | 101 | m_currentTime = libXine->currentTime(); |
103 | return m_currentTime; | 102 | return m_currentTime; |
104 | QTimer::singleShot( 1000, this, SLOT( currentTime() ) ); | 103 | QTimer::singleShot( 1000, this, SLOT( currentTime() ) ); |
105 | } | 104 | } |
106 | 105 | ||
107 | void XineControl::length() { | 106 | void XineControl::length() { |
108 | m_length = libXine->length(); | 107 | m_length = libXine->length(); |
109 | mediaPlayerState->setLength( m_length ); | 108 | mediaPlayerState->setLength( m_length ); |
110 | } | 109 | } |
111 | 110 | ||
112 | long XineControl::position() { | 111 | long XineControl::position() { |
113 | qDebug("<<<<<<<<<<<< xinecontrol setPostion>>>>>>>>>"); | 112 | m_position = ( currentTime() ); |
114 | m_position = (m_currentTime/m_length*100); | ||
115 | mediaPlayerState->setPosition( m_position ); | 113 | mediaPlayerState->setPosition( m_position ); |
116 | long emitPos = (long)m_position; | 114 | long emitPos = (long)m_position; |
117 | emit positionChanged( emitPos ); | 115 | emit positionChanged( emitPos ); |
116 | if(mediaPlayerState->isPlaying) | ||
118 | // needs to be stopped the media is stopped | 117 | // needs to be stopped the media is stopped |
119 | QTimer::singleShot( 1000, this, SLOT( position() ) ); | 118 | QTimer::singleShot( 1000, this, SLOT( position() ) ); |
120 | qDebug("POSITION : " + m_position); | 119 | // qDebug("POSITION : %d", m_position); |
121 | return m_position; | 120 | return m_position; |
122 | } | 121 | } |
123 | 122 | ||
124 | void XineControl::setFullscreen( bool isSet ) { | 123 | void XineControl::setFullscreen( bool isSet ) { |
125 | libXine->showVideoFullScreen( isSet); | 124 | libXine->showVideoFullScreen( isSet); |
126 | } | 125 | } |
127 | 126 | ||
128 | void XineControl::seekTo( long second ) { | 127 | void XineControl::seekTo( long second ) { |
129 | // libXine-> | 128 | // libXine-> |
130 | } | 129 | } |
131 | 130 | ||