File indexing completed on 2024-05-05 04:44:41
0001 /* This file is part of the KDE project 0002 Copyright (C) 2005-2007 Matthias Kretz <kretz@kde.org> 0003 0004 This library is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU Lesser General Public 0006 License as published by the Free Software Foundation; either 0007 version 2.1 of the License, or (at your option) version 3, or any 0008 later version accepted by the membership of KDE e.V. (or its 0009 successor approved by the membership of KDE e.V.), Nokia Corporation 0010 (or its successors, if any) and the KDE Free Qt Foundation, which shall 0011 act as a proxy defined in Section 6 of version 3 of the license. 0012 0013 This library is distributed in the hope that it will be useful, 0014 but WITHOUT ANY WARRANTY; without even the implied warranty of 0015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0016 Lesser General Public License for more details. 0017 0018 You should have received a copy of the GNU Lesser General Public 0019 License along with this library. If not, see <http://www.gnu.org/licenses/>. 0020 0021 */ 0022 0023 #ifndef PHONON_VIDEODATAOUTPUT_H 0024 #define PHONON_VIDEODATAOUTPUT_H 0025 0026 #include "export.h" 0027 #include "../abstractvideooutput.h" 0028 #include "../phonondefs.h" 0029 #include <QObject> 0030 0031 #ifndef DOXYGEN_SHOULD_SKIP_THIS 0032 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) 0033 template<typename T> class QVector; 0034 #else 0035 template<typename T> class QList; 0036 #endif 0037 template<typename Key, typename T> class QMap; 0038 #endif 0039 class QSize; 0040 0041 namespace Phonon 0042 { 0043 namespace Experimental 0044 { 0045 class VideoDataOutputPrivate; 0046 struct VideoFrame; 0047 0048 /** 0049 * \short This class gives you nothing. ;-) 0050 * \deprecated 0051 * 0052 * \author Matthias Kretz <kretz@kde.org> 0053 */ 0054 class PHONONEXPERIMENTAL_EXPORT VideoDataOutput : public QObject, public AbstractVideoOutput 0055 { 0056 Q_OBJECT 0057 P_DECLARE_PRIVATE(VideoDataOutput) 0058 /** 0059 * This property retrieves the nominal latency of the 0060 * backend. 0061 */ 0062 Q_PROPERTY(int latency READ latency) 0063 0064 /** 0065 * This property indicates the state of the data output. 0066 */ 0067 Q_PROPERTY(bool running READ isRunning WRITE setRunning) 0068 0069 PHONON_HEIR(VideoDataOutput) 0070 public: 0071 int latency() const; 0072 0073 bool isRunning() const; 0074 0075 Phonon::Experimental::VideoFrame frameForTime(qint64 timestamp); 0076 0077 public Q_SLOTS: 0078 void setRunning(bool running); 0079 void start(); 0080 void stop(); 0081 0082 Q_SIGNALS: 0083 /* FIXME: disabled this piece of documentation - add another * to enable 0084 * Fixme: I don't think this makes sense, but I've been wrong before. 0085 * 0086 * Emitted whenever another dataSize number of samples are ready and 0087 * format is set to IntegerFormat. 0088 * 0089 * If format is set to FloatFormat the signal is not emitted at all. 0090 * 0091 * \param frame An object of class VideoFrame holding the video data 0092 * and some additional information. 0093 * void frameReady(const Phonon::Experimental::VideoFrame &frame); 0094 */ 0095 0096 /** 0097 * The signal is emitted whenever a frame should be displayed. 0098 * 0099 * The relevant frames should be fetched and displayed using frameForTime 0100 * method. 0101 * 0102 * \param nowStamp the current time 0103 * \param outStamp the time the frame should be displayed with 0104 */ 0105 void displayFrame(qint64 nowStamp, qint64 outStamp); 0106 0107 /** 0108 * This signal is emitted after the last frameReady signal of a 0109 * media is emitted. 0110 */ 0111 void endOfMedia(); 0112 }; 0113 0114 } // namespace Experimental 0115 } //namespace Phonon 0116 0117 // vim: sw=4 ts=4 tw=80 0118 #endif // PHONON_VIDEODATAOUTPUT_H