summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-08-05 16:58:54 (UTC)
committer harlekin <harlekin>2002-08-05 16:58:54 (UTC)
commit6577ed5401ef1374b57a58dd459e91c10899e097 (patch) (unidiff)
treebe02c6759e10490af57918f9b2475a552a571da1
parentaf5168ac637f2f5b871cc73a69151dd3d829fec0 (diff)
downloadopie-6577ed5401ef1374b57a58dd459e91c10899e097.zip
opie-6577ed5401ef1374b57a58dd459e91c10899e097.tar.gz
opie-6577ed5401ef1374b57a58dd459e91c10899e097.tar.bz2
doc updates
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp32
1 files changed, 26 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index d08ff04..cf7dcb2 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -42,15 +42,14 @@ extern VideoWidget *videoUI;
42XineControl::XineControl( QObject *parent, const char *name ) 42XineControl::XineControl( QObject *parent, const char *name )
43 : QObject( parent, name ) { 43 : QObject( parent, name ) {
44 libXine = new XINE::Lib(videoUI->vidWidget() ); 44 libXine = new XINE::Lib(videoUI->vidWidget() );
45 45
46 connect ( videoUI, SIGNAL( videoResized ( const QSize & )), this, SLOT( videoResized ( const QSize & ))); 46 connect ( videoUI, SIGNAL( videoResized ( const QSize & )), this, SLOT( videoResized ( const QSize & )));
47 connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( pause(bool) ) ); 47 connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( pause(bool) ) );
48 connect( this, SIGNAL( positionChanged( long ) ), mediaPlayerState, SLOT( updatePosition( long ) ) ); 48 connect( this, SIGNAL( positionChanged( long ) ), mediaPlayerState, SLOT( updatePosition( long ) ) );
49 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) ); 49 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) );
50 connect( mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) ); 50 connect( mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) );
51 connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) ); 51 connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) );
52
53} 52}
54 53
55XineControl::~XineControl() { 54XineControl::~XineControl() {
56 delete libXine; 55 delete libXine;
@@ -92,24 +91,40 @@ void XineControl::stop( bool isSet ) {
92 // play again 91 // play again
93 } 92 }
94} 93}
95 94
95/**
96 * Pause playback
97 * @isSet
98 */
96void XineControl::pause( bool isSet) { 99void XineControl::pause( bool isSet) {
97 libXine->pause(); 100 libXine->pause();
98} 101}
99 102
103
104/**
105 * get current time in playback
106 */
100long XineControl::currentTime() { 107long XineControl::currentTime() {
101 // todo: jede sekunde überprüfen 108 // todo: jede sekunde überprüfen
102 m_currentTime = libXine->currentTime(); 109 m_currentTime = libXine->currentTime();
103 return m_currentTime; 110 return m_currentTime;
104 QTimer::singleShot( 1000, this, SLOT( currentTime() ) ); 111 QTimer::singleShot( 1000, this, SLOT( currentTime() ) );
105} 112}
106 113
114/**
115 * Set the length of the media file
116 */
107void XineControl::length() { 117void XineControl::length() {
108 m_length = libXine->length(); 118 m_length = libXine->length();
109 mediaPlayerState->setLength( m_length ); 119 mediaPlayerState->setLength( m_length );
110} 120}
111 121
122
123/**
124 * Reports the position the xine backend is at right now
125 * @return long the postion in seconds
126 */
112long XineControl::position() { 127long XineControl::position() {
113 m_position = ( currentTime() ); 128 m_position = ( currentTime() );
114 mediaPlayerState->updatePosition( m_position ); 129 mediaPlayerState->updatePosition( m_position );
115 long emitPos = (long)m_position; 130 long emitPos = (long)m_position;
@@ -120,18 +135,23 @@ long XineControl::position() {
120// qDebug("POSITION : %d", m_position); 135// qDebug("POSITION : %d", m_position);
121 return m_position; 136 return m_position;
122} 137}
123 138
139/**
140 * Set videoplayback to fullscreen
141 * @param isSet
142 */
124void XineControl::setFullscreen( bool isSet ) { 143void XineControl::setFullscreen( bool isSet ) {
125 libXine->showVideoFullScreen( isSet); 144 libXine->showVideoFullScreen( isSet);
126} 145}
127 146
147/**
148 * Seek to a position in the track
149 * @param second the second to jump to
150 */
128void XineControl::seekTo( long second ) { 151void XineControl::seekTo( long second ) {
129 qDebug("seek triggered!!");
130 libXine->play( m_fileName , 0, (int)second ); 152 libXine->play( m_fileName , 0, (int)second );
131} 153}
132 154
133 155void XineControl::videoResized ( const QSize &s ) {
134void XineControl::videoResized ( const QSize &s )
135{
136 libXine-> resize ( s ); 156 libXine-> resize ( s );
137} 157}