summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore 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 ) {
63 // MediaDetect mdetect; 63 // MediaDetect mdetect;
64 char whichGui = mdetect.videoOrAudio( fileName ); 64 char whichGui = mdetect.videoOrAudio( fileName );
65 if (whichGui == 'f') { 65 if (whichGui == 'f') {
66 qDebug("Nicht erkannter Dateityp"); 66 qDebug("Nicht erkannter Dateityp");
67 return; 67 return;
68 } 68 }
69 69
70 if (whichGui == 'a') { 70 if (whichGui == 'a') {
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 83
84} 84}
85 85
86void XineControl::stop( bool isSet ) { 86void XineControl::stop( bool isSet ) {
87 if ( !isSet) { 87 if ( !isSet) {
88 libXine->stop(); 88 libXine->stop();
89 mediaPlayerState->setList(); 89 mediaPlayerState->setList();
90 //mediaPlayerState->setPlaying( false ); 90 //mediaPlayerState->setPlaying( false );
91 } else { 91 } else {
92 // play again 92 // play again
93 } 93 }
94} 94}
95 95
96void XineControl::pause( bool isSet) { 96void XineControl::pause( bool isSet) {
97 libXine->pause(); 97 libXine->pause();
98} 98}
99 99
100int XineControl::currentTime() { 100int XineControl::currentTime() {
101 // todo: jede sekunde überprüfen 101 // todo: jede sekunde überprüfen
102 m_currentTime = libXine->currentTime(); 102 m_currentTime = libXine->currentTime();
103 return m_currentTime; 103 return m_currentTime;
104} 104}
105 105
106void XineControl::length() { 106void XineControl::length() {
107 m_length = libXine->length(); 107 m_length = libXine->length();
108 mediaPlayerState->setLength( m_length ); 108 mediaPlayerState->setLength( m_length );
109} 109}
110 110
111int XineControl::position() { 111long XineControl::position() {
112 length(); 112 qDebug("<<<<<<<<<<<< xinecontrol setPostion>>>>>>>>>");
113 qDebug("M_LENGTH :" + m_length); 113 m_position = (m_currentTime/m_length*100);
114 m_position = ( currentTime() /m_length*100);
115 mediaPlayerState->setPosition( m_position ); 114 mediaPlayerState->setPosition( m_position );
116 long emitPos = (long)m_position; 115 long emitPos = (long)m_position;
117 emit positionChanged( emitPos ); 116 emit positionChanged( emitPos );
118 QTimer::singleShot( 1000, this, SLOT( position() ) ); 117 QTimer::singleShot( 1000, this, SLOT( position() ) );
119 qDebug("POSITION : " + m_position); 118 qDebug("POSITION : " + m_position);
120 return m_position; 119 return m_position;
121} 120}
122 121
123void XineControl::setFullscreen( bool isSet ) { 122void XineControl::setFullscreen( bool isSet ) {
124 libXine->showVideoFullScreen( isSet); 123 libXine->showVideoFullScreen( isSet);
125} 124}
126 125
127void XineControl::seekTo( long second ) { 126void XineControl::seekTo( long second ) {
128 // libXine-> 127 // libXine->
129} 128}
129
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 @@
1/* 1/*
2                This file is part of the Opie Project 2                This file is part of the Opie Project
3 3
4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> 4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
5 Copyright (c) 2002 L. Potter <ljp@llornkcor.com> 5 Copyright (c) 2002 L. Potter <ljp@llornkcor.com>
6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> 6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
7 =. 7 =.
8 .=l. 8 .=l.
9           .>+-= 9           .>+-=
10 _;:,     .>    :=|. This program is free software; you can 10 _;:,     .>    :=|. This program is free software; you can
11.> <`_,   >  .   <= redistribute it and/or modify it under 11.> <`_,   >  .   <= redistribute it and/or modify it under
12:`=1 )Y*s>-.--   : the terms of the GNU General Public 12:`=1 )Y*s>-.--   : the terms of the GNU General Public
13.="- .-=="i,     .._ License as published by the Free Software 13.="- .-=="i,     .._ License as published by the Free Software
14 - .   .-<_>     .<> Foundation; either version 2 of the License, 14 - .   .-<_>     .<> Foundation; either version 2 of the License,
15     ._= =}       : or (at your option) any later version. 15     ._= =}       : or (at your option) any later version.
16    .%`+i>       _;_. 16    .%`+i>       _;_.
17    .i_,=:_.      -<s. This program is distributed in the hope that 17    .i_,=:_.      -<s. This program is distributed in the hope that
18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
19    : ..    .:,     . . . without even the implied warranty of 19    : ..    .:,     . . . without even the implied warranty of
20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; Library General Public License for more 22..}^=.=       =       ; Library General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
24 :     =  ...= . :.=- 24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with 26  -_. . .   )=.  = Library General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation, 28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330, 29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA. 30 Boston, MA 02111-1307, USA.
31 31
32*/ 32*/
33 33
34#ifndef XINECONTROL_H 34#ifndef XINECONTROL_H
35#define XINECONTROL_H 35#define XINECONTROL_H
36 36
37#include "lib.h" 37#include "lib.h"
38#include "mediadetect.h" 38#include "mediadetect.h"
39#include <qobject.h> 39#include <qobject.h>
40 40
41class XineControl : public QObject { 41class XineControl : public QObject {
42 Q_OBJECT 42 Q_OBJECT
43public: 43public:
44 XineControl( QObject *parent = 0, const char *name =0 ); 44 XineControl( QObject *parent = 0, const char *name =0 );
45 ~XineControl(); 45 ~XineControl();
46 int m_length;
46 47
47public slots: 48public slots:
48 void play( const QString& fileName ); 49 void play( const QString& fileName );
49 void stop( bool ); 50 void stop( bool );
50 void pause( bool ); 51 void pause( bool );
51 void setFullscreen( bool ); 52 void setFullscreen( bool );
52 int currentTime(); 53 int currentTime();
53 void seekTo( long ); 54 void seekTo( long );
54 // get length of media file and set it 55 // get length of media file and set it
55 void length(); 56 void length();
56 57
57 int position(); 58 long position();
58 59
59private: 60private:
60 XINE::Lib *libXine; 61 XINE::Lib *libXine;
61 MediaDetect mdetect; 62 MediaDetect mdetect;
62 int m_length;
63 int m_currentTime; 63 int m_currentTime;
64 int m_position; 64 long m_position;
65 65
66signals: 66signals:
67 void positionChanged( long position ); 67 void positionChanged( long );
68 68
69}; 69};
70 70
71 71
72#endif 72#endif