| abstractmediastream.h | | abstractmediastream.h | |
| | | | |
| skipping to change at line 189 | | skipping to change at line 189 | |
| /** | | /** | |
| * Reimplement this function to reset the stream. Subsequent calls
to writeData should start | | * Reimplement this function to reset the stream. Subsequent calls
to writeData should start | |
| * from the first position of the data unless a seek is requested. | | * from the first position of the data unless a seek is requested. | |
| * | | * | |
| * The function is necessary for the case where a non-seekable Medi
aStream is | | * The function is necessary for the case where a non-seekable Medi
aStream is | |
| * played more than once. For a seekable stream the implementation
can simply call | | * played more than once. For a seekable stream the implementation
can simply call | |
| * \code | | * \code | |
| * seekStream(0); | | * seekStream(0); | |
| * \endcode. | | * \endcode. | |
| */ | | */ | |
|
| virtual void reset() = 0; | | Q_INVOKABLE virtual void reset() = 0; | |
| | | | |
| /** | | /** | |
| * Reimplement this function to be notified when the backend needs
data. | | * Reimplement this function to be notified when the backend needs
data. | |
| * | | * | |
| * When this function is called you should try to call writeData or
endOfData before | | * When this function is called you should try to call writeData or
endOfData before | |
| * returning. | | * returning. | |
| */ | | */ | |
|
| virtual void needData() = 0; | | Q_INVOKABLE virtual void needData() = 0; | |
| | | | |
| /** | | /** | |
| * Reimplement this function to be notified when the backend has en
ough data and your stream | | * Reimplement this function to be notified when the backend has en
ough data and your stream | |
| * object may take a break. This method is important for pushing da
ta to the backend in | | * object may take a break. This method is important for pushing da
ta to the backend in | |
| * order to not fill the backend buffer unnecessarily. | | * order to not fill the backend buffer unnecessarily. | |
| */ | | */ | |
|
| virtual void enoughData(); | | Q_INVOKABLE virtual void enoughData(); | |
| | | | |
| /** | | /** | |
| * Reimplement this function if your stream is seekable. | | * Reimplement this function if your stream is seekable. | |
| * | | * | |
| * When this function is called the next call to writeData has to b
e at the requested \p | | * When this function is called the next call to writeData has to b
e at the requested \p | |
| * offset. | | * offset. | |
| * | | * | |
| * \warning Do not call the parent implementation. | | * \warning Do not call the parent implementation. | |
| */ | | */ | |
|
| virtual void seekStream(qint64 offset); | | Q_INVOKABLE virtual void seekStream(qint64 offset); | |
| | | | |
| AbstractMediaStream(AbstractMediaStreamPrivate &dd, QObject *parent
); | | AbstractMediaStream(AbstractMediaStreamPrivate &dd, QObject *parent
); | |
| QScopedPointer<AbstractMediaStreamPrivate> d_ptr; | | QScopedPointer<AbstractMediaStreamPrivate> d_ptr; | |
| }; | | }; | |
| | | | |
| } // namespace Phonon | | } // namespace Phonon | |
| | | | |
| #endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM | | #endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM | |
| | | | |
| QT_END_NAMESPACE | | QT_END_NAMESPACE | |
| | | | |
End of changes. 4 change blocks. |
| 4 lines changed or deleted | | 4 lines changed or added | |
|
| addoninterface.h | | addoninterface.h | |
| /* This file is part of the KDE project | | /* This file is part of the KDE project | |
| Copyright (C) 2007-2008 Matthias Kretz <kretz@kde.org> | | Copyright (C) 2007-2008 Matthias Kretz <kretz@kde.org> | |
|
| | | Copyright (C) 2011 Harald Sitter <sitter@kde.org> | |
| | | | |
| This library is free software; you can redistribute it and/or | | This library is free software; you can redistribute it and/or | |
| modify it under the terms of the GNU Lesser General Public | | modify it under the terms of the GNU Lesser General Public | |
| License as published by the Free Software Foundation; either | | License as published by the Free Software Foundation; either | |
| version 2.1 of the License, or (at your option) version 3, or any | | version 2.1 of the License, or (at your option) version 3, or any | |
| later version accepted by the membership of KDE e.V. (or its | | later version accepted by the membership of KDE e.V. (or its | |
| successor approved by the membership of KDE e.V.), Nokia Corporation | | successor approved by the membership of KDE e.V.), Nokia Corporation | |
| (or its successors, if any) and the KDE Free Qt Foundation, which shall | | (or its successors, if any) and the KDE Free Qt Foundation, which shall | |
| act as a proxy defined in Section 6 of version 3 of the license. | | act as a proxy defined in Section 6 of version 3 of the license. | |
| | | | |
| | | | |
| skipping to change at line 49 | | skipping to change at line 50 | |
| * \short Interface for Menu, Chapter, Angle and Title/Track control. | | * \short Interface for Menu, Chapter, Angle and Title/Track control. | |
| * | | * | |
| * \author Matthias Kretz <kretz@kde.org> | | * \author Matthias Kretz <kretz@kde.org> | |
| */ | | */ | |
| class AddonInterface | | class AddonInterface | |
| { | | { | |
| public: | | public: | |
| virtual ~AddonInterface() {} | | virtual ~AddonInterface() {} | |
| | | | |
| enum Interface { | | enum Interface { | |
|
| NavigationInterface = 1, | | NavigationInterface = 1, /**< Interface for (menu) navigation | |
| ChapterInterface = 2, | | */ | |
| AngleInterface = 3, | | ChapterInterface = 2, /**< Interface for chapter control * | |
| TitleInterface = 4, | | / | |
| SubtitleInterface = 5, | | AngleInterface = 3, /**< Interface for angle control */ | |
| AudioChannelInterface = 6 | | TitleInterface = 4, /**< Interface for title control */ | |
| | | SubtitleInterface = 5, /**< Interface for subtitle control | |
| | | */ | |
| | | AudioChannelInterface = 6 /**< Interface for audio channel con | |
| | | trol */ | |
| }; | | }; | |
| | | | |
| enum NavigationCommand { | | enum NavigationCommand { | |
|
| Menu1Button | | availableMenus, /**< \returns a QList<MediaController::Navigati | |
| | | onMenu> | |
| | | containing all supported navigation menu t | |
| | | ypes */ | |
| | | setMenu /**< Sets the current menu to the first | |
| | | \c MediaController::NavigationMenu in a QL | |
| | | ist */ | |
| }; | | }; | |
|
| | | | |
| enum ChapterCommand { | | enum ChapterCommand { | |
|
| availableChapters, | | availableChapters, /**< \returns an \c int representing the amo | |
| chapter, | | unt of | |
| setChapter | | available chapters on the media source | |
| | | */ | |
| | | chapter, /**< \returns an \c int representing the cur | |
| | | rent chapter */ | |
| | | setChapter /**< Sets the current chapter to the first \ | |
| | | c int in the QList */ | |
| }; | | }; | |
|
| | | | |
| enum AngleCommand { | | enum AngleCommand { | |
|
| availableAngles, | | availableAngles, /**< \returns \c int representing the amount o | |
| angle, | | f | |
| setAngle | | available angles on the media source */ | |
| | | angle, /**< \returns an \c int representing the curre | |
| | | nt angle */ | |
| | | setAngle /**< Sets the current angle to the first \c in | |
| | | t in the QList */ | |
| }; | | }; | |
|
| | | | |
| enum TitleCommand { | | enum TitleCommand { | |
|
| availableTitles, | | availableTitles, /**< \returns \c int representing the amount o | |
| title, | | f | |
| setTitle, | | available titles on the media source */ | |
| autoplayTitles, | | title, /**< \returns \c int representing the current | |
| setAutoplayTitles | | title */ | |
| | | setTitle, /**< Sets the current tittle to the first \c i | |
| | | nt in the QList */ | |
| | | autoplayTitles, /**< \returns \c bool whether autoplay of titl | |
| | | es is on */ | |
| | | setAutoplayTitles /**< Sets autoplay to \c true or \c false as | |
| | | indicated in the first \c bool in the QL | |
| | | ist */ | |
| }; | | }; | |
|
| | | | |
| enum SubtitleCommand { | | enum SubtitleCommand { | |
|
| availableSubtitles, | | availableSubtitles, /**< \returns \c int representing the amoun | |
| currentSubtitle, | | t of | |
| setCurrentSubtitle | | available subtitles on the media sour | |
| | | ce */ | |
| | | currentSubtitle, /**< \returns \c int representing the curre | |
| | | nt subtitle */ | |
| | | setCurrentSubtitle /**< Sets the current subtitle to the first | |
| | | \c int in the QList */ | |
| }; | | }; | |
|
| | | | |
| enum AudioChannelCommand { | | enum AudioChannelCommand { | |
|
| availableAudioChannels, | | availableAudioChannels, /**< \returns \c int representing the a | |
| currentAudioChannel, | | mount | |
| setCurrentAudioChannel | | of all available audio channels o | |
| | | n the | |
| | | media source */ | |
| | | currentAudioChannel, /**< \returns \c int representing the c | |
| | | urrent | |
| | | audio channel */ | |
| | | setCurrentAudioChannel /**< Sets the current audio channel to | |
| | | the first | |
| | | \c int in the QList */ | |
| }; | | }; | |
| | | | |
|
| | | /** | |
| | | * Queries whether the backend supports a specific interface. | |
| | | * | |
| | | * \param iface The interface to query support information about | |
| | | * \returns \c true when the backend supports the interface, \c fal | |
| | | se otherwise | |
| | | * | |
| | | * \ingroup backend | |
| | | **/ | |
| virtual bool hasInterface(Interface iface) const = 0; | | virtual bool hasInterface(Interface iface) const = 0; | |
| | | | |
|
| | | /** | |
| | | * Calls an interface on the backend. | |
| | | * | |
| | | * \param iface The interface to call. | |
| | | * \param command The command the interface shall execute. This can | |
| | | be | |
| | | * any value of the Command enumeration associated with the command | |
| | | . The | |
| | | * backend casts this appropriately. | |
| | | * \param arguments The arguments for the command. This list can co | |
| | | ntain | |
| | | * a QVariant supported format + additions specific to Phonon. The | |
| | | * content entirely depends on the command (e.g. a getter may simpl | |
| | | y use | |
| | | * an empty list). | |
| | | * | |
| | | * \return \c QVariant, as with the arguments this can be anything | |
| | | ranging | |
| | | * from an empty QVariant to custom types used within Phonon | |
| | | * | |
| | | * Setting the chapter of a Media could be done like this: | |
| | | * \code | |
| | | * AddonInterface *iface = d->iface(); | |
| | | * iface->interfaceCall(AddonInterface::ChapterInterface, | |
| | | * AddonInterface::setChapter, | |
| | | * QList<QVariant>() << QVariant(titleNumber)) | |
| | | ; | |
| | | * \endcode | |
| | | * | |
| | | * Handling such a request in the backend is done as follows: | |
| | | * \code | |
| | | * switch (iface) { | |
| | | * case AddonInterface::ChapterInterface: | |
| | | * switch (static_cast<AddonInterface::ChapterCommand>(command) | |
| | | ) { | |
| | | * case setChapter: | |
| | | * setCurrentChapter(arguments.first().toInt()); | |
| | | * return QVariant(); | |
| | | * } | |
| | | * } | |
| | | * \endcode | |
| | | * | |
| | | * \see Interface | |
| | | * \see NavigationCommand | |
| | | * \see ChapterCommand | |
| | | * \see AngleCommand | |
| | | * \see TitleCommand | |
| | | * \see SubtitleCommand | |
| | | * \see AudioChannelCommand | |
| | | * | |
| | | * \ingroup backend | |
| | | **/ | |
| virtual QVariant interfaceCall(Interface iface, int command, | | virtual QVariant interfaceCall(Interface iface, int command, | |
| const QList<QVariant> &arguments = QList<QVariant>()) = 0; | | const QList<QVariant> &arguments = QList<QVariant>()) = 0; | |
| }; | | }; | |
| | | | |
| } // namespace Phonon | | } // namespace Phonon | |
| | | | |
| Q_DECLARE_INTERFACE(Phonon::AddonInterface, "AddonInterface0.2.phonon.kde.o
rg") | | Q_DECLARE_INTERFACE(Phonon::AddonInterface, "AddonInterface0.2.phonon.kde.o
rg") | |
| | | | |
| #endif //QT_NO_PHONON_MEDIACONTROLLER | | #endif //QT_NO_PHONON_MEDIACONTROLLER | |
| | | | |
| | | | |
End of changes. 15 change blocks. |
| 24 lines changed or deleted | | 130 lines changed or added | |
|
| avcapture.h | | avcapture.h | |
| | | | |
| skipping to change at line 25 | | skipping to change at line 25 | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| Lesser General Public License for more details. | | Lesser General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU Lesser General Public | | You should have received a copy of the GNU Lesser General Public | |
| License along with this library. If not, see <http://www.gnu.org/licen
ses/>. | | License along with this library. If not, see <http://www.gnu.org/licen
ses/>. | |
| | | | |
| */ | | */ | |
| #ifndef PHONON_EXPERIMENTAL_AVCAPTURE_H | | #ifndef PHONON_EXPERIMENTAL_AVCAPTURE_H | |
| #define PHONON_EXPERIMENTAL_AVCAPTURE_H | | #define PHONON_EXPERIMENTAL_AVCAPTURE_H | |
| | | | |
|
| | | #if defined(PHONON_NO_VIDEOCAPTURE) || defined(PHONON_NO_AUDIOCAPTURE) | |
| | | #define NO_PHONON_AVCAPTURE | |
| | | #endif | |
| | | | |
| | | #ifndef NO_PHONON_AVCAPTURE | |
| | | | |
| #include "export.h" | | #include "export.h" | |
| #include "../medianode.h" | | #include "../medianode.h" | |
| #include "../phonondefs.h" | | #include "../phonondefs.h" | |
| #include "objectdescription.h" | | #include "objectdescription.h" | |
|
| | | | |
| | | #if defined(MAKE_PHONONEXPERIMENTAL_LIB) | |
| #include "../phononnamespace.h" | | #include "../phononnamespace.h" | |
|
| | | #else | |
| | | #include "phonon/phononnamespace.h" | |
| | | #endif | |
| | | | |
| class QString; | | class QString; | |
| class QStringList; | | class QStringList; | |
| | | | |
| namespace Phonon | | namespace Phonon | |
| { | | { | |
| namespace Experimental | | namespace Experimental | |
| { | | { | |
| | | | |
| class AvCapturePrivate; | | class AvCapturePrivate; | |
| | | | |
| /** | | /** | |
| * @short Media data from a soundcard, soundserver, camera or any other | | * @short Media data from a soundcard, soundserver, camera or any other | |
| * hardware device supported by the backend. | | * hardware device supported by the backend. | |
| * | | * | |
| * This class gives you access to the capture capabilities of the backe
nd. | | * This class gives you access to the capture capabilities of the backe
nd. | |
| * There might be more than only one possible capture source, for audio
, as | | * There might be more than only one possible capture source, for audio
, as | |
|
| * well as for video. The list of available sources is available throug | | * well as for video. A prefferable device may easily be obtained by pr | |
| h | | oviding | |
| * BackendCapabilities::availableAudioCaptureDevices and | | * a capture category. | |
| * BackendCapabilities::availableVideoCaptureDevices. | | | |
| * | | * | |
| * @ingroup Recording | | * @ingroup Recording | |
| * @author Matthias Kretz <kretz@kde.org> | | * @author Matthias Kretz <kretz@kde.org> | |
| * @see BackendCapabilities::availableAudioCaptureDevices | | * @see BackendCapabilities::availableAudioCaptureDevices | |
| * @see BackendCapabilities::availableVideoCaptureDevices | | * @see BackendCapabilities::availableVideoCaptureDevices | |
| */ | | */ | |
| class PHONONEXPERIMENTAL_EXPORT AvCapture : public QObject, public Phon
on::MediaNode | | class PHONONEXPERIMENTAL_EXPORT AvCapture : public QObject, public Phon
on::MediaNode | |
| { | | { | |
| Q_OBJECT | | Q_OBJECT | |
|
| K_DECLARE_PRIVATE(AvCapture) | | P_DECLARE_PRIVATE(AvCapture) | |
| PHONON_OBJECT(AvCapture) | | PHONON_OBJECT(AvCapture) | |
|
| Q_PROPERTY(AudioCaptureDevice audioCaptureDevice READ audioCaptureD | | Q_PROPERTY(Phonon::AudioCaptureDevice audioCaptureDevice READ audio | |
| evice WRITE setAudioCaptureDevice) | | CaptureDevice WRITE setAudioCaptureDevice) | |
| Q_PROPERTY(VideoCaptureDevice videoCaptureDevice READ videoCaptureD | | Q_PROPERTY(Phonon::VideoCaptureDevice videoCaptureDevice READ video | |
| evice WRITE setVideoCaptureDevice) | | CaptureDevice WRITE setVideoCaptureDevice) | |
| public: | | public: | |
| /** | | /** | |
|
| * Returns the currently used capture source for the audio sign | | * Constructs an AvCapture with the devices preferred for the s | |
| al. | | pecified | |
| | | * capture category. | |
| * | | * | |
|
| * @see AudioCaptureDevice | | * @param category Used to determine what devices are most suit | |
| * @see setAudioCaptureDevice(const AudioCaptureDevice &) | | ed for | |
| * @see setAudioCaptureDevice(int) | | * the AvCapture. | |
| | | * | |
| | | * @see CaptureCategory | |
| */ | | */ | |
|
| AudioCaptureDevice audioCaptureDevice() const; | | AvCapture(Phonon::CaptureCategory category, QObject *parent = N | |
| | | ULL); | |
| | | | |
| | | /** | |
| | | * Returns the current state of the capture. | |
| | | * | |
| | | * @li If only the audio capture device is valid, it returns th | |
| | | e audio capture state. | |
| | | * @li If only the video capture device is valid, it returns th | |
| | | e video capture state. | |
| | | * @li If both the audio and video capture devices are valid, i | |
| | | t only returns the | |
| | | * video capture state. | |
| | | */ | |
| | | State state() const; | |
| | | | |
| | | /** | |
| | | * Returns the currently used capture source for the audio sign | |
| | | al. | |
| | | */ | |
| | | Phonon::AudioCaptureDevice audioCaptureDevice() const; | |
| | | | |
| /** | | /** | |
| * Returns the currently used capture source for the video sign
al. | | * Returns the currently used capture source for the video sign
al. | |
|
| | | */ | |
| | | Phonon::VideoCaptureDevice videoCaptureDevice() const; | |
| | | | |
| | | /** | |
| | | * Sets both the video and audio devices to the ones most suite | |
| | | d for the | |
| | | * specified category | |
| * | | * | |
|
| * @see VideoCaptureDevice | | * @param category Used to determine what devices are most suit | |
| * @see setVideoCaptureDevice(const VideoCaptureDevice &) | | ed for | |
| * @see setVideoCaptureDevice(int) | | * the AvCapture. | |
| */ | | */ | |
|
| VideoCaptureDevice videoCaptureDevice() const; | | void setCaptureDevices(Phonon::CaptureCategory category); | |
| | | | |
| /** | | /** | |
| * Sets the audio capture source to use. | | * Sets the audio capture source to use. | |
| * | | * | |
|
| * @param source An object of class AudioCaptureDevice. A list | | * @param source An object of class AudioCaptureDevice. | |
| of | | | |
| * available objects can be queried from | | | |
| * BackendCapabilities::availableAudioCaptureDevices. | | | |
| * | | * | |
|
| * @see audioCaptureDevice | | | |
| * @see setAudioCaptureDevice(int) | | | |
| */ | | */ | |
|
| void setAudioCaptureDevice(const AudioCaptureDevice &source); | | void setAudioCaptureDevice(const Phonon::AudioCaptureDevice &so | |
| void setAudioCaptureDevice(Phonon::Category category); | | urce); | |
| | | | |
| | | /** | |
| | | * Sets the audio capture device by using a capture category to | |
| | | get | |
| | | * the appropriate device. | |
| | | * | |
| | | * @param category Capture category to use for getting a device | |
| | | */ | |
| | | void setAudioCaptureDevice(Phonon::CaptureCategory category); | |
| | | | |
| | | PHONON_DEPRECATED void setAudioCaptureDevice(Phonon::Category c | |
| | | ategory); | |
| | | | |
| /** | | /** | |
| * Sets the video capture source to use. | | * Sets the video capture source to use. | |
| * | | * | |
|
| * @param source An object of class VideoCaptureDevice. A list | | * @param source An object of class VideoCaptureDevice. | |
| of | | | |
| * available objects can be queried from | | | |
| * BackendCapabilities::availableVideoCaptureDevices. | | | |
| * | | * | |
| * @see videoCaptureDevice | | * @see videoCaptureDevice | |
| * @see setVideoCaptureDevice(int) | | * @see setVideoCaptureDevice(int) | |
| */ | | */ | |
|
| void setVideoCaptureDevice(const VideoCaptureDevice &source); | | void setVideoCaptureDevice(const Phonon::VideoCaptureDevice &so | |
| void setVideoCaptureDevice(Phonon::Category category); | | urce); | |
| | | | |
| | | /** | |
| | | * Sets the audio capture device by using a capture category to | |
| | | get | |
| | | * the appropriate device. | |
| | | * | |
| | | * @param category Capture category to use for getting a device | |
| | | */ | |
| | | void setVideoCaptureDevice(Phonon::CaptureCategory category); | |
| | | | |
| | | PHONON_DEPRECATED void setVideoCaptureDevice(Phonon::Category c | |
| | | ategory); | |
| | | | |
| | | /** | |
| | | * @deprecated since 4.4.3, use | |
| | | * setVideoCaptureDevice(const Phonon::VideoCaptureDevice &sour | |
| | | ce) instead | |
| | | */ | |
| | | PHONON_DEPRECATED void setVideoCaptureDevice(const Phonon::Expe | |
| | | rimental::VideoCaptureDevice &source); | |
| | | | |
| public Q_SLOTS: | | public Q_SLOTS: | |
| /** | | /** | |
| * Start capture. | | * Start capture. | |
| */ | | */ | |
| void start(); | | void start(); | |
| | | | |
| /** | | /** | |
|
| | | * Pause capture. | |
| | | */ | |
| | | void pause(); | |
| | | | |
| | | /** | |
| * Stop capture. | | * Stop capture. | |
| */ | | */ | |
| void stop(); | | void stop(); | |
|
| | | | |
| | | Q_SIGNALS: | |
| | | /** | |
| | | * Emitted when the state of the video or audio capture device | |
| | | has been changed. | |
| | | * | |
| | | * \li If only the audio capture device is valid, it notifies a | |
| | | bout the audio capture state. | |
| | | * \li If only the video capture device is valid, it notifies a | |
| | | bout the video capture state. | |
| | | * \li If both the audio and video capture devices are valid, i | |
| | | t only notifies about the | |
| | | * video capture state. | |
| | | */ | |
| | | void stateChanged(Phonon::State newstate, Phonon::State oldstat | |
| | | e); | |
| }; | | }; | |
| | | | |
| } // namespace Experimental | | } // namespace Experimental | |
| } // namespace Phonon | | } // namespace Phonon | |
| | | | |
|
| | | #endif // NO_PHONON_AVCAPTURE | |
| | | | |
| #endif // PHONON_EXPERIMENTAL_AVCAPTURE_H | | #endif // PHONON_EXPERIMENTAL_AVCAPTURE_H | |
| | | | |
End of changes. 20 change blocks. |
| 33 lines changed or deleted | | 120 lines changed or added | |
|
| backendcapabilities.h | | backendcapabilities.h | |
| | | | |
| skipping to change at line 78 | | skipping to change at line 78 | |
| | | | |
| /** | | /** | |
| * This signal is emitted when audio output devices were plugge
d or | | * This signal is emitted when audio output devices were plugge
d or | |
| * unplugged. | | * unplugged. | |
| * | | * | |
| * Check BackendCapabilities::availableAudioOutputDevices to ge
t the | | * Check BackendCapabilities::availableAudioOutputDevices to ge
t the | |
| * current list of available devices. | | * current list of available devices. | |
| */ | | */ | |
| void availableAudioOutputDevicesChanged(); | | void availableAudioOutputDevicesChanged(); | |
| | | | |
|
| | | #ifndef PHONON_NO_AUDIOCAPTURE | |
| /** | | /** | |
| * This signal is emitted when audio capture devices were plugg
ed or | | * This signal is emitted when audio capture devices were plugg
ed or | |
| * unplugged. | | * unplugged. | |
| * | | * | |
| * Check BackendCapabilities::availableAudioCaptureDevices to g
et the | | * Check BackendCapabilities::availableAudioCaptureDevices to g
et the | |
| * current list of available devices. | | * current list of available devices. | |
| */ | | */ | |
|
| #ifndef QT_NO_PHONON_AUDIOCAPTURE | | | |
| void availableAudioCaptureDevicesChanged(); | | void availableAudioCaptureDevicesChanged(); | |
|
| #endif //QT_NO_PHONON_AUDIOCAPTURE | | #endif //PHONON_NO_AUDIOCAPTURE | |
| | | | |
| | | #ifndef PHONON_NO_VIDEOCAPTURE | |
| | | /** | |
| | | * This signal is emitted when video capture devices were plugg | |
| | | ed or | |
| | | * unplugged. | |
| | | * | |
| | | * Check BackendCapabilities::availableVideoCaptureDevices to g | |
| | | et the | |
| | | * current list of available devices. | |
| | | */ | |
| | | void availableVideoCaptureDevicesChanged(); | |
| | | #endif //PHONON_NO_VIDEOCAPTURE | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Use this function to get a QObject pointer to connect to one of the
Notifier signals. | | * Use this function to get a QObject pointer to connect to one of the
Notifier signals. | |
| * | | * | |
| * \return a pointer to a QObject. | | * \return a pointer to a QObject. | |
| * | | * | |
| * To connect to the signal do the following: | | * To connect to the signal do the following: | |
| * \code | | * \code | |
| * QObject::connect(BackendCapabilities::notifier(), SIGNAL(capabilitie
sChanged()), ... | | * QObject::connect(BackendCapabilities::notifier(), SIGNAL(capabilitie
sChanged()), ... | |
| * \endcode | | * \endcode | |
| * | | * | |
| * \see Notifier::capabilitiesChanged() | | * \see Notifier::capabilitiesChanged() | |
| * \see Notifier::availableAudioOutputDevicesChanged() | | * \see Notifier::availableAudioOutputDevicesChanged() | |
| * \see Notifier::availableAudioCaptureDevicesChanged() | | * \see Notifier::availableAudioCaptureDevicesChanged() | |
|
| | | * \see Notifier::availableVideoCaptureDevicesChanged() | |
| */ | | */ | |
| PHONON_EXPORT Notifier *notifier(); | | PHONON_EXPORT Notifier *notifier(); | |
| | | | |
| /** | | /** | |
| * Returns a list of mime types that the Backend can decode. | | * Returns a list of mime types that the Backend can decode. | |
| * | | * | |
| * \see isMimeTypeAvailable() | | * \see isMimeTypeAvailable() | |
| */ | | */ | |
| PHONON_EXPORT QStringList availableMimeTypes(); | | PHONON_EXPORT QStringList availableMimeTypes(); | |
| | | | |
| | | | |
| skipping to change at line 130 | | skipping to change at line 142 | |
| PHONON_EXPORT bool isMimeTypeAvailable(const QString &mimeType); | | PHONON_EXPORT bool isMimeTypeAvailable(const QString &mimeType); | |
| | | | |
| /** | | /** | |
| * Returns the audio output devices the backend supports. | | * Returns the audio output devices the backend supports. | |
| * | | * | |
| * \return A list of AudioOutputDevice objects that give a name and | | * \return A list of AudioOutputDevice objects that give a name and | |
| * description for every supported audio output device. | | * description for every supported audio output device. | |
| */ | | */ | |
| PHONON_EXPORT QList<AudioOutputDevice> availableAudioOutputDevices(); | | PHONON_EXPORT QList<AudioOutputDevice> availableAudioOutputDevices(); | |
| | | | |
|
| | | #ifndef PHONON_NO_AUDIOCAPTURE | |
| /** | | /** | |
| * Returns the audio capture devices the backend supports. | | * Returns the audio capture devices the backend supports. | |
| * | | * | |
| * \return A list of AudioCaptureDevice objects that give a name and | | * \return A list of AudioCaptureDevice objects that give a name and | |
| * description for every supported audio capture device. | | * description for every supported audio capture device. | |
| */ | | */ | |
|
| #ifndef QT_NO_PHONON_AUDIOCAPTURE | | | |
| PHONON_EXPORT QList<AudioCaptureDevice> availableAudioCaptureDevices(); | | PHONON_EXPORT QList<AudioCaptureDevice> availableAudioCaptureDevices(); | |
|
| #endif //QT_NO_PHONON_AUDIOCAPTURE | | #endif //PHONON_NO_AUDIOCAPTURE | |
| | | | |
| /** | | /** | |
| * Returns the video output devices the backend supports. | | * Returns the video output devices the backend supports. | |
| * | | * | |
| * \return A list of VideoOutputDevice objects that give a name and | | * \return A list of VideoOutputDevice objects that give a name and | |
| * description for every supported video output device. | | * description for every supported video output device. | |
| */ | | */ | |
| // PHONON_EXPORT QList<VideoOutputDevice> availableVideoOutputDevices(); | | // PHONON_EXPORT QList<VideoOutputDevice> availableVideoOutputDevices(); | |
| | | | |
|
| | | #ifndef PHONON_NO_VIDEOCAPTURE | |
| /** | | /** | |
| * Returns the video capture devices the backend supports. | | * Returns the video capture devices the backend supports. | |
| * | | * | |
| * \return A list of VideoCaptureDevice objects that give a name and | | * \return A list of VideoCaptureDevice objects that give a name and | |
| * description for every supported video capture device. | | * description for every supported video capture device. | |
| */ | | */ | |
|
| // PHONON_EXPORT QList<VideoCaptureDevice> availableVideoCaptureDevices( | | PHONON_EXPORT QList<VideoCaptureDevice> availableVideoCaptureDevices(); | |
| ); | | #endif //PHONON_NO_VIDEOCAPTURE | |
| | | | |
| | | /** | |
| | | * Returns the video capture devices that have audio capture capabiliti | |
| | | es | |
| | | * that the backend supports. In effect, these are both video and audio | |
| | | * capture devices and one can connect them to both a VideoWidget and a | |
| | | n | |
| | | * AudioOutput, for example. | |
| | | * | |
| | | * The resulting VideoCaptureDevices have a "hasaudio" property to true | |
| | | . | |
| | | * | |
| | | * \note These devices appear both in availableVideoCaptureDevices() an | |
| | | d | |
| | | * availableAudioCaptureDevices() | |
| | | * | |
| | | * \warning Creating two separate MediaObject instances for the same ca | |
| | | pture | |
| | | * device, one for video and the other for audio, most probably doesn't | |
| | | work. | |
| | | * But, if there are two separate devices, use Experimental::AVCapture. | |
| | | * | |
| | | * \see availableVideoCaptureDevices() | |
| | | * \see availableAudioCaptureDevices() | |
| | | * \see Experimental::AVCapture | |
| | | */ | |
| | | #if !defined(PHONON_NO_VIDEOCAPTURE) && !defined(PHONON_NO_AUDIOCAPTURE) | |
| | | PHONON_EXPORT QList<VideoCaptureDevice> availableAVCaptureDevices(); | |
| | | #endif // NOT PHONON_NO_VIDEOCAPTURE AND NOT PHONON_NO_AUDIOCAPTURE | |
| | | | |
| /** | | /** | |
| * Returns the visualization effects the backend supports. | | * Returns the visualization effects the backend supports. | |
| * | | * | |
| * \return A list of VisualizationEffect objects that give a name and | | * \return A list of VisualizationEffect objects that give a name and | |
| * description for every supported visualization effect. | | * description for every supported visualization effect. | |
| */ | | */ | |
| // PHONON_EXPORT QList<VisualizationDescription> availableVisualizations
(); | | // PHONON_EXPORT QList<VisualizationDescription> availableVisualizations
(); | |
| | | | |
|
| | | #ifndef QT_NO_PHONON_EFFECT | |
| /** | | /** | |
| * Returns descriptions for the audio effects the backend supports. | | * Returns descriptions for the audio effects the backend supports. | |
| * | | * | |
| * \return A list of AudioEffectDescription objects that give a name an
d | | * \return A list of AudioEffectDescription objects that give a name an
d | |
| * description for every supported audio effect. | | * description for every supported audio effect. | |
| */ | | */ | |
|
| #ifndef QT_NO_PHONON_EFFECT | | | |
| PHONON_EXPORT QList<EffectDescription> availableAudioEffects(); | | PHONON_EXPORT QList<EffectDescription> availableAudioEffects(); | |
| #endif //QT_NO_PHONON_EFFECT | | #endif //QT_NO_PHONON_EFFECT | |
| | | | |
| //X /** | | //X /** | |
| //X * Returns descriptions for the video effects the backend supports. | | //X * Returns descriptions for the video effects the backend supports. | |
| //X * | | //X * | |
| //X * \return A list of VideoEffectDescription objects that give a nam
e and | | //X * \return A list of VideoEffectDescription objects that give a nam
e and | |
| //X * description for every supported video effect. | | //X * description for every supported video effect. | |
| //X */ | | //X */ | |
| //X PHONON_EXPORT QList<EffectDescription> availableVideoEffects(); | | //X PHONON_EXPORT QList<EffectDescription> availableVideoEffects(); | |
| | | | |
End of changes. 11 change blocks. |
| 7 lines changed or deleted | | 51 lines changed or added | |
|
| globalconfig.h | | globalconfig.h | |
| | | | |
| skipping to change at line 29 | | skipping to change at line 29 | |
| License along with this library. If not, see <http://www.gnu.org/licen
ses/>. | | License along with this library. If not, see <http://www.gnu.org/licen
ses/>. | |
| | | | |
| */ | | */ | |
| | | | |
| #ifndef PHONON_EXPERIMENTAL_GLOBALCONFIG_P_H | | #ifndef PHONON_EXPERIMENTAL_GLOBALCONFIG_P_H | |
| #define PHONON_EXPERIMENTAL_GLOBALCONFIG_P_H | | #define PHONON_EXPERIMENTAL_GLOBALCONFIG_P_H | |
| | | | |
| #include <QtCore/QObject> | | #include <QtCore/QObject> | |
| #include <QtCore/QSettings> | | #include <QtCore/QSettings> | |
| | | | |
|
| #include "../phononnamespace.h" | | #include "export.h" | |
| #include "../globalconfig.h" | | #include "../globalconfig.h" | |
| | | | |
| QT_BEGIN_HEADER | | QT_BEGIN_HEADER | |
| QT_BEGIN_NAMESPACE | | QT_BEGIN_NAMESPACE | |
| | | | |
| namespace Phonon | | namespace Phonon | |
| { | | { | |
| namespace Experimental | | namespace Experimental | |
| { | | { | |
| | | | |
|
| class GlobalConfig : public Phonon::GlobalConfig | | class PHONONEXPERIMENTAL_EXPORT GlobalConfig : public Phonon::GlobalConfig | |
| { | | { | |
|
| K_DECLARE_PRIVATE(Phonon::GlobalConfig) | | P_DECLARE_PRIVATE(Phonon::GlobalConfig) | |
| | | | |
| | | #ifndef PHONON_NO_VIDEOCAPTURE | |
| public: | | public: | |
|
| QList<int> videoCaptureDeviceListFor(Phonon::Category category, int ove | | PHONON_DEPRECATED QList<int> videoCaptureDeviceListFor(Phonon::Category | |
| rride = AdvancedDevicesFromSettings) const; | | category, int override = AdvancedDevicesFromSettings) const; | |
| int videoCaptureDeviceFor(Phonon::Category category, int override = Adv | | PHONON_DEPRECATED int videoCaptureDeviceFor(Phonon::Category category, | |
| ancedDevicesFromSettings) const; | | int override = AdvancedDevicesFromSettings) const; | |
| | | QList<int> videoCaptureDeviceListFor(Phonon::CaptureCategory category, | |
| | | int override = AdvancedDevicesFromSettings) const; | |
| | | int videoCaptureDeviceFor(Phonon::CaptureCategory category, int overrid | |
| | | e = AdvancedDevicesFromSettings) const; | |
| | | | |
| Q_SIGNALS: | | Q_SIGNALS: | |
| void videoCaptureDeviceConfigChanged(); | | void videoCaptureDeviceConfigChanged(); | |
|
| }; | | #endif // PHONON_NO_VIDEOCAPTURE | |
| | | | |
| | | }; // GlobalConfig class | |
| | | | |
| } // namespace Experimental | | } // namespace Experimental | |
| } // namespace Phonon | | } // namespace Phonon | |
| | | | |
| QT_END_NAMESPACE | | QT_END_NAMESPACE | |
| QT_END_HEADER | | QT_END_HEADER | |
| | | | |
| #endif // PHONON_EXPERIMENTAL_GLOBALCONFIG_P_H | | #endif // PHONON_EXPERIMENTAL_GLOBALCONFIG_P_H | |
| | | | |
End of changes. 5 change blocks. |
| 8 lines changed or deleted | | 16 lines changed or added | |
|
| mediacontroller.h | | mediacontroller.h | |
|
| /* This file is part of the KDE project | | /* | |
| Copyright (C) 2007 Matthias Kretz <kretz@kde.org> | | Copyright (C) 2007 Matthias Kretz <kretz@kde.org> | |
|
| | | Copyright (C) 2011 Harald Sitter <sitter@kde.org> | |
| | | | |
| This library is free software; you can redistribute it and/or | | This library is free software; you can redistribute it and/or | |
| modify it under the terms of the GNU Lesser General Public | | modify it under the terms of the GNU Lesser General Public | |
| License as published by the Free Software Foundation; either | | License as published by the Free Software Foundation; either | |
| version 2.1 of the License, or (at your option) version 3, or any | | version 2.1 of the License, or (at your option) version 3, or any | |
| later version accepted by the membership of KDE e.V. (or its | | later version accepted by the membership of KDE e.V. (or its | |
| successor approved by the membership of KDE e.V.), Nokia Corporation | | successor approved by the membership of KDE e.V.), Nokia Corporation | |
| (or its successors, if any) and the KDE Free Qt Foundation, which shall | | (or its successors, if any) and the KDE Free Qt Foundation, which shall | |
| act as a proxy defined in Section 6 of version 3 of the license. | | act as a proxy defined in Section 6 of version 3 of the license. | |
| | | | |
| | | | |
| skipping to change at line 54 | | skipping to change at line 55 | |
| * | | * | |
| * \ingroup Playback | | * \ingroup Playback | |
| * \author Matthias Kretz <kretz@kde.org> | | * \author Matthias Kretz <kretz@kde.org> | |
| */ | | */ | |
| class PHONON_EXPORT MediaController : public QObject | | class PHONON_EXPORT MediaController : public QObject | |
| { | | { | |
| Q_OBJECT | | Q_OBJECT | |
| Q_FLAGS(Features) | | Q_FLAGS(Features) | |
| public: | | public: | |
| enum Feature { | | enum Feature { | |
|
| | | /** | |
| | | * In the VOB (DVD) format, it is possible to give several vide | |
| | | o streams | |
| | | * of the same scene, each of which displays the scene from a d | |
| | | ifferent | |
| | | * angle. The DVD viewer can then change between these angles. | |
| | | */ | |
| Angles = 1, | | Angles = 1, | |
|
| | | /** | |
| | | * In the VOB format, chapters are points in a single video str | |
| | | eam | |
| | | * that can be played and seeked to separately. | |
| | | */ | |
| Chapters = 2, | | Chapters = 2, | |
|
| | | /** | |
| | | * In the VOB format, navigations are menus to quickly navigate | |
| | | * to content. | |
| | | */ | |
| | | Navigations = 3, | |
| | | /** | |
| | | * On a CD, a title is a separate sound track. On DVD, a title | |
| | | is a | |
| | | * separate VOB file (i.e. usually a different video entity). | |
| | | */ | |
| Titles = 4 | | Titles = 4 | |
| }; | | }; | |
| Q_DECLARE_FLAGS(Features, Feature) | | Q_DECLARE_FLAGS(Features, Feature) | |
| | | | |
|
| | | enum NavigationMenu { | |
| | | RootMenu, /** < Root/main menu. */ | |
| | | TitleMenu, /** < Title Menu to access different titles on th | |
| | | e media source. | |
| | | The title menu is usually where one would s | |
| | | elect | |
| | | the episode of a TV series DVD. It can be e | |
| | | qual to | |
| | | the main menu but does not need to be. */ | |
| | | AudioMenu, /** < Audio menu for language (and somtimes also | |
| | | subtitle) | |
| | | settings etc. */ | |
| | | SubtitleMenu, /** < Subtitle menu. Usually this represents the | |
| | | same menu | |
| | | as AudioMenu or is not present at all (in w | |
| | | hich case | |
| | | subtitle settings are propably also in the | |
| | | AudioMenu). */ | |
| | | ChapterMenu, /** < Chapter menu for chapter selection. */ | |
| | | AngleMenu /** < Angle menu. Rarely supported on any media s | |
| | | ource. */ | |
| | | }; | |
| | | | |
| MediaController(MediaObject *parent); | | MediaController(MediaObject *parent); | |
| ~MediaController(); | | ~MediaController(); | |
| | | | |
| Features supportedFeatures() const; | | Features supportedFeatures() const; | |
| | | | |
| int availableAngles() const; | | int availableAngles() const; | |
| int currentAngle() const; | | int currentAngle() const; | |
| | | | |
| int availableChapters() const; | | int availableChapters() const; | |
| int currentChapter() const; | | int currentChapter() const; | |
| | | | |
|
| | | /** | |
| | | * Translates a NavigationMenu enum to a string you can use in your | |
| | | GUI. | |
| | | * Please note that keyboard shortucts will not be present in the r | |
| | | eturned | |
| | | * String, therefore it is probably not a good idea to use this fun | |
| | | ction | |
| | | * if you are providing keyboard shortcuts for every other clickabl | |
| | | e. | |
| | | * | |
| | | * Please note that RootMenu has the string representation "Main Me | |
| | | nu" as | |
| | | * root is a rather technical term when talking about menus. | |
| | | * | |
| | | * Example: | |
| | | * \code | |
| | | * QString s = Phonon::MediaController::navigationMenuToString(Menu | |
| | | Main); | |
| | | * // s now contains "Main Menu" | |
| | | * \endcode | |
| | | * | |
| | | * \returns the QString representation of the menu | |
| | | */ | |
| | | static QString navigationMenuToString(NavigationMenu menu); | |
| | | | |
| | | /** | |
| | | * Get the list of currently available menus for the present media | |
| | | source. | |
| | | * | |
| | | * The list is always ordered by occurrence in the NavgiationMenu e | |
| | | num. | |
| | | * Should you wish to use a different order in your application you | |
| | | will | |
| | | * have to make appropriate changes. | |
| | | * | |
| | | * \returns list of available menus (supported by backend and media | |
| | | source). | |
| | | * | |
| | | * \see navigationMenuToString() | |
| | | */ | |
| | | QList<NavigationMenu> availableMenus() const; | |
| | | | |
| int availableTitles() const; | | int availableTitles() const; | |
| int currentTitle() const; | | int currentTitle() const; | |
| | | | |
| bool autoplayTitles() const; | | bool autoplayTitles() const; | |
| | | | |
| /** | | /** | |
| * Returns the selected audio stream. | | * Returns the selected audio stream. | |
| * | | * | |
| * \see availableAudioChannels | | * \see availableAudioChannels | |
| * \see setCurrentAudioChannel | | * \see setCurrentAudioChannel | |
| | | | |
| skipping to change at line 99 | | skipping to change at line 165 | |
| */ | | */ | |
| SubtitleDescription currentSubtitle() const; | | SubtitleDescription currentSubtitle() const; | |
| | | | |
| /** | | /** | |
| * Returns the audio streams that can be selected by the user. The | | * Returns the audio streams that can be selected by the user. The | |
| * strings can directly be used in the user interface. | | * strings can directly be used in the user interface. | |
| * | | * | |
| * \see selectedAudioChannel | | * \see selectedAudioChannel | |
| * \see setCurrentAudioChannel | | * \see setCurrentAudioChannel | |
| */ | | */ | |
|
| QList<AudioChannelDescription> availableAudioChannels() const; | | QList<Phonon::AudioChannelDescription> availableAudioChannels() con
st; | |
| | | | |
| /** | | /** | |
| * Returns the subtitle streams that can be selected by the user. T
he | | * Returns the subtitle streams that can be selected by the user. T
he | |
| * strings can directly be used in the user interface. | | * strings can directly be used in the user interface. | |
| * | | * | |
| * \see selectedSubtitle | | * \see selectedSubtitle | |
| * \see setCurrentSubtitle | | * \see setCurrentSubtitle | |
| */ | | */ | |
| QList<SubtitleDescription> availableSubtitles() const; | | QList<SubtitleDescription> availableSubtitles() const; | |
| | | | |
| | | | |
| skipping to change at line 124 | | skipping to change at line 190 | |
| * the same file. Normally only one should be played back. | | * the same file. Normally only one should be played back. | |
| * | | * | |
| * \param stream Description of an audio stream | | * \param stream Description of an audio stream | |
| * | | * | |
| * \see availableAudioChannels() | | * \see availableAudioChannels() | |
| * \see currentAudioChannel() | | * \see currentAudioChannel() | |
| */ | | */ | |
| void setCurrentAudioChannel(const Phonon::AudioChannelDescription &
stream); | | void setCurrentAudioChannel(const Phonon::AudioChannelDescription &
stream); | |
| | | | |
| /** | | /** | |
|
| | | * Switches to a menu (e.g. on a DVD). | |
| | | * | |
| | | * \see availableMenus() | |
| | | */ | |
| | | void setCurrentMenu(NavigationMenu menu); | |
| | | | |
| | | /** | |
| * Selects a subtitle stream from the media. | | * Selects a subtitle stream from the media. | |
| * | | * | |
| * Some media formats allow multiple subtitle streams to be stored
in | | * Some media formats allow multiple subtitle streams to be stored
in | |
| * the same file. Normally only one should be displayed. | | * the same file. Normally only one should be displayed. | |
| * | | * | |
| * \param stream description of a subtitle stream | | * \param stream description of a subtitle stream | |
| * | | * | |
| * \see availableSubtitles() | | * \see availableSubtitles() | |
| * \see currentSubtitle() | | * \see currentSubtitle() | |
| */ | | */ | |
| | | | |
| skipping to change at line 166 | | skipping to change at line 239 | |
| | | | |
| /** | | /** | |
| * Skips to the previous title. | | * Skips to the previous title. | |
| * | | * | |
| * If it was playing before the title change it will start playback
on the previous title if | | * If it was playing before the title change it will start playback
on the previous title if | |
| * autoplayTitles is enabled. | | * autoplayTitles is enabled. | |
| */ | | */ | |
| void previousTitle(); | | void previousTitle(); | |
| | | | |
| Q_SIGNALS: | | Q_SIGNALS: | |
|
| void availableSubtitlesChanged(); | | | |
| void availableAudioChannelsChanged(); | | | |
| void availableAnglesChanged(int availableAngles); | | void availableAnglesChanged(int availableAngles); | |
|
| void angleChanged(int angleNumber); | | void availableAudioChannelsChanged(); | |
| void availableChaptersChanged(int availableChapters); | | void availableChaptersChanged(int availableChapters); | |
|
| void chapterChanged(int chapterNumber); | | | |
| | | /** | |
| | | * The available menus changed, this for example emitted when Phono | |
| | | n switches | |
| | | * from a media source without menus to one with menus (e.g. a DVD) | |
| | | . | |
| | | * | |
| | | * \param menus is a list of all currently available menus, you sho | |
| | | uld update | |
| | | * GUI representations of the available menus with the new set. | |
| | | * | |
| | | * \see availableMenus() | |
| | | * \see navigationMenuToString() | |
| | | */ | |
| | | void availableMenusChanged(QList<NavigationMenu> menus); | |
| | | void availableSubtitlesChanged(); | |
| void availableTitlesChanged(int availableTitles); | | void availableTitlesChanged(int availableTitles); | |
|
| | | | |
| | | void angleChanged(int angleNumber); | |
| | | void chapterChanged(int chapterNumber); | |
| void titleChanged(int titleNumber); | | void titleChanged(int titleNumber); | |
| | | | |
| protected: | | protected: | |
| MediaControllerPrivate *const d; | | MediaControllerPrivate *const d; | |
| }; | | }; | |
| | | | |
| } // namespace Phonon | | } // namespace Phonon | |
| | | | |
| Q_DECLARE_OPERATORS_FOR_FLAGS(Phonon::MediaController::Features) | | Q_DECLARE_OPERATORS_FOR_FLAGS(Phonon::MediaController::Features) | |
| | | | |
|
| | | Q_DECLARE_METATYPE(Phonon::MediaController::NavigationMenu) | |
| | | Q_DECLARE_METATYPE(QList<Phonon::MediaController::NavigationMenu>) | |
| | | | |
| #endif //QT_NO_PHONON_MEDIACONTROLLER | | #endif //QT_NO_PHONON_MEDIACONTROLLER | |
| | | | |
| QT_END_NAMESPACE | | QT_END_NAMESPACE | |
| QT_END_HEADER | | QT_END_HEADER | |
| | | | |
| #endif // PHONON_MEDIACONTROLLER_H | | #endif // PHONON_MEDIACONTROLLER_H | |
| | | | |
End of changes. 14 change blocks. |
| 6 lines changed or deleted | | 120 lines changed or added | |
|
| mediaobject.h | | mediaobject.h | |
| | | | |
| skipping to change at line 80 | | skipping to change at line 80 | |
| * media->setCurrentSource(":/sounds/startsound.ogg"); | | * media->setCurrentSource(":/sounds/startsound.ogg"); | |
| * connect(media, SIGNAL(aboutToFinish()), SLOT(enqueueNextSource()))
; | | * connect(media, SIGNAL(aboutToFinish()), SLOT(enqueueNextSource()))
; | |
| * } | | * } | |
| * | | * | |
| * void enqueueNextSource() | | * void enqueueNextSource() | |
| * { | | * { | |
| * media->enqueue("/home/username/music/song.mp3"); | | * media->enqueue("/home/username/music/song.mp3"); | |
| * } | | * } | |
| * \endcode | | * \endcode | |
| * | | * | |
|
| | | * Some platforms support system-wide tracking of a user's activities. | |
| | | For | |
| | | * instance, the zeitgeist project (http://zeitgeist-project.com) on Li | |
| | | nux. | |
| | | * | |
| | | * This integration is opt-in only and can be enabled by setting the | |
| | | * PlaybackTracking property to true: | |
| | | * \code | |
| | | * media->setProperty("PlaybackTracking", true); | |
| | | * \endcode | |
| | | * | |
| | | * This kind of information is normally used to provide a universal his | |
| | | tory | |
| | | * view to the user, such as what songs were played when, regardless of | |
| | | the | |
| | | * media player. This is in addition to any emails read, IM conversatio | |
| | | ns, | |
| | | * websites viewed, etc. | |
| | | * | |
| * \ingroup Playback | | * \ingroup Playback | |
| * \ingroup Recording | | * \ingroup Recording | |
| * \author Matthias Kretz <kretz@kde.org> | | * \author Matthias Kretz <kretz@kde.org> | |
| */ | | */ | |
| class PHONON_EXPORT MediaObject : public QObject, public MediaNode | | class PHONON_EXPORT MediaObject : public QObject, public MediaNode | |
| { | | { | |
| friend class FrontendInterfacePrivate; | | friend class FrontendInterfacePrivate; | |
| Q_OBJECT | | Q_OBJECT | |
|
| K_DECLARE_PRIVATE(MediaObject) | | P_DECLARE_PRIVATE(MediaObject) | |
| PHONON_OBJECT(MediaObject) | | PHONON_OBJECT(MediaObject) | |
| /** | | /** | |
| * \brief Defines the time between media sources. | | * \brief Defines the time between media sources. | |
| * | | * | |
| * A positive transition time defines a gap of silence between queu
ed | | * A positive transition time defines a gap of silence between queu
ed | |
| * media sources. | | * media sources. | |
| * | | * | |
| * A transition time of 0 ms requests gapless playback (sample prec
ise | | * A transition time of 0 ms requests gapless playback (sample prec
ise | |
| * queueing of the next source). | | * queueing of the next source). | |
| * | | * | |
| | | | |
| skipping to change at line 610 | | skipping to change at line 624 | |
| | | | |
| private: | | private: | |
| Q_PRIVATE_SLOT(k_func(), void _k_resumePlay()) | | Q_PRIVATE_SLOT(k_func(), void _k_resumePlay()) | |
| Q_PRIVATE_SLOT(k_func(), void _k_resumePause()) | | Q_PRIVATE_SLOT(k_func(), void _k_resumePause()) | |
| Q_PRIVATE_SLOT(k_func(), void _k_metaDataChanged(const QMultiMa
p<QString, QString> &)) | | Q_PRIVATE_SLOT(k_func(), void _k_metaDataChanged(const QMultiMa
p<QString, QString> &)) | |
| #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM | | #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM | |
| Q_PRIVATE_SLOT(k_func(), void _k_stateChanged(Phonon::State, Ph
onon::State)) | | Q_PRIVATE_SLOT(k_func(), void _k_stateChanged(Phonon::State, Ph
onon::State)) | |
| #endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM | | #endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM | |
| Q_PRIVATE_SLOT(k_func(), void _k_aboutToFinish()) | | Q_PRIVATE_SLOT(k_func(), void _k_aboutToFinish()) | |
| Q_PRIVATE_SLOT(k_func(), void _k_currentSourceChanged(const Med
iaSource &)) | | Q_PRIVATE_SLOT(k_func(), void _k_currentSourceChanged(const Med
iaSource &)) | |
|
| | | Q_PRIVATE_SLOT(k_func(), void _k_stateChanged(Phonon::State, Ph
onon::State)) | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Convenience function to create a MediaObject and AudioOutput connect
ed by | | * Convenience function to create a MediaObject and AudioOutput connect
ed by | |
| * a path. | | * a path. | |
| */ | | */ | |
| PHONON_EXPORT MediaObject *createPlayer(Phonon::Category category, cons
t MediaSource &source = MediaSource()); | | PHONON_EXPORT MediaObject *createPlayer(Phonon::Category category, cons
t MediaSource &source = MediaSource()); | |
| } //namespace Phonon | | } //namespace Phonon | |
| | | | |
| QT_END_NAMESPACE | | QT_END_NAMESPACE | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 21 lines changed or added | |
|
| objectdescription.h | | objectdescription.h | |
| /* This file is part of the KDE project | | /* This file is part of the KDE project | |
|
| Copyright (C) 2008 Matthias Kretz <kretz@kde.org> | | Copyright © 2008 Matthias Kretz <kretz@kde.org> | |
| | | Copyright © 2010 Harald Sitter <apachelogger@ubuntu.com> | |
| | | | |
| This library is free software; you can redistribute it and/or | | This library is free software; you can redistribute it and/or | |
| modify it under the terms of the GNU Lesser General Public | | modify it under the terms of the GNU Lesser General Public | |
| License as published by the Free Software Foundation; either | | License as published by the Free Software Foundation; either | |
| version 2.1 of the License, or (at your option) version 3, or any | | version 2.1 of the License, or (at your option) version 3, or any | |
| later version accepted by the membership of KDE e.V. (or its | | later version accepted by the membership of KDE e.V. (or its | |
| successor approved by the membership of KDE e.V.), Nokia Corporation | | successor approved by the membership of KDE e.V.), Nokia Corporation | |
| (or its successors, if any) and the KDE Free Qt Foundation, which shall | | (or its successors, if any) and the KDE Free Qt Foundation, which shall | |
| act as a proxy defined in Section 6 of version 3 of the license. | | act as a proxy defined in Section 6 of version 3 of the license. | |
| | | | |
| | | | |
| skipping to change at line 32 | | skipping to change at line 33 | |
| #ifndef PHONON_EXPERIMENTAL_OBJECTDESCRIPTION_H | | #ifndef PHONON_EXPERIMENTAL_OBJECTDESCRIPTION_H | |
| #define PHONON_EXPERIMENTAL_OBJECTDESCRIPTION_H | | #define PHONON_EXPERIMENTAL_OBJECTDESCRIPTION_H | |
| | | | |
| #include "../objectdescription.h" | | #include "../objectdescription.h" | |
| | | | |
| namespace Phonon | | namespace Phonon | |
| { | | { | |
| namespace Experimental | | namespace Experimental | |
| { | | { | |
| | | | |
|
| | | #ifndef PHONON_NO_VIDEOCAPTURE | |
| | | | |
| enum ObjectDescriptionType | | enum ObjectDescriptionType | |
| { | | { | |
| VideoCaptureDeviceType = 0x10000 | | VideoCaptureDeviceType = 0x10000 | |
| }; | | }; | |
| | | | |
| typedef Phonon::ObjectDescription<static_cast<Phonon::ObjectDescriptionType
>(Phonon::Experimental::VideoCaptureDeviceType)> VideoCaptureDevice; | | typedef Phonon::ObjectDescription<static_cast<Phonon::ObjectDescriptionType
>(Phonon::Experimental::VideoCaptureDeviceType)> VideoCaptureDevice; | |
| | | | |
|
| | | VideoCaptureDevice phononVcdToExperimentalVcd(const Phonon::VideoCaptureDev | |
| | | ice &vcd); | |
| | | | |
| | | /** | |
| | | * Generates a Phonon::VideoCaptureDevice from an equal object of | |
| | | * the Phonon::Experimental namespace. | |
| | | * | |
| | | * @arg vcd the VideoCaptureDevice to take as reference | |
| | | * @return a Phonon::VideoCaptureDevice instance with the same properties a | |
| | | s the incoming vcd | |
| | | */ | |
| | | Phonon::VideoCaptureDevice phononExperimentalVcdToVcd(const Phonon::Experim | |
| | | ental::VideoCaptureDevice &vcd); | |
| | | | |
| | | #endif // PHONON_NO_VIDEOCAPTURE | |
| | | | |
| } // namespace Experimental | | } // namespace Experimental | |
| } // namespace Phonon | | } // namespace Phonon | |
| | | | |
| #endif // PHONON_EXPERIMENTAL_OBJECTDESCRIPTION_H | | #endif // PHONON_EXPERIMENTAL_OBJECTDESCRIPTION_H | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 20 lines changed or added | |
|
| objectdescriptionmodel.h | | objectdescriptionmodel.h | |
| | | | |
| skipping to change at line 144 | | skipping to change at line 144 | |
| | | | |
| ObjectDescriptionModelData(QAbstractListModel *); | | ObjectDescriptionModelData(QAbstractListModel *); | |
| protected: | | protected: | |
| ~ObjectDescriptionModelData(); | | ~ObjectDescriptionModelData(); | |
| //ObjectDescriptionModelData(ObjectDescriptionModelDataPrivate
*dd); | | //ObjectDescriptionModelData(ObjectDescriptionModelDataPrivate
*dd); | |
| ObjectDescriptionModelDataPrivate *const d; | | ObjectDescriptionModelDataPrivate *const d; | |
| }; | | }; | |
| | | | |
| /* Required to ensure template class vtables are exported on both symbian | | /* Required to ensure template class vtables are exported on both symbian | |
| and existing builds. */ | | and existing builds. */ | |
|
| #if defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT) | | #if defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT) || defined(Q_CC_CLANG) | |
| // RVCT compiler (2.2.686) requires the export declaration to be on the cla
ss to export vtables | | // RVCT compiler (2.2.686) requires the export declaration to be on the cla
ss to export vtables | |
| // MWC compiler works both ways | | // MWC compiler works both ways | |
| // GCCE compiler is unknown (it can't compile QtCore yet) | | // GCCE compiler is unknown (it can't compile QtCore yet) | |
|
| | | // Clang also requires the export declaration to be on the class to export
vtables | |
| #define PHONON_TEMPLATE_CLASS_EXPORT PHONON_EXPORT | | #define PHONON_TEMPLATE_CLASS_EXPORT PHONON_EXPORT | |
| #define PHONON_TEMPLATE_CLASS_MEMBER_EXPORT | | #define PHONON_TEMPLATE_CLASS_MEMBER_EXPORT | |
| #else | | #else | |
| // Windows builds (at least) do not support export declaration on templated
class | | // Windows builds (at least) do not support export declaration on templated
class | |
| // But if you export a member function, the vtable is implicitly exported | | // But if you export a member function, the vtable is implicitly exported | |
| #define PHONON_TEMPLATE_CLASS_EXPORT | | #define PHONON_TEMPLATE_CLASS_EXPORT | |
| #define PHONON_TEMPLATE_CLASS_MEMBER_EXPORT PHONON_EXPORT | | #define PHONON_TEMPLATE_CLASS_MEMBER_EXPORT PHONON_EXPORT | |
| #endif | | #endif | |
| | | | |
| /** \class ObjectDescriptionModel objectdescriptionmodel.h Phonon/Objec
tDescriptionModel | | /** \class ObjectDescriptionModel objectdescriptionmodel.h Phonon/Objec
tDescriptionModel | |
| | | | |
| skipping to change at line 368 | | skipping to change at line 369 | |
| * it only supports one type used internally. | | * it only supports one type used internally. | |
| */ | | */ | |
| inline QStringList mimeTypes() const { return d->mimeTypes(type
); } //krazy:exclude=inline | | inline QStringList mimeTypes() const { return d->mimeTypes(type
); } //krazy:exclude=inline | |
| | | | |
| protected: | | protected: | |
| ObjectDescriptionModelData *const d; | | ObjectDescriptionModelData *const d; | |
| }; | | }; | |
| | | | |
| typedef ObjectDescriptionModel<AudioOutputDeviceType> AudioOutputDevice
Model; | | typedef ObjectDescriptionModel<AudioOutputDeviceType> AudioOutputDevice
Model; | |
| typedef ObjectDescriptionModel<AudioCaptureDeviceType> AudioCaptureDevi
ceModel; | | typedef ObjectDescriptionModel<AudioCaptureDeviceType> AudioCaptureDevi
ceModel; | |
|
| | | typedef ObjectDescriptionModel<VideoCaptureDeviceType> VideoCaptureDevi
ceModel; | |
| typedef ObjectDescriptionModel<EffectType> EffectDescriptionModel; | | typedef ObjectDescriptionModel<EffectType> EffectDescriptionModel; | |
| typedef ObjectDescriptionModel<AudioChannelType> AudioChannelDescriptio
nModel; | | typedef ObjectDescriptionModel<AudioChannelType> AudioChannelDescriptio
nModel; | |
| typedef ObjectDescriptionModel<SubtitleType> SubtitleDescriptionModel; | | typedef ObjectDescriptionModel<SubtitleType> SubtitleDescriptionModel; | |
| /* | | /* | |
| typedef ObjectDescriptionModel<VideoOutputDeviceType> VideoOutputDevice
Model; | | typedef ObjectDescriptionModel<VideoOutputDeviceType> VideoOutputDevice
Model; | |
|
| typedef ObjectDescriptionModel<VideoCaptureDeviceType> VideoCaptureDevi
ceModel; | | | |
| typedef ObjectDescriptionModel<AudioCodecType> AudioCodecDescriptionMod
el; | | typedef ObjectDescriptionModel<AudioCodecType> AudioCodecDescriptionMod
el; | |
| typedef ObjectDescriptionModel<VideoCodecType> VideoCodecDescriptionMod
el; | | typedef ObjectDescriptionModel<VideoCodecType> VideoCodecDescriptionMod
el; | |
| typedef ObjectDescriptionModel<ContainerFormatType> ContainerFormatDesc
riptionModel; | | typedef ObjectDescriptionModel<ContainerFormatType> ContainerFormatDesc
riptionModel; | |
| typedef ObjectDescriptionModel<VisualizationType> VisualizationDescript
ionModel;*/ | | typedef ObjectDescriptionModel<VisualizationType> VisualizationDescript
ionModel;*/ | |
| | | | |
| } | | } | |
| | | | |
| #endif //QT_NO_PHONON_OBJECTDESCRIPTIONMODEL | | #endif //QT_NO_PHONON_OBJECTDESCRIPTIONMODEL | |
| | | | |
| QT_END_NAMESPACE | | QT_END_NAMESPACE | |
| | | | |
End of changes. 4 change blocks. |
| 2 lines changed or deleted | | 3 lines changed or added | |
|
| phonon_export.h | | phonon_export.h | |
|
| /* This file is part of the KDE project | | /* | |
| Copyright (C) 2007 Matthias Kretz <kretz@kde.org> | | Copyright (C) 2007 Matthias Kretz <kretz@kde.org> | |
|
| | | Copyright (C) 2011 Harald Sitter <sitter@kde.org> | |
| | | | |
| This library is free software; you can redistribute it and/or | | This library is free software; you can redistribute it and/or | |
| modify it under the terms of the GNU Lesser General Public | | modify it under the terms of the GNU Lesser General Public | |
| License as published by the Free Software Foundation; either | | License as published by the Free Software Foundation; either | |
| version 2.1 of the License, or (at your option) version 3, or any | | version 2.1 of the License, or (at your option) version 3, or any | |
| later version accepted by the membership of KDE e.V. (or its | | later version accepted by the membership of KDE e.V. (or its | |
| successor approved by the membership of KDE e.V.), Nokia Corporation | | successor approved by the membership of KDE e.V.), Nokia Corporation | |
| (or its successors, if any) and the KDE Free Qt Foundation, which shall | | (or its successors, if any) and the KDE Free Qt Foundation, which shall | |
| act as a proxy defined in Section 6 of version 3 of the license. | | act as a proxy defined in Section 6 of version 3 of the license. | |
| | | | |
| | | | |
| skipping to change at line 43 | | skipping to change at line 44 | |
| # endif | | # endif | |
| # else /* UNIX */ | | # else /* UNIX */ | |
| # ifdef MAKE_PHONON_LIB /* We are building this library */ | | # ifdef MAKE_PHONON_LIB /* We are building this library */ | |
| # define PHONON_EXPORT Q_DECL_EXPORT | | # define PHONON_EXPORT Q_DECL_EXPORT | |
| # else /* We are using this library */ | | # else /* We are using this library */ | |
| # define PHONON_EXPORT Q_DECL_IMPORT | | # define PHONON_EXPORT Q_DECL_IMPORT | |
| # endif | | # endif | |
| # endif | | # endif | |
| #endif | | #endif | |
| | | | |
|
| | | #ifndef PHONON_DEPRECATED | |
| | | # define PHONON_DEPRECATED Q_DECL_DEPRECATED | |
| | | #endif | |
| | | | |
| #ifndef PHONON_EXPORT_DEPRECATED | | #ifndef PHONON_EXPORT_DEPRECATED | |
| # define PHONON_EXPORT_DEPRECATED Q_DECL_DEPRECATED PHONON_EXPORT | | # define PHONON_EXPORT_DEPRECATED Q_DECL_DEPRECATED PHONON_EXPORT | |
| #endif | | #endif | |
| | | | |
| // QT_(BEGIN|END)_NAMESPACE appeared in 4.4 | | // QT_(BEGIN|END)_NAMESPACE appeared in 4.4 | |
| #ifndef QT_BEGIN_NAMESPACE | | #ifndef QT_BEGIN_NAMESPACE | |
| # define QT_BEGIN_NAMESPACE | | # define QT_BEGIN_NAMESPACE | |
| #endif | | #endif | |
| #ifndef QT_END_NAMESPACE | | #ifndef QT_END_NAMESPACE | |
| # define QT_END_NAMESPACE | | # define QT_END_NAMESPACE | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 6 lines changed or added | |
|
| platformplugin.h | | platformplugin.h | |
| | | | |
| skipping to change at line 106 | | skipping to change at line 106 | |
| /** | | /** | |
| * Loads the volume for the given output. | | * Loads the volume for the given output. | |
| */ | | */ | |
| virtual qreal loadVolume(const QString &outputName) const = 0; | | virtual qreal loadVolume(const QString &outputName) const = 0; | |
| | | | |
| virtual QList<int> objectDescriptionIndexes(ObjectDescriptionType t
ype) const = 0; | | virtual QList<int> objectDescriptionIndexes(ObjectDescriptionType t
ype) const = 0; | |
| virtual QHash<QByteArray, QVariant> objectDescriptionProperties(Obj
ectDescriptionType type, int index) const = 0; | | virtual QHash<QByteArray, QVariant> objectDescriptionProperties(Obj
ectDescriptionType type, int index) const = 0; | |
| | | | |
| /** | | /** | |
| * Returns a list of (driver, handle) pairs for the given AudioOutp
utDevice description. | | * Returns a list of (driver, handle) pairs for the given AudioOutp
utDevice description. | |
|
| | | * Implementation is optional. | |
| */ | | */ | |
|
| virtual QList<QPair<QByteArray, QString> > deviceAccessListFor(cons | | virtual DeviceAccessList deviceAccessListFor(const AudioOutputDevic | |
| t Phonon::AudioOutputDevice &) const { return QList<QPair<QByteArray, QStri | | e &) const { return DeviceAccessList(); } | |
| ng> >(); } | | | |
| | | #ifndef PHONON_NO_AUDIOCAPTURE | |
| | | /** | |
| | | * Returns a list of (driver, handle) pairs for the given AudioCapt | |
| | | ureDevice description. | |
| | | * Implementation is optional. | |
| | | */ | |
| | | virtual DeviceAccessList deviceAccessListFor(const AudioCaptureDevi | |
| | | ce &) const { return DeviceAccessList(); } | |
| | | #endif // PHONON_NO_AUDIOCAPTURE | |
| | | | |
| | | #ifndef PHONON_NO_VIDEOCAPTURE | |
| | | /** | |
| | | * Returns a list of (driver, handle) pairs for the given VideoCapt | |
| | | ureDevice description. | |
| | | * Implementation is optional. | |
| | | */ | |
| | | virtual DeviceAccessList deviceAccessListFor(const VideoCaptureDevi | |
| | | ce &) const { return DeviceAccessList(); } | |
| | | #endif // PHONON_NO_VIDEOCAPTURE | |
| }; | | }; | |
| } // namespace Phonon | | } // namespace Phonon | |
| | | | |
| Q_DECLARE_INTERFACE(Phonon::PlatformPlugin, "3PlatformPlugin.phonon.kde.org
") | | Q_DECLARE_INTERFACE(Phonon::PlatformPlugin, "3PlatformPlugin.phonon.kde.org
") | |
| | | | |
| #endif //QT_NO_PHONON_PLATFORMPLUGIN | | #endif //QT_NO_PHONON_PLATFORMPLUGIN | |
| | | | |
| QT_END_NAMESPACE | | QT_END_NAMESPACE | |
| QT_END_HEADER | | QT_END_HEADER | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 3 lines changed or deleted | | 23 lines changed or added | |
|
| pulsesupport.h | | pulsesupport.h | |
| | | | |
| skipping to change at line 52 | | skipping to change at line 52 | |
| public: | | public: | |
| static PulseSupport* getInstance(); | | static PulseSupport* getInstance(); | |
| static void shutdown(); | | static void shutdown(); | |
| | | | |
| bool isActive(); | | bool isActive(); | |
| void enable(bool enabled = true); | | void enable(bool enabled = true); | |
| | | | |
| QList<int> objectDescriptionIndexes(ObjectDescriptionType type)
const; | | QList<int> objectDescriptionIndexes(ObjectDescriptionType type)
const; | |
| QHash<QByteArray, QVariant> objectDescriptionProperties(ObjectD
escriptionType type, int index) const; | | QHash<QByteArray, QVariant> objectDescriptionProperties(ObjectD
escriptionType type, int index) const; | |
| QList<int> objectIndexesByCategory(ObjectDescriptionType type,
Category category) const; | | QList<int> objectIndexesByCategory(ObjectDescriptionType type,
Category category) const; | |
|
| | | QList<int> objectIndexesByCategory(ObjectDescriptionType type,
CaptureCategory category) const; | |
| | | | |
| void setOutputDevicePriorityForCategory(Category category, QLis
t<int> order); | | void setOutputDevicePriorityForCategory(Category category, QLis
t<int> order); | |
|
| void setCaptureDevicePriorityForCategory(Category category, QLi | | void setCaptureDevicePriorityForCategory(CaptureCategory catego | |
| st<int> order); | | ry, QList<int> order); | |
| | | | |
| | | PHONON_DEPRECATED void setCaptureDevicePriorityForCategory(Cate | |
| | | gory category, QList<int> order); | |
| | | | |
| PulseStream *registerOutputStream(QString streamUuid, Category
category); | | PulseStream *registerOutputStream(QString streamUuid, Category
category); | |
|
| PulseStream *registerCaptureStream(QString streamUuid, Category | | PulseStream *registerCaptureStream(QString streamUuid, CaptureC | |
| category); | | ategory category); | |
| | | | |
| | | PHONON_DEPRECATED PulseStream *registerCaptureStream(QString st | |
| | | reamUuid, Category category); | |
| | | | |
| void emitObjectDescriptionChanged(ObjectDescriptionType); | | void emitObjectDescriptionChanged(ObjectDescriptionType); | |
| | | | |
| bool setOutputName(QString streamUuid, QString name); | | bool setOutputName(QString streamUuid, QString name); | |
| bool setOutputDevice(QString streamUuid, int device); | | bool setOutputDevice(QString streamUuid, int device); | |
| bool setOutputVolume(QString streamUuid, qreal volume); | | bool setOutputVolume(QString streamUuid, qreal volume); | |
| bool setOutputMute(QString streamUuid, bool mute); | | bool setOutputMute(QString streamUuid, bool mute); | |
| bool setCaptureDevice(QString streamUuid, int device); | | bool setCaptureDevice(QString streamUuid, int device); | |
| // NB Capture Volume/Mute not set until PA supports per-source-
output volumes/mutes | | // NB Capture Volume/Mute not set until PA supports per-source-
output volumes/mutes | |
| // or phonon supports capture properly... which ever comes f
irst. | | // or phonon supports capture properly... which ever comes f
irst. | |
| void clearStreamCache(QString streamUuid); | | void clearStreamCache(QString streamUuid); | |
| | | | |
| static void debug(); | | static void debug(); | |
|
| public slots: | | public Q_SLOTS: | |
| void connectToDaemon(); | | void connectToDaemon(); | |
| | | | |
|
| signals: | | Q_SIGNALS: | |
| void objectDescriptionChanged(ObjectDescriptionType); | | void objectDescriptionChanged(ObjectDescriptionType); | |
| | | | |
| private: | | private: | |
| PulseSupport(); | | PulseSupport(); | |
| ~PulseSupport(); | | ~PulseSupport(); | |
| | | | |
| bool mEnabled; | | bool mEnabled; | |
| }; | | }; | |
| } // namespace Phonon | | } // namespace Phonon | |
| | | | |
| | | | |
End of changes. 5 change blocks. |
| 6 lines changed or deleted | | 14 lines changed or added | |
|
| streaminterface.h | | streaminterface.h | |
|
| /* This file is part of the KDE project | | /* | |
| Copyright (C) 2007 Matthias Kretz <kretz@kde.org> | | Copyright (C) 2007 Matthias Kretz <kretz@kde.org> | |
|
| | | Copyright (C) 2011 Harald Sitter <sitter@kde.org> | |
| | | | |
| This library is free software; you can redistribute it and/or | | This library is free software; you can redistribute it and/or | |
| modify it under the terms of the GNU Lesser General Public | | modify it under the terms of the GNU Lesser General Public | |
| License as published by the Free Software Foundation; either | | License as published by the Free Software Foundation; either | |
| version 2.1 of the License, or (at your option) version 3, or any | | version 2.1 of the License, or (at your option) version 3, or any | |
| later version accepted by the membership of KDE e.V. (or its | | later version accepted by the membership of KDE e.V. (or its | |
| successor approved by the membership of KDE e.V.), Nokia Corporation | | successor approved by the membership of KDE e.V.), Nokia Corporation | |
| (or its successors, if any) and the KDE Free Qt Foundation, which shall | | (or its successors, if any) and the KDE Free Qt Foundation, which shall | |
| act as a proxy defined in Section 6 of version 3 of the license. | | act as a proxy defined in Section 6 of version 3 of the license. | |
| | | | |
| | | | |
| skipping to change at line 42 | | skipping to change at line 42 | |
| #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM | | #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM | |
| | | | |
| namespace Phonon | | namespace Phonon | |
| { | | { | |
| class StreamInterfacePrivate; | | class StreamInterfacePrivate; | |
| class MediaSource; | | class MediaSource; | |
| | | | |
| /** \class StreamInterface streaminterface.h phonon/StreamInterface | | /** \class StreamInterface streaminterface.h phonon/StreamInterface | |
| * \brief Backend interface to handle media streams (AbstractMediaStream). | | * \brief Backend interface to handle media streams (AbstractMediaStream). | |
| * | | * | |
|
| | | * All functions relay their calls to the AbstractMediaStream using invokeM | |
| | | ethod on the | |
| | | * AbstractMediaStream's QMetaObject. This means that every function call w | |
| | | ill | |
| | | * actually be executed in the thread context of the AbstractMediaStream (w | |
| | | hich | |
| | | * usually is a thread Phonon also lives in, could however also be another | |
| | | one). | |
| | | * This protectes the AbstractMediaStream against calls from different thre | |
| | | ads, | |
| | | * such as a callback thread. | |
| | | * This is very important as most IO implementations are by default not | |
| | | * thread-safe. | |
| | | * | |
| | | * This protection is only established in one direction though, meaning tha | |
| | | t a | |
| | | * backend implementation of this interface must be made thread-safe at all | |
| | | costs | |
| | | * as it can get called from any thread. | |
| | | * | |
| * \author Matthias Kretz <kretz@kde.org> | | * \author Matthias Kretz <kretz@kde.org> | |
| */ | | */ | |
| class PHONON_EXPORT StreamInterface | | class PHONON_EXPORT StreamInterface | |
| { | | { | |
| friend class StreamInterfacePrivate; | | friend class StreamInterfacePrivate; | |
| friend class AbstractMediaStreamPrivate; | | friend class AbstractMediaStreamPrivate; | |
| public: | | public: | |
| virtual ~StreamInterface(); | | virtual ~StreamInterface(); | |
|
| | | | |
| /** | | /** | |
| * Called by the application to send a chunk of (encoded) media dat
a. | | * Called by the application to send a chunk of (encoded) media dat
a. | |
| * | | * | |
| * It is recommended to keep the QByteArray object until the data i
s consumed so that no | | * It is recommended to keep the QByteArray object until the data i
s consumed so that no | |
| * memcopy is needed. | | * memcopy is needed. | |
| */ | | */ | |
| virtual void writeData(const QByteArray &data) = 0; | | virtual void writeData(const QByteArray &data) = 0; | |
|
| | | | |
| /** | | /** | |
| * Called when no more media data is available and writeData will n
ot be called anymore. | | * Called when no more media data is available and writeData will n
ot be called anymore. | |
| */ | | */ | |
| virtual void endOfData() = 0; | | virtual void endOfData() = 0; | |
|
| | | | |
| /** | | /** | |
| * Called at the start of the stream to tell how many bytes will be
sent through writeData | | * Called at the start of the stream to tell how many bytes will be
sent through writeData | |
| * (if no seeks happen, of course). If this value is negative the s
tream size cannot be | | * (if no seeks happen, of course). If this value is negative the s
tream size cannot be | |
| * determined (might be a "theoretically infinite" stream - like we
bradio). | | * determined (might be a "theoretically infinite" stream - like we
bradio). | |
| */ | | */ | |
| virtual void setStreamSize(qint64 newSize) = 0; | | virtual void setStreamSize(qint64 newSize) = 0; | |
|
| | | | |
| /** | | /** | |
| * Tells whether the stream is seekable. | | * Tells whether the stream is seekable. | |
| */ | | */ | |
| virtual void setStreamSeekable(bool s) = 0; | | virtual void setStreamSeekable(bool s) = 0; | |
| | | | |
| /** | | /** | |
| * Call this function from the constructor of your StreamInterface
implementation (or as | | * Call this function from the constructor of your StreamInterface
implementation (or as | |
| * soon as you get the MediaSource object). This will connect your
object to the | | * soon as you get the MediaSource object). This will connect your
object to the | |
| * AbstractMediaStream object. Only after the connection is done wi
ll the following | | * AbstractMediaStream object. Only after the connection is done wi
ll the following | |
| * functions have an effect. | | * functions have an effect. | |
| | | | |
| skipping to change at line 82 | | skipping to change at line 99 | |
| /** | | /** | |
| * Call this function from the constructor of your StreamInterface
implementation (or as | | * Call this function from the constructor of your StreamInterface
implementation (or as | |
| * soon as you get the MediaSource object). This will connect your
object to the | | * soon as you get the MediaSource object). This will connect your
object to the | |
| * AbstractMediaStream object. Only after the connection is done wi
ll the following | | * AbstractMediaStream object. Only after the connection is done wi
ll the following | |
| * functions have an effect. | | * functions have an effect. | |
| */ | | */ | |
| void connectToSource(const MediaSource &mediaSource); | | void connectToSource(const MediaSource &mediaSource); | |
| | | | |
| /** | | /** | |
| * Call this function to tell the AbstractMediaStream that you need
more data. The data will | | * Call this function to tell the AbstractMediaStream that you need
more data. The data will | |
|
| * arrive through writeData. Don't rely on writeData getting called | | * arrive through writeData. | |
| from needData, though | | * writeData() will not be called from needData() due to the thread | |
| * some AbstractMediaStream implementations might do so. | | protection of | |
| | | * the AbstractMediaStream. | |
| * | | * | |
| * Depending on the buffering you need you either treat needData as
a replacement for a | | * Depending on the buffering you need you either treat needData as
a replacement for a | |
| * read call like QIODevice::read, or you start calling needData wh
enever your buffer | | * read call like QIODevice::read, or you start calling needData wh
enever your buffer | |
| * reaches a certain lower threshold. | | * reaches a certain lower threshold. | |
| */ | | */ | |
| void needData(); | | void needData(); | |
| | | | |
| /** | | /** | |
| * Call this function to tell the AbstractMediaStream that you have
enough data in your | | * Call this function to tell the AbstractMediaStream that you have
enough data in your | |
| * buffer and that it should pause calling writeData if possible. | | * buffer and that it should pause calling writeData if possible. | |
| | | | |
End of changes. 8 change blocks. |
| 4 lines changed or deleted | | 30 lines changed or added | |
|
| videoframe2.h | | videoframe2.h | |
| | | | |
| skipping to change at line 43 | | skipping to change at line 43 | |
| namespace Experimental | | namespace Experimental | |
| { | | { | |
| /** | | /** | |
| * \brief A single video frame. | | * \brief A single video frame. | |
| * | | * | |
| * This simple class contains the data of a frame and metadata describi
ng | | * This simple class contains the data of a frame and metadata describi
ng | |
| * how to interpret the data. | | * how to interpret the data. | |
| * | | * | |
| * \author Matthias Kretz <kretz@kde.org> | | * \author Matthias Kretz <kretz@kde.org> | |
| */ | | */ | |
|
| struct PHONONEXPERIMENTAL_EXPORT VideoFrame2 | | struct VideoFrame2 | |
| { | | { | |
| /** | | /** | |
| * Video frames come in a variety of formats. Depending on the form
at | | * Video frames come in a variety of formats. Depending on the form
at | |
| * you have to process it differently to convert it for displaying
or | | * you have to process it differently to convert it for displaying
or | |
| * encoding. | | * encoding. | |
| */ | | */ | |
| enum Format { | | enum Format { | |
| /** | | /** | |
| * The frame is invalid. | | * The frame is invalid. | |
| */ | | */ | |
| Format_Invalid = QImage::Format_Invalid, | | Format_Invalid = QImage::Format_Invalid, | |
| /** | | /** | |
| * The frame is stored in data0 using a 24-bit RGB format (8-8-
8). | | * The frame is stored in data0 using a 24-bit RGB format (8-8-
8). | |
| */ | | */ | |
| Format_RGB888 = QImage::Format_RGB888, | | Format_RGB888 = QImage::Format_RGB888, | |
|
| | | Format_RGB32 = QImage::Format_RGB32, | |
| /** | | /** | |
| * The frame is stored in data0, data1 and data2 using data0 fo
r the | | * The frame is stored in data0, data1 and data2 using data0 fo
r the | |
| * Y data, data1 for the Cb data and data2 for the Cr data. | | * Y data, data1 for the Cb data and data2 for the Cr data. | |
| * | | * | |
| * data1 and data2 contain one byte per for adjacent pixels whe
reas data0 | | * data1 and data2 contain one byte per for adjacent pixels whe
reas data0 | |
| * has one byte per pixel. | | * has one byte per pixel. | |
| */ | | */ | |
| Format_YCbCr420 = 0x10000, | | Format_YCbCr420 = 0x10000, | |
| Format_YV12 = Format_YCbCr420, | | Format_YV12 = Format_YCbCr420, | |
| /** | | /** | |
| | | | |
| skipping to change at line 157 | | skipping to change at line 158 | |
| if (format == Format_RGB888) { | | if (format == Format_RGB888) { | |
| return QImage(reinterpret_cast<const uchar *>(data0.constDa
ta()), | | return QImage(reinterpret_cast<const uchar *>(data0.constDa
ta()), | |
| width, height, QImage::Format_RGB888); | | width, height, QImage::Format_RGB888); | |
| } | | } | |
| return QImage(); | | return QImage(); | |
| } | | } | |
| }; | | }; | |
| } // namespace Experimental | | } // namespace Experimental | |
| } // namespace Phonon | | } // namespace Phonon | |
| | | | |
|
| | | Q_DECLARE_METATYPE(Phonon::Experimental::VideoFrame2) | |
| | | | |
| // vim: sw=4 ts=4 tw=80 | | // vim: sw=4 ts=4 tw=80 | |
| #endif // PHONON_EXPERIMENTAL_VIDEOFRAME2_H | | #endif // PHONON_EXPERIMENTAL_VIDEOFRAME2_H | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 4 lines changed or added | |
|