summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/xinecontrol.cpp
authorharlekin <harlekin>2002-08-05 16:43:59 (UTC)
committer harlekin <harlekin>2002-08-05 16:43:59 (UTC)
commitaf5168ac637f2f5b871cc73a69151dd3d829fec0 (patch) (side-by-side diff)
tree2cc8dad511ee01709a6c19699206b6ad20184a76 /noncore/multimedia/opieplayer2/xinecontrol.cpp
parentc4a390e38fe72eeafa0620fc1f8299f561958d21 (diff)
downloadopie-af5168ac637f2f5b871cc73a69151dd3d829fec0.zip
opie-af5168ac637f2f5b871cc73a69151dd3d829fec0.tar.gz
opie-af5168ac637f2f5b871cc73a69151dd3d829fec0.tar.bz2
seeking is working now
Diffstat (limited to 'noncore/multimedia/opieplayer2/xinecontrol.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index 33889d0..d08ff04 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -43,24 +43,24 @@ XineControl::XineControl( QObject *parent, const char *name )
: QObject( parent, name ) {
libXine = new XINE::Lib(videoUI->vidWidget() );
connect ( videoUI, SIGNAL( videoResized ( const QSize & )), this, SLOT( videoResized ( const QSize & )));
connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( pause(bool) ) );
connect( this, SIGNAL( positionChanged( long ) ), mediaPlayerState, SLOT( updatePosition( long ) ) );
- connect( this, SIGNAL( positionChanged( long ) ), mediaPlayerState, SLOT( setPosition( long ) ) );
connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) );
connect( mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) );
connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) );
}
XineControl::~XineControl() {
delete libXine;
}
void XineControl::play( const QString& fileName ) {
+ m_fileName = fileName;
libXine->play( fileName );
mediaPlayerState->setPlaying( true );
// default to audio view until we know how to handle video
// MediaDetect mdetect;
char whichGui = mdetect.videoOrAudio( fileName );
if (whichGui == 'f') {
@@ -108,13 +108,13 @@ void XineControl::length() {
m_length = libXine->length();
mediaPlayerState->setLength( m_length );
}
long XineControl::position() {
m_position = ( currentTime() );
- mediaPlayerState->setPosition( m_position );
+ mediaPlayerState->updatePosition( m_position );
long emitPos = (long)m_position;
emit positionChanged( emitPos );
if(mediaPlayerState->isPlaying)
// needs to be stopped the media is stopped
QTimer::singleShot( 1000, this, SLOT( position() ) );
// qDebug("POSITION : %d", m_position);
@@ -123,13 +123,14 @@ long XineControl::position() {
void XineControl::setFullscreen( bool isSet ) {
libXine->showVideoFullScreen( isSet);
}
void XineControl::seekTo( long second ) {
- // libXine->
+ qDebug("seek triggered!!");
+ libXine->play( m_fileName , 0, (int)second );
}
void XineControl::videoResized ( const QSize &s )
{
libXine-> resize ( s );