summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp8
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index 7337c97..cc1a608 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -63,67 +63,67 @@ void XineControl::play( const QString& fileName ) {
// MediaDetect mdetect;
char whichGui = mdetect.videoOrAudio( fileName );
if (whichGui == 'f') {
qDebug("Nicht erkannter Dateityp");
return;
}
if (whichGui == 'a') {
libXine->setShowVideo( false );
} else {
libXine->setShowVideo( true );
}
// determine if slider is shown
// mediaPlayerState->setIsStreaming( mdetect.isStreaming( fileName ) );
mediaPlayerState->setIsStreaming( libXine->isSeekable() );
// which gui (video / audio)
mediaPlayerState->setView( whichGui );
length();
position();
}
void XineControl::stop( bool isSet ) {
if ( !isSet) {
libXine->stop();
mediaPlayerState->setList();
//mediaPlayerState->setPlaying( false );
} else {
// play again
}
}
void XineControl::pause( bool isSet) {
libXine->pause();
}
int XineControl::currentTime() {
// todo: jede sekunde überprüfen
m_currentTime = libXine->currentTime();
return m_currentTime;
}
void XineControl::length() {
m_length = libXine->length();
mediaPlayerState->setLength( m_length );
}
-int XineControl::position() {
- length();
- qDebug("M_LENGTH :" + m_length);
- m_position = ( currentTime() /m_length*100);
+long XineControl::position() {
+ qDebug("<<<<<<<<<<<< xinecontrol setPostion>>>>>>>>>");
+ m_position = (m_currentTime/m_length*100);
mediaPlayerState->setPosition( m_position );
long emitPos = (long)m_position;
emit positionChanged( emitPos );
QTimer::singleShot( 1000, this, SLOT( position() ) );
qDebug("POSITION : " + m_position);
return m_position;
}
void XineControl::setFullscreen( bool isSet ) {
libXine->showVideoFullScreen( isSet);
}
void XineControl::seekTo( long second ) {
// libXine->
}
+
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.h b/noncore/multimedia/opieplayer2/xinecontrol.h
index 5f3d7c2..07ad309 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.h
+++ b/noncore/multimedia/opieplayer2/xinecontrol.h
@@ -1,72 +1,72 @@
/*
                This file is part of the Opie Project
              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
Copyright (c) 2002 L. Potter <ljp@llornkcor.com>
Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
=.
.=l.
           .>+-=
 _;:,     .>    :=|. This program is free software; you can
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU General Public
.="- .-=="i,     .._ License as published by the Free Software
 - .   .-<_>     .<> Foundation; either version 2 of the License,
     ._= =}       : or (at your option) any later version.
    .%`+i>       _;_.
    .i_,=:_.      -<s. This program is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . without even the implied warranty of
    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
..}^=.=       =       ; Library General Public License for more
++=   -.     .`     .: details.
 :     =  ...= . :.=-
 -.   .:....=;==+<; You should have received a copy of the GNU
  -_. . .   )=.  = Library General Public License along with
    --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef XINECONTROL_H
#define XINECONTROL_H
#include "lib.h"
#include "mediadetect.h"
#include <qobject.h>
class XineControl : public QObject {
Q_OBJECT
public:
XineControl( QObject *parent = 0, const char *name =0 );
~XineControl();
+ int m_length;
public slots:
void play( const QString& fileName );
void stop( bool );
void pause( bool );
void setFullscreen( bool );
int currentTime();
void seekTo( long );
// get length of media file and set it
void length();
- int position();
+ long position();
private:
XINE::Lib *libXine;
MediaDetect mdetect;
- int m_length;
int m_currentTime;
- int m_position;
+ long m_position;
signals:
- void positionChanged( long position );
+ void positionChanged( long );
};
#endif