summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/loopcontrol.h
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/loopcontrol.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/loopcontrol.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/loopcontrol.h b/core/multimedia/opieplayer/loopcontrol.h
index 967ee25..fc7d316 100644
--- a/core/multimedia/opieplayer/loopcontrol.h
+++ b/core/multimedia/opieplayer/loopcontrol.h
@@ -1,88 +1,90 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20// L.J.Potter added changes Fri 02-15-2002
21
20#ifndef MPEGVIEW_H 22#ifndef MPEGVIEW_H
21#define MPEGVIEW_H 23#define MPEGVIEW_H
22 24
23 25
24#include <qwidget.h> 26#include <qwidget.h>
25#include <qdatetime.h> 27#include <qdatetime.h>
26 28
27 29
28class LoopControl : public QObject { 30class LoopControl : public QObject {
29 Q_OBJECT 31 Q_OBJECT
30public: 32public:
31 LoopControl( QObject *parent, const char *name ); 33 LoopControl( QObject *parent, const char *name );
32 ~LoopControl(); 34 ~LoopControl();
33 35
34 bool init( const QString& filename ); 36 bool init( const QString& filename );
35 37
36 bool hasVideo() const { return hasVideoChannel; } 38 bool hasVideo() const { return hasVideoChannel; }
37 bool hasAudio() const { return hasAudioChannel; } 39 bool hasAudio() const { return hasAudioChannel; }
38 40
39 long totalPlaytime() { return (long)(hasVideoChannel ? total_video_frames / framerate : total_audio_samples / freq); } 41 long totalPlaytime() { return (long)(hasVideoChannel ? total_video_frames / framerate : total_audio_samples / freq); }
40 42
41 // These are public to run them from global functions needed to start threads 43 // These are public to run them from global functions needed to start threads
42 // Otherwise they would be private 44 // Otherwise they would be private
43 void startAudio(); 45 void startAudio();
44 void startVideo(); 46 void startVideo();
45 bool moreAudio; 47 bool moreAudio;
46 bool moreVideo; 48 bool moreVideo;
47public slots: 49public slots:
48 void play(); 50 void play();
49 void stop( bool willPlayAgainShortly = FALSE ); 51 void stop( bool willPlayAgainShortly = FALSE );
50 52
51 void setMute( bool ); 53 void setMute( bool );
52 void setPaused( bool ); 54 void setPaused( bool );
53 void setPosition( long ); 55 void setPosition( long );
54 56
55signals: 57signals:
56 void positionChanged( long, long ); 58 void positionChanged( long, long );
57 59
58protected: 60protected:
59 void timerEvent(QTimerEvent*); 61 void timerEvent(QTimerEvent*);
60 62
61private: 63private:
62 void startTimers(); 64 void startTimers();
63 void killTimers(); 65 void killTimers();
64 66
65 QTime playtime; 67 QTime playtime;
66 int videoId; 68 int videoId;
67 int sliderId; 69 int sliderId;
68 70
69 int audioSampleCounter; 71 int audioSampleCounter;
70 long current_frame; 72 long current_frame;
71 long total_video_frames; 73 long total_video_frames;
72 long total_audio_samples; 74 long total_audio_samples;
73 75
74 float framerate; 76 float framerate;
75 int freq; 77 int freq;
76 int stream; 78 int stream;
77 int framecount; 79 int framecount;
78 int channels; 80 int channels;
79 81
80 bool hasVideoChannel; 82 bool hasVideoChannel;
81 bool hasAudioChannel; 83 bool hasAudioChannel;
82 bool isMuted; 84 bool isMuted;
83 QString fileName; 85 QString fileName;
84}; 86};
85 87
86 88
87#endif 89#endif
88 90