| 1 | /**************************************************************************** | 
| 2 | ** | 
| 3 | ** Copyright (C) 2016 The Qt Company Ltd. | 
| 4 | ** Contact: https://www.qt.io/licensing/ | 
| 5 | ** | 
| 6 | ** This file is part of the Qt Toolkit. | 
| 7 | ** | 
| 8 | ** $QT_BEGIN_LICENSE:LGPL$ | 
| 9 | ** Commercial License Usage | 
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in | 
| 11 | ** accordance with the commercial license agreement provided with the | 
| 12 | ** Software or, alternatively, in accordance with the terms contained in | 
| 13 | ** a written agreement between you and The Qt Company. For licensing terms | 
| 14 | ** and conditions see https://www.qt.io/terms-conditions. For further | 
| 15 | ** information use the contact form at https://www.qt.io/contact-us. | 
| 16 | ** | 
| 17 | ** GNU Lesser General Public License Usage | 
| 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | 
| 19 | ** General Public License version 3 as published by the Free Software | 
| 20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the | 
| 21 | ** packaging of this file. Please review the following information to | 
| 22 | ** ensure the GNU Lesser General Public License version 3 requirements | 
| 23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. | 
| 24 | ** | 
| 25 | ** GNU General Public License Usage | 
| 26 | ** Alternatively, this file may be used under the terms of the GNU | 
| 27 | ** General Public License version 2.0 or (at your option) the GNU General | 
| 28 | ** Public license version 3 or any later version approved by the KDE Free | 
| 29 | ** Qt Foundation. The licenses are as published by the Free Software | 
| 30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 | 
| 31 | ** included in the packaging of this file. Please review the following | 
| 32 | ** information to ensure the GNU General Public License requirements will | 
| 33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and | 
| 34 | ** https://www.gnu.org/licenses/gpl-3.0.html. | 
| 35 | ** | 
| 36 | ** $QT_END_LICENSE$ | 
| 37 | ** | 
| 38 | ****************************************************************************/ | 
| 39 |  | 
| 40 | #include "qmediastreamscontrol.h" | 
| 41 | #include "qmediacontrol_p.h" | 
| 42 |  | 
| 43 | QT_BEGIN_NAMESPACE | 
| 44 |  | 
| 45 | static void qRegisterMediaStreamControlMetaTypes() | 
| 46 | { | 
| 47 |     qRegisterMetaType<QMediaStreamsControl::StreamType>(); | 
| 48 | } | 
| 49 |  | 
| 50 | Q_CONSTRUCTOR_FUNCTION(qRegisterMediaStreamControlMetaTypes) | 
| 51 |  | 
| 52 |  | 
| 53 | /*! | 
| 54 |     \class QMediaStreamsControl | 
| 55 |     \obsolete | 
| 56 |     \inmodule QtMultimedia | 
| 57 |  | 
| 58 |  | 
| 59 |     \ingroup multimedia_control | 
| 60 |  | 
| 61 |     \brief The QMediaStreamsControl class provides a media stream selection control. | 
| 62 |  | 
| 63 |  | 
| 64 |     The QMediaStreamsControl class provides descriptions of the available media streams | 
| 65 |     and allows individual streams to be activated and deactivated. | 
| 66 |  | 
| 67 |     The interface name of QMediaStreamsControl is \c org.qt-project.qt.mediastreamscontrol/5.0 as | 
| 68 |     defined in QMediaStreamsControl_iid. | 
| 69 |  | 
| 70 |     \sa QMediaService::requestControl() | 
| 71 | */ | 
| 72 |  | 
| 73 | /*! | 
| 74 |     \macro QMediaStreamsControl_iid | 
| 75 |  | 
| 76 |     \c org.qt-project.qt.mediastreamscontrol/5.0 | 
| 77 |  | 
| 78 |     Defines the interface name of the QMediaStreamsControl class. | 
| 79 |  | 
| 80 |     \relates QMediaStreamsControl | 
| 81 | */ | 
| 82 |  | 
| 83 | /*! | 
| 84 |     Constructs a new media streams control with the given \a parent. | 
| 85 | */ | 
| 86 | QMediaStreamsControl::QMediaStreamsControl(QObject *parent) | 
| 87 |     :QMediaControl(*new QMediaControlPrivate, parent) | 
| 88 | { | 
| 89 | } | 
| 90 |  | 
| 91 | /*! | 
| 92 |     Destroys a media streams control. | 
| 93 | */ | 
| 94 | QMediaStreamsControl::~QMediaStreamsControl() | 
| 95 | { | 
| 96 | } | 
| 97 |  | 
| 98 | /*! | 
| 99 |   \enum QMediaStreamsControl::StreamType | 
| 100 |  | 
| 101 |   Media stream type. | 
| 102 |  | 
| 103 |   \value AudioStream Audio stream. | 
| 104 |   \value VideoStream Video stream. | 
| 105 |   \value SubPictureStream Subpicture or teletext stream. | 
| 106 |   \value UnknownStream The stream type is unknown. | 
| 107 |   \value DataStream | 
| 108 | */ | 
| 109 |  | 
| 110 | /*! | 
| 111 |     \fn QMediaStreamsControl::streamCount() | 
| 112 |  | 
| 113 |     Returns the number of media streams. | 
| 114 | */ | 
| 115 |  | 
| 116 | /*! | 
| 117 |     \fn QMediaStreamsControl::streamType(int streamNumber) | 
| 118 |  | 
| 119 |     Return the type of media stream \a streamNumber. | 
| 120 | */ | 
| 121 |  | 
| 122 | /*! | 
| 123 |     \fn QMediaStreamsControl::metaData(int streamNumber, const QString &key) | 
| 124 |  | 
| 125 |     Returns the meta-data value of \a key for the given \a streamNumber. | 
| 126 |  | 
| 127 |     Useful metadata keys are QMediaMetaData::Title, | 
| 128 |     QMediaMetaData::Description and QMediaMetaData::Language. | 
| 129 | */ | 
| 130 |  | 
| 131 | /*! | 
| 132 |     \fn QMediaStreamsControl::isActive(int streamNumber) | 
| 133 |  | 
| 134 |     Returns true if the media stream \a streamNumber is active. | 
| 135 | */ | 
| 136 |  | 
| 137 | /*! | 
| 138 |     \fn QMediaStreamsControl::setActive(int streamNumber, bool state) | 
| 139 |  | 
| 140 |     Sets the active \a state of media stream \a streamNumber. | 
| 141 |  | 
| 142 |     Setting the active state of a media stream to true will activate it.  If any other stream | 
| 143 |     of the same type was previously active it will be deactivated. Setting the active state fo a | 
| 144 |     media stream to false will deactivate it. | 
| 145 | */ | 
| 146 |  | 
| 147 | /*! | 
| 148 |     \fn QMediaStreamsControl::streamsChanged() | 
| 149 |  | 
| 150 |     The signal is emitted when the available streams list is changed. | 
| 151 | */ | 
| 152 |  | 
| 153 | /*! | 
| 154 |     \fn QMediaStreamsControl::activeStreamsChanged() | 
| 155 |  | 
| 156 |     The signal is emitted when the active streams list is changed. | 
| 157 | */ | 
| 158 |  | 
| 159 | QT_END_NAMESPACE | 
| 160 |  | 
| 161 | #include "moc_qmediastreamscontrol.cpp" | 
| 162 |  |