phonon/videoplayer.h Source File

videoplayer.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright (C) 2004-2007 Matthias Kretz <kretz@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) version 3, or any
8  later version accepted by the membership of KDE e.V. (or its
9  successor approved by the membership of KDE e.V.), Nokia Corporation
10  (or its successors, if any) and the KDE Free Qt Foundation, which shall
11  act as a proxy defined in Section 6 of version 3 of the license.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with this library. If not, see <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 #ifndef Phonon_VIDEOPLAYER_H
24 #define Phonon_VIDEOPLAYER_H
25 
26 #include "phonon_export.h"
27 #include "phononnamespace.h"
28 #include "mediasource.h"
29 #include <QtGui/QWidget>
30 
33 
34 #ifndef QT_NO_PHONON_VIDEOPLAYER
35 
36 namespace Phonon
37 {
38 class VideoPlayerPrivate;
39 class MediaObject;
40 class AudioOutput;
41 class VideoWidget;
42 
65 {
66  Q_OBJECT
67  public:
74  explicit VideoPlayer(Phonon::Category category, QWidget *parent = 0);
75 
82  VideoPlayer(QWidget *parent = 0);
83 
90  ~VideoPlayer();
91 
95  qint64 totalTime() const;
99  qint64 currentTime() const;
105  float volume() const;
106 
111  bool isPlaying() const;
116  bool isPaused() const;
117 
121  MediaObject *mediaObject() const;
122 
126  AudioOutput *audioOutput() const;
127 
131  VideoWidget *videoWidget() const;
132 
133  public Q_SLOTS:
141  void load(const Phonon::MediaSource &source);
142 
159  void play(const Phonon::MediaSource &source);
160 
165  void play();
169  void pause();
173  void stop();
174 
181  void seek(qint64 ms);
187  void setVolume(float volume);
188 
189  Q_SIGNALS:
193  void finished();
194 
195  protected:
196  VideoPlayerPrivate *const d;
197 };
198 
199 } //namespace Phonon
200 
201 #endif //QT_NO_PHONON_VIDEOPLAYER
202 
205 
206 #endif // Phonon_VIDEOPLAYER_H
207 // vim: sw=4 ts=4 tw=80
GLsizei GLsizei GLchar * source
Definition: GLee.h:1721
#define QT_END_NAMESPACE
Definition: qglobal.h:128
#define QT_BEGIN_HEADER
Definition: qglobal.h:141
Widget to display video.
Definition: videowidget.h:56
long long qint64
Definition: qglobal.h:947
VideoPlayerPrivate *const d
Definition: videoplayer.h:196
#define Q_SLOTS
Definition: qobjectdefs.h:71
#define Q_SIGNALS
Definition: qobjectdefs.h:72
Note that all constructors of this class are implicit, so that you can simply write.
Definition: mediasource.h:61
Interface for media playback of a given URL.
Definition: mediaobject.h:84
#define QT_BEGIN_NAMESPACE
Definition: qglobal.h:127
Category
Set's the category your program should be listed in in the mixer.
#define Q_OBJECT
Definition: qobjectdefs.h:157
The KDE Multimedia classes.
Playback class for simple tasks.
Definition: videoplayer.h:64
Class for audio output to the soundcard.
Definition: audiooutput.h:50
#define PHONON_EXPORT
Definition: phonon_export.h:38
#define QT_END_HEADER
Definition: qglobal.h:142