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
43QT_BEGIN_NAMESPACE
44
45static void qRegisterMediaStreamControlMetaTypes()
46{
47 qRegisterMetaType<QMediaStreamsControl::StreamType>();
48}
49
50Q_CONSTRUCTOR_FUNCTION(qRegisterMediaStreamControlMetaTypes)
51
52
53/*!
54 \class QMediaStreamsControl
55 \inmodule QtMultimedia
56
57
58 \ingroup multimedia_control
59
60 \brief The QMediaStreamsControl class provides a media stream selection control.
61
62
63 The QMediaStreamsControl class provides descriptions of the available media streams
64 and allows individual streams to be activated and deactivated.
65
66 The interface name of QMediaStreamsControl is \c org.qt-project.qt.mediastreamscontrol/5.0 as
67 defined in QMediaStreamsControl_iid.
68
69 \sa QMediaService::requestControl()
70*/
71
72/*!
73 \macro QMediaStreamsControl_iid
74
75 \c org.qt-project.qt.mediastreamscontrol/5.0
76
77 Defines the interface name of the QMediaStreamsControl class.
78
79 \relates QMediaStreamsControl
80*/
81
82/*!
83 Constructs a new media streams control with the given \a parent.
84*/
85QMediaStreamsControl::QMediaStreamsControl(QObject *parent)
86 :QMediaControl(*new QMediaControlPrivate, parent)
87{
88}
89
90/*!
91 Destroys a media streams control.
92*/
93QMediaStreamsControl::~QMediaStreamsControl()
94{
95}
96
97/*!
98 \enum QMediaStreamsControl::StreamType
99
100 Media stream type.
101
102 \value AudioStream Audio stream.
103 \value VideoStream Video stream.
104 \value SubPictureStream Subpicture or teletext stream.
105 \value UnknownStream The stream type is unknown.
106 \value DataStream
107*/
108
109/*!
110 \fn QMediaStreamsControl::streamCount()
111
112 Returns the number of media streams.
113*/
114
115/*!
116 \fn QMediaStreamsControl::streamType(int streamNumber)
117
118 Return the type of media stream \a streamNumber.
119*/
120
121/*!
122 \fn QMediaStreamsControl::metaData(int streamNumber, const QString &key)
123
124 Returns the meta-data value of \a key for the given \a streamNumber.
125
126 Useful metadata keys are QMediaMetaData::Title,
127 QMediaMetaData::Description and QMediaMetaData::Language.
128*/
129
130/*!
131 \fn QMediaStreamsControl::isActive(int streamNumber)
132
133 Returns true if the media stream \a streamNumber is active.
134*/
135
136/*!
137 \fn QMediaStreamsControl::setActive(int streamNumber, bool state)
138
139 Sets the active \a state of media stream \a streamNumber.
140
141 Setting the active state of a media stream to true will activate it. If any other stream
142 of the same type was previously active it will be deactivated. Setting the active state fo a
143 media stream to false will deactivate it.
144*/
145
146/*!
147 \fn QMediaStreamsControl::streamsChanged()
148
149 The signal is emitted when the available streams list is changed.
150*/
151
152/*!
153 \fn QMediaStreamsControl::activeStreamsChanged()
154
155 The signal is emitted when the active streams list is changed.
156*/
157
158#include "moc_qmediastreamscontrol.cpp"
159QT_END_NAMESPACE
160
161