summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/imports/multimedia/multimedia.cpp4
-rw-r--r--src/imports/multimedia/multimedia.pro4
-rw-r--r--src/imports/multimedia/qdeclarativeradio.cpp541
-rw-r--r--src/imports/multimedia/qdeclarativeradio_p.h203
-rw-r--r--src/imports/multimedia/qdeclarativeradiodata.cpp325
-rw-r--r--src/imports/multimedia/qdeclarativeradiodata_p.h190
-rw-r--r--src/multimedia/controls/controls.pri4
-rw-r--r--src/multimedia/controls/qradiodatacontrol.cpp193
-rw-r--r--src/multimedia/controls/qradiodatacontrol.h88
-rw-r--r--src/multimedia/controls/qradiotunercontrol.cpp344
-rw-r--r--src/multimedia/controls/qradiotunercontrol.h119
-rw-r--r--src/multimedia/doc/snippets/multimedia-snippets/media.cpp26
-rw-r--r--src/multimedia/doc/src/changes.qdoc1
-rw-r--r--src/multimedia/doc/src/multimedia.qdoc11
-rw-r--r--src/multimedia/doc/src/qtmultimedia-cpp.qdoc2
-rw-r--r--src/multimedia/doc/src/qtmultimedia-index.qdoc10
-rw-r--r--src/multimedia/doc/src/qtmultimedia5.qdoc2
-rw-r--r--src/multimedia/doc/src/radiooverview.qdoc89
-rw-r--r--src/multimedia/multimedia.pro1
-rw-r--r--src/multimedia/qmediaserviceproviderplugin.h10
-rw-r--r--src/multimedia/radio/qradiodata.cpp479
-rw-r--r--src/multimedia/radio/qradiodata.h134
-rw-r--r--src/multimedia/radio/qradiotuner.cpp660
-rw-r--r--src/multimedia/radio/qradiotuner.h164
-rw-r--r--src/multimedia/radio/radio.pri9
-rw-r--r--src/multimedia/recording/qmediarecorder.cpp2
-rw-r--r--src/plugins/plugins.pro5
-rw-r--r--src/plugins/v4l/radio/radio.pri9
-rw-r--r--src/plugins/v4l/radio/v4lradiocontrol.cpp536
-rw-r--r--src/plugins/v4l/radio/v4lradiocontrol.h136
-rw-r--r--src/plugins/v4l/radio/v4lradioservice.cpp69
-rw-r--r--src/plugins/v4l/radio/v4lradioservice.h65
-rw-r--r--src/plugins/v4l/v4l.json4
-rw-r--r--src/plugins/v4l/v4l.pro11
-rw-r--r--src/plugins/v4l/v4lserviceplugin.cpp72
-rw-r--r--src/plugins/v4l/v4lserviceplugin.h61
36 files changed, 8 insertions, 4575 deletions
diff --git a/src/imports/multimedia/multimedia.cpp b/src/imports/multimedia/multimedia.cpp
index 45990e4f9..bbc48647a 100644
--- a/src/imports/multimedia/multimedia.cpp
+++ b/src/imports/multimedia/multimedia.cpp
@@ -49,8 +49,6 @@
#include "qdeclarativemultimediaglobal_p.h"
#include "qdeclarativemediametadata_p.h"
#include "qdeclarativeaudio_p.h"
-#include "qdeclarativeradio_p.h"
-#include "qdeclarativeradiodata_p.h"
#include "qdeclarativeplaylist_p.h"
#include "qdeclarativecamera_p.h"
#include "qdeclarativecamerapreviewprovider_p.h"
@@ -88,8 +86,6 @@ public:
qmlRegisterType<QDeclarativeAudio>(uri, 5, 0, "Audio");
qmlRegisterType<QDeclarativeAudio>(uri, 5, 0, "MediaPlayer");
qmlRegisterType<QDeclarativeVideoOutput>(uri, 5, 0, "VideoOutput");
- qmlRegisterType<QDeclarativeRadio>(uri, 5, 0, "Radio");
- qmlRegisterType<QDeclarativeRadioData>(uri, 5, 0, "RadioData");
qmlRegisterType<QDeclarativeCamera>(uri, 5, 0, "Camera");
qmlRegisterType<QDeclarativeTorch>(uri, 5, 0, "Torch");
qmlRegisterUncreatableType<QDeclarativeCameraCapture>(uri, 5, 0, "CameraCapture",
diff --git a/src/imports/multimedia/multimedia.pro b/src/imports/multimedia/multimedia.pro
index 4c35784b9..4fa911d54 100644
--- a/src/imports/multimedia/multimedia.pro
+++ b/src/imports/multimedia/multimedia.pro
@@ -8,8 +8,6 @@ HEADERS += \
qdeclarativeaudio_p.h \
qdeclarativemediametadata_p.h \
qdeclarativeplaylist_p.h \
- qdeclarativeradio_p.h \
- qdeclarativeradiodata_p.h \
qdeclarativecamera_p.h \
qdeclarativecameracapture_p.h \
qdeclarativecamerarecorder_p.h \
@@ -26,8 +24,6 @@ SOURCES += \
multimedia.cpp \
qdeclarativeaudio.cpp \
qdeclarativeplaylist.cpp \
- qdeclarativeradio.cpp \
- qdeclarativeradiodata.cpp \
qdeclarativecamera.cpp \
qdeclarativecameracapture.cpp \
qdeclarativecamerarecorder.cpp \
diff --git a/src/imports/multimedia/qdeclarativeradio.cpp b/src/imports/multimedia/qdeclarativeradio.cpp
deleted file mode 100644
index 655b87ca5..000000000
--- a/src/imports/multimedia/qdeclarativeradio.cpp
+++ /dev/null
@@ -1,541 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qdeclarativeradio_p.h"
-#include "qdeclarativeradiodata_p.h"
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmltype Radio
- \instantiates QDeclarativeRadio
- \inqmlmodule QtMultimedia
- \brief Access radio functionality from a QML application.
- \ingroup multimedia_qml
- \ingroup multimedia_radio_qml
- \inherits Item
- \deprecated
-
- \qml
- Rectangle {
- width: 320
- height: 480
-
- Radio {
- id: radio
- band: Radio.FM
- }
-
- MouseArea {
- x: 0; y: 0
- height: parent.height
- width: parent.width / 2
-
- onClicked: radio.scanDown()
- }
-
- MouseArea {
- x: parent.width / 2; y: 0
- height: parent.height
- width: parent.width / 2
-
- onClicked: radio.scanUp()
- }
- }
- \endqml
-
- You can use \c Radio to tune the radio and get information about the signal.
- You can also use the Radio to get information about tuning, for instance the
- frequency steps supported for tuning.
-
- The corresponding \l RadioData gives RDS information about the
- current radio station. The best way to access the RadioData for
- the current Radio is to use the \c radioData property.
-
- \sa {Radio Overview}
-
-*/
-
-
-QDeclarativeRadio::QDeclarativeRadio(QObject *parent) :
- QObject(parent)
-{
- m_radioTuner = new QRadioTuner(this);
- m_radioData = new QDeclarativeRadioData(m_radioTuner, this);
-
- connect(m_radioTuner, SIGNAL(stateChanged(QRadioTuner::State)), this, SLOT(_q_stateChanged(QRadioTuner::State)));
- connect(m_radioTuner, SIGNAL(bandChanged(QRadioTuner::Band)), this, SLOT(_q_bandChanged(QRadioTuner::Band)));
-
- connect(m_radioTuner, SIGNAL(frequencyChanged(int)), this, SIGNAL(frequencyChanged(int)));
- connect(m_radioTuner, SIGNAL(stereoStatusChanged(bool)), this, SIGNAL(stereoStatusChanged(bool)));
- connect(m_radioTuner, SIGNAL(searchingChanged(bool)), this, SIGNAL(searchingChanged(bool)));
- connect(m_radioTuner, SIGNAL(signalStrengthChanged(int)), this, SIGNAL(signalStrengthChanged(int)));
- connect(m_radioTuner, SIGNAL(volumeChanged(int)), this, SIGNAL(volumeChanged(int)));
- connect(m_radioTuner, SIGNAL(mutedChanged(bool)), this, SIGNAL(mutedChanged(bool)));
- connect(m_radioTuner, SIGNAL(stationFound(int,QString)), this, SIGNAL(stationFound(int,QString)));
- connect(m_radioTuner, SIGNAL(antennaConnectedChanged(bool)), this, SIGNAL(antennaConnectedChanged(bool)));
- connect(m_radioTuner, SIGNAL(availabilityChanged(QMultimedia::AvailabilityStatus)), this, SLOT(_q_availabilityChanged(QMultimedia::AvailabilityStatus)));
-
- connect(m_radioTuner, SIGNAL(error(QRadioTuner::Error)), this, SLOT(_q_error(QRadioTuner::Error)));
-}
-
-QDeclarativeRadio::~QDeclarativeRadio()
-{
-}
-
-/*!
- \qmlproperty enumeration QtMultimedia::Radio::state
-
- This property holds the current state of the Radio.
-
- \table
- \header \li Value \li Description
- \row \li ActiveState
- \li The radio is started and active
-
- \row \li StoppedState
- \li The radio is stopped
-
- \endtable
-
- \sa start, stop
-*/
-QDeclarativeRadio::State QDeclarativeRadio::state() const
-{
- return static_cast<QDeclarativeRadio::State>(m_radioTuner->state());
-}
-
-/*!
- \qmlproperty enumeration QtMultimedia::Radio::band
-
- This property holds the frequency band used for the radio, which can be specified as
- any one of the values in the table below.
-
- \table
- \header \li Value \li Description
- \row \li AM
- \li 520 to 1610 kHz, 9 or 10kHz channel spacing, extended 1610 to 1710 kHz
-
- \row \li FM
- \li 87.5 to 108.0 MHz, except Japan 76-90 MHz
-
- \row \li SW
- \li 1.711 to 30.0 MHz, divided into 15 bands. 5kHz channel spacing
-
- \row \li LW
- \li 148.5 to 283.5 kHz, 9kHz channel spacing (Europe, Africa, Asia)
-
- \row \li FM2
- \li range not defined, used when area supports more than one FM range
-
- \endtable
-*/
-QDeclarativeRadio::Band QDeclarativeRadio::band() const
-{
- return static_cast<QDeclarativeRadio::Band>(m_radioTuner->band());
-}
-
-/*!
- \qmlproperty int QtMultimedia::Radio::frequency
-
- Sets the frequency in Hertz that the radio is tuned to. The frequency must be within the frequency
- range for the current band, otherwise it will be changed to be within the frequency range.
-
- \sa maximumFrequency, minimumFrequency
-*/
-int QDeclarativeRadio::frequency() const
-{
- return m_radioTuner->frequency();
-}
-
-/*!
- \qmlproperty enumeration QtMultimedia::Radio::stereoMode
-
- This property holds the stereo mode of the radio, which can be set to any one of the
- values in the table below.
-
- \table
- \header \li Value \li Description
- \row \li Auto
- \li Uses stereo mode matching the station
-
- \row \li ForceStereo
- \li Forces the radio to play the station in stereo, converting the sound signal if necessary
-
- \row \li ForceMono
- \li Forces the radio to play the station in mono, converting the sound signal if necessary
-
- \endtable
-*/
-QDeclarativeRadio::StereoMode QDeclarativeRadio::stereoMode() const
-{
- return static_cast<QDeclarativeRadio::StereoMode>(m_radioTuner->stereoMode());
-}
-
-/*!
- \qmlproperty int QtMultimedia::Radio::volume
-
- Set this property to control the volume of the radio. The valid range of the volume is from 0 to 100.
-*/
-int QDeclarativeRadio::volume() const
-{
- return m_radioTuner->volume();
-}
-
-/*!
- \qmlproperty bool QtMultimedia::Radio::muted
-
- This property reflects whether the radio is muted or not.
-*/
-bool QDeclarativeRadio::muted() const
-{
- return m_radioTuner->isMuted();
-}
-
-/*!
- \qmlproperty bool QtMultimedia::Radio::stereo
-
- This property holds whether the radio is receiving a stereo signal or not. If \l stereoMode is
- set to ForceMono the value will always be false. Likewise, it will always be true if stereoMode
- is set to ForceStereo.
-
- \sa stereoMode
-*/
-bool QDeclarativeRadio::stereo() const
-{
- return m_radioTuner->isStereo();
-}
-
-/*!
- \qmlproperty int QtMultimedia::Radio::signalStrength
-
- The strength of the current radio signal as a percentage where 0% equals no signal, and 100% is a
- very good signal.
-*/
-int QDeclarativeRadio::signalStrength() const
-{
- return m_radioTuner->signalStrength();
-}
-
-/*!
- \qmlproperty bool QtMultimedia::Radio::searching
-
- This property is true if the radio is currently searching for radio stations, for instance using the \l scanUp,
- \l scanDown, and \l searchAllStations methods. Once the search completes, or if it is cancelled using
- \l cancelScan, this property will be false.
-*/
-bool QDeclarativeRadio::searching() const
-{
- return m_radioTuner->isSearching();
-}
-
-/*!
- \qmlproperty int QtMultimedia::Radio::frequencyStep
-
- The number of Hertz for each step when tuning the radio manually. The value is for the current \l band.
- */
-int QDeclarativeRadio::frequencyStep() const
-{
- return m_radioTuner->frequencyStep(m_radioTuner->band());
-}
-
-/*!
- \qmlproperty int QtMultimedia::Radio::minimumFrequency
-
- The minimum frequency for the current \l band.
- */
-int QDeclarativeRadio::minimumFrequency() const
-{
- return m_radioTuner->frequencyRange(m_radioTuner->band()).first;
-}
-
-/*!
- \qmlproperty int QtMultimedia::Radio::maximumFrequency
-
- The maximum frequency for the current \l band.
- */
-int QDeclarativeRadio::maximumFrequency() const
-{
- return m_radioTuner->frequencyRange(m_radioTuner->band()).second;
-}
-
-/*!
- \qmlproperty int QtMultimedia::Radio::antennaConnected
-
- This property is true if there is an antenna connected. Otherwise it will be false.
- */
-bool QDeclarativeRadio::isAntennaConnected() const
-{
- return m_radioTuner->isAntennaConnected();
-}
-
-/*!
- \qmlproperty enumeration QtMultimedia::Radio::availability
-
- Returns the availability state of the radio.
-
- This is one of:
-
- \table
- \header \li Value \li Description
- \row \li Available
- \li The radio is available to use
- \row \li Busy
- \li The radio is usually available to use, but is currently busy.
- This can happen when some other process needs to use the audio
- hardware.
- \row \li Unavailable
- \li The radio is not available to use (there may be no radio
- hardware)
- \row \li ResourceMissing
- \li There is one or more resources missing, so the radio cannot
- be used. It may be possible to try again at a later time. This
- can occur if there is no antenna connected - see the \l antennaConnected
- property as well.
- \endtable
- */
-QDeclarativeRadio::Availability QDeclarativeRadio::availability() const
-{
- return Availability(m_radioTuner->availability());
-}
-
-void QDeclarativeRadio::setBand(QDeclarativeRadio::Band band)
-{
- m_radioTuner->setBand(static_cast<QRadioTuner::Band>(band));
-}
-
-void QDeclarativeRadio::setFrequency(int frequency)
-{
- m_radioTuner->setFrequency(frequency);
-}
-
-void QDeclarativeRadio::setStereoMode(QDeclarativeRadio::StereoMode stereoMode)
-{
- m_radioTuner->setStereoMode(static_cast<QRadioTuner::StereoMode>(stereoMode));
-}
-
-void QDeclarativeRadio::setVolume(int volume)
-{
- m_radioTuner->setVolume(volume);
-}
-
-void QDeclarativeRadio::setMuted(bool muted)
-{
- m_radioTuner->setMuted(muted);
-}
-
-/*!
- \qmlmethod QtMultimedia::Radio::cancelScan()
-
- Cancel the current scan. Will also cancel a search started with \l searchAllStations.
- */
-void QDeclarativeRadio::cancelScan()
-{
- m_radioTuner->cancelSearch();
-}
-
-/*!
- \qmlmethod QtMultimedia::Radio::scanDown()
-
- Searches backward in the frequency range for the current band.
- */
-void QDeclarativeRadio::scanDown()
-{
- m_radioTuner->searchBackward();
-}
-
-/*!
- \qmlmethod QtMultimedia::Radio::scanUp()
-
- Searches forward in the frequency range for the current band.
- */
-void QDeclarativeRadio::scanUp()
-{
- m_radioTuner->searchForward();
-}
-
-/*!
- \qmlmethod QtMultimedia::Radio::searchAllStations(enumeration searchMode)
-
- Start searching the complete frequency range for the current band, and save all the
- radio stations found. The \a searchMode can be either of the values described in the
- table below.
-
- \table
- \header \li Value \li Description
- \row \li SearchFast
- \li Stores each radio station for later retrival and tuning
-
- \row \li SearchGetStationId
- \li Does the same as SearchFast, but also emits the station Id with the \l stationFound signal.
-
- \endtable
-
- The snippet below uses \c searchAllStations with \c SearchGetStationId to receive all the radio
- stations in the current band, and store them in a ListView. The station Id is shown to the user
- and if the user presses a station, the radio is tuned to this station.
-
- \qml
- Item {
- width: 640
- height: 360
-
- Radio {
- id: radio
- onStationFound: radioStations.append({"frequency": frequency, "stationId": stationId})
- }
-
- ListModel {
- id: radioStations
- }
-
- ListView {
- model: radioStations
- delegate: Rectangle {
- MouseArea {
- anchors.fill: parent
- onClicked: radio.frequency = frequency
- }
-
- Text {
- anchors.fill: parent
- text: stationId
- }
- }
- }
-
- Rectangle {
- MouseArea {
- anchors.fill: parent
- onClicked: radio.searchAllStations(Radio.SearchGetStationId)
- }
- }
- }
- \endqml
- */
-void QDeclarativeRadio::searchAllStations(QDeclarativeRadio::SearchMode searchMode)
-{
- m_radioTuner->searchAllStations(static_cast<QRadioTuner::SearchMode>(searchMode));
-}
-
-/*!
- \qmlmethod QtMultimedia::Radio::tuneDown()
-
- Decrements the frequency by the frequency step for the current band. If the frequency is already set
- to the minimum frequency, calling this function has no effect.
-
- \sa band, frequencyStep, minimumFrequency
- */
-void QDeclarativeRadio::tuneDown()
-{
- int f = frequency();
- f = f - frequencyStep();
- setFrequency(f);
-}
-
-/*!
- \qmlmethod QtMultimedia::Radio::tuneUp()
-
- Increments the frequency by the frequency step for the current band. If the frequency is already set
- to the maximum frequency, calling this function has no effect.
-
- \sa band, frequencyStep, maximumFrequency
- */
-void QDeclarativeRadio::tuneUp()
-{
- int f = frequency();
- f = f + frequencyStep();
- setFrequency(f);
-}
-
-/*!
- \qmlmethod QtMultimedia::Radio::start()
-
- Starts the radio. If the radio is available, as determined by the \l availability property,
- this will result in the \l state becoming \c ActiveState.
- */
-void QDeclarativeRadio::start()
-{
- m_radioTuner->start();
-}
-
-/*!
- \qmlmethod QtMultimedia::Radio::stop()
-
- Stops the radio. After calling this method the \l state will be \c StoppedState.
- */
-void QDeclarativeRadio::stop()
-{
- m_radioTuner->stop();
-}
-
-void QDeclarativeRadio::_q_stateChanged(QRadioTuner::State state)
-{
- emit stateChanged(static_cast<QDeclarativeRadio::State>(state));
-}
-
-void QDeclarativeRadio::_q_bandChanged(QRadioTuner::Band band)
-{
- emit bandChanged(static_cast<QDeclarativeRadio::Band>(band));
-}
-
-void QDeclarativeRadio::_q_error(QRadioTuner::Error errorCode)
-{
- emit error(static_cast<QDeclarativeRadio::Error>(errorCode));
- emit errorChanged();
-}
-
-void QDeclarativeRadio::_q_availabilityChanged(QMultimedia::AvailabilityStatus availability)
-{
- emit availabilityChanged(Availability(availability));
-}
-
-/*!
- \qmlsignal QtMultimedia::Radio::stationFound(int frequency, string stationId)
-
- This signal is emitted when a new radio station is found. This signal is only emitted
- if \l searchAllStations is called with \c SearchGetStationId.
-
- The \a frequency is returned in Hertz, and the \a stationId corresponds to the station Id
- in the \l RadioData for this radio station.
-
- The corresponding handler is \c onStationFound.
- */
-
-QT_END_NAMESPACE
diff --git a/src/imports/multimedia/qdeclarativeradio_p.h b/src/imports/multimedia/qdeclarativeradio_p.h
deleted file mode 100644
index b1dc4e6d9..000000000
--- a/src/imports/multimedia/qdeclarativeradio_p.h
+++ /dev/null
@@ -1,203 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QDECLARATIVERADIO_P_H
-#define QDECLARATIVERADIO_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of other Qt classes. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <qradiotuner.h>
-#include <QtQml/qqml.h>
-
-Q_MOC_INCLUDE("qdeclarativeradiodata_p.h")
-
-QT_BEGIN_NAMESPACE
-
-class QDeclarativeRadioData;
-
-class QDeclarativeRadio : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(State state READ state NOTIFY stateChanged)
- Q_PROPERTY(Band band READ band WRITE setBand NOTIFY bandChanged)
- Q_PROPERTY(int frequency READ frequency WRITE setFrequency NOTIFY frequencyChanged)
- Q_PROPERTY(bool stereo READ stereo NOTIFY stereoStatusChanged)
- Q_PROPERTY(StereoMode stereoMode READ stereoMode WRITE setStereoMode)
- Q_PROPERTY(int signalStrength READ signalStrength NOTIFY signalStrengthChanged)
- Q_PROPERTY(int volume READ volume WRITE setVolume NOTIFY volumeChanged)
- Q_PROPERTY(bool muted READ muted WRITE setMuted NOTIFY mutedChanged)
- Q_PROPERTY(bool searching READ searching NOTIFY searchingChanged)
- Q_PROPERTY(int frequencyStep READ frequencyStep NOTIFY bandChanged)
- Q_PROPERTY(int minimumFrequency READ minimumFrequency NOTIFY bandChanged)
- Q_PROPERTY(int maximumFrequency READ maximumFrequency NOTIFY bandChanged)
- Q_PROPERTY(bool antennaConnected READ isAntennaConnected NOTIFY antennaConnectedChanged)
- Q_PROPERTY(Availability availability READ availability NOTIFY availabilityChanged)
- Q_PROPERTY(QDeclarativeRadioData* radioData READ radioData CONSTANT)
- Q_ENUMS(State)
- Q_ENUMS(Band)
- Q_ENUMS(Error)
- Q_ENUMS(StereoMode)
- Q_ENUMS(SearchMode)
- Q_ENUMS(Availability)
-
-public:
- enum State {
- ActiveState = QRadioTuner::ActiveState,
- StoppedState = QRadioTuner::StoppedState
- };
-
- enum Band {
- AM = QRadioTuner::AM,
- FM = QRadioTuner::FM,
- SW = QRadioTuner::SW,
- LW = QRadioTuner::LW,
- FM2 = QRadioTuner::FM2
- };
-
- enum Error {
- NoError = QRadioTuner::NoError,
- ResourceError = QRadioTuner::ResourceError,
- OpenError = QRadioTuner::OpenError,
- OutOfRangeError = QRadioTuner::OutOfRangeError
- };
-
- enum StereoMode {
- ForceStereo = QRadioTuner::ForceStereo,
- ForceMono = QRadioTuner::ForceMono,
- Auto = QRadioTuner::Auto
- };
-
- enum SearchMode {
- SearchFast = QRadioTuner::SearchFast,
- SearchGetStationId = QRadioTuner::SearchGetStationId
- };
-
- enum Availability {
- Available = QMultimedia::Available,
- Busy = QMultimedia::Busy,
- Unavailable = QMultimedia::ServiceMissing,
- ResourceMissing = QMultimedia::ResourceError
- };
-
- QDeclarativeRadio(QObject *parent = 0);
- ~QDeclarativeRadio();
-
- QDeclarativeRadio::State state() const;
- QDeclarativeRadio::Band band() const;
- int frequency() const;
- QDeclarativeRadio::StereoMode stereoMode() const;
- int volume() const;
- bool muted() const;
-
- bool stereo() const;
- int signalStrength() const;
- bool searching() const;
-
- int frequencyStep() const;
- int minimumFrequency() const;
- int maximumFrequency() const;
-
- bool isAntennaConnected() const;
-
- Q_INVOKABLE bool isAvailable() const {return availability() == Available;}
- Availability availability() const;
-
- QDeclarativeRadioData *radioData() { return m_radioData; }
-
-public Q_SLOTS:
- void setBand(QDeclarativeRadio::Band band);
- void setFrequency(int frequency);
- void setStereoMode(QDeclarativeRadio::StereoMode stereoMode);
- void setVolume(int volume);
- void setMuted(bool muted);
-
- void cancelScan();
- void scanDown();
- void scanUp();
- void tuneUp();
- void tuneDown();
- void searchAllStations(QDeclarativeRadio::SearchMode searchMode = QDeclarativeRadio::SearchFast );
-
- void start();
- void stop();
-
-Q_SIGNALS:
- void stateChanged(QDeclarativeRadio::State state);
- void bandChanged(QDeclarativeRadio::Band band);
- void frequencyChanged(int frequency);
- void stereoStatusChanged(bool stereo);
- void searchingChanged(bool searching);
- void signalStrengthChanged(int signalStrength);
- void volumeChanged(int volume);
- void mutedChanged(bool muted);
- void stationFound(int frequency, QString stationId);
- void antennaConnectedChanged(bool connectionStatus);
-
- void availabilityChanged(Availability availability);
-
- void errorChanged();
- void error(QDeclarativeRadio::Error errorCode);
-
-private Q_SLOTS:
- void _q_stateChanged(QRadioTuner::State state);
- void _q_bandChanged(QRadioTuner::Band band);
- void _q_error(QRadioTuner::Error errorCode);
- void _q_availabilityChanged(QMultimedia::AvailabilityStatus);
-
-private:
- Q_DISABLE_COPY(QDeclarativeRadio)
-
- QRadioTuner *m_radioTuner;
- QDeclarativeRadioData *m_radioData;
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativeRadio))
-
-#endif // QDECLARATIVERADIO_P_H
diff --git a/src/imports/multimedia/qdeclarativeradiodata.cpp b/src/imports/multimedia/qdeclarativeradiodata.cpp
deleted file mode 100644
index 770d6d7c0..000000000
--- a/src/imports/multimedia/qdeclarativeradiodata.cpp
+++ /dev/null
@@ -1,325 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qdeclarativeradiodata_p.h"
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmltype RadioData
- \instantiates QDeclarativeRadioData
- \inqmlmodule QtMultimedia
- \brief Access RDS data from a QML application.
- \ingroup multimedia_qml
- \ingroup multimedia_radio_qml
- \inherits Item
-
- \c RadioData is your gateway to all the data available through RDS. RDS is the Radio Data System
- which allows radio stations to broadcast information like the \l stationId, \l programType, \l programTypeName,
- \l stationName, and \l radioText. This information can be read from the \c RadioData. It also allows
- you to set whether the radio should tune to alternative frequencies if the current signal strength falls too much.
-
- \qml
- Rectangle {
- width: 480
- height: 320
-
- Radio {
- id: radio
- band: Radio.FM
- }
-
- Column {
- Text {
- text: radio.radioData.stationName
- }
-
- Text {
- text: radio.radioData.programTypeName
- }
-
- Text {
- text: radio.radioData.radioText
- }
- }
- }
-
- \endqml
-
- You use \c RadioData together with a \l Radio, either by
- accessing the \c radioData property of the Radio, or
- creating a separate RadioData. The properties of the
- RadioData type will reflect the information broadcast by the
- radio station the Radio is currently tuned to.
-
- \sa {Radio Overview}
-*/
-QDeclarativeRadioData::QDeclarativeRadioData(QObject *parent) :
- QObject(parent)
-{
- m_radioTuner = new QRadioTuner(this);
- m_radioData = m_radioTuner->radioData();
-
- connectSignals();
-}
-
-QDeclarativeRadioData::QDeclarativeRadioData(QRadioTuner *tuner, QObject *parent) :
- QObject(parent)
-{
- m_radioTuner = tuner;
- m_radioData = m_radioTuner->radioData();
-
- connectSignals();
-}
-
-QDeclarativeRadioData::~QDeclarativeRadioData()
-{
-}
-
-/*!
- \qmlproperty enumeration QtMultimedia::RadioData::availability
-
- Returns the availability state of the radio data interface.
-
- This is one of:
-
- \table
- \header \li Value \li Description
- \row \li Available
- \li The radio data interface is available to use
- \row \li Busy
- \li The radio data interface is usually available to use, but is currently busy.
- \row \li Unavailable
- \li The radio data interface is not available to use (there may be no radio
- hardware)
- \row \li ResourceMissing
- \li There is one or more resources missing, so the radio cannot
- be used. It may be possible to try again at a later time.
- \endtable
- */
-QDeclarativeRadioData::Availability QDeclarativeRadioData::availability() const
-{
- if (m_radioData)
- return Availability(m_radioData->availability());
-
- return Unavailable;
-}
-
-
-/*!
- \qmlproperty string QtMultimedia::RadioData::stationId
-
- This property allows you to read the station Id of the currently tuned radio
- station.
- */
-QString QDeclarativeRadioData::stationId() const
-{
- if (m_radioData)
- return m_radioData->stationId();
-
- return QString();
-}
-
-/*!
- \qmlproperty enumeration QtMultimedia::RadioData::programType
-
- This property holds the type of the currently playing program as transmitted
- by the radio station. The value can be any one of the values defined in the
- table below.
-
- \table
- \header \li Value
- \row \li Undefined
- \row \li News
- \row \li CurrentAffairs
- \row \li Information
- \row \li Sport
- \row \li Education
- \row \li Drama
- \row \li Culture
- \row \li Science
- \row \li Varied
- \row \li PopMusic
- \row \li RockMusic
- \row \li EasyListening
- \row \li LightClassical
- \row \li SeriousClassical
- \row \li OtherMusic
- \row \li Weather
- \row \li Finance
- \row \li ChildrensProgrammes
- \row \li SocialAffairs
- \row \li Religion
- \row \li PhoneIn
- \row \li Travel
- \row \li Leisure
- \row \li JazzMusic
- \row \li CountryMusic
- \row \li NationalMusic
- \row \li OldiesMusic
- \row \li FolkMusic
- \row \li Documentary
- \row \li AlarmTest
- \row \li Alarm
- \row \li Talk
- \row \li ClassicRock
- \row \li AdultHits
- \row \li SoftRock
- \row \li Top40
- \row \li Soft
- \row \li Nostalgia
- \row \li Classical
- \row \li RhythmAndBlues
- \row \li SoftRhythmAndBlues
- \row \li Language
- \row \li ReligiousMusic
- \row \li ReligiousTalk
- \row \li Personality
- \row \li Public
- \row \li College
-
- \endtable
- */
-QDeclarativeRadioData::ProgramType QDeclarativeRadioData::programType() const
-{
- if (m_radioData)
- return static_cast<QDeclarativeRadioData::ProgramType>(m_radioData->programType());
-
- return Undefined;
-}
-
-/*!
- \qmlproperty string QtMultimedia::RadioData::programTypeName
-
- This property holds a string representation of the \l programType.
- */
-QString QDeclarativeRadioData::programTypeName() const
-{
- if (m_radioData)
- return m_radioData->programTypeName();
-
- return QString();
-}
-
-/*!
- \qmlproperty string QtMultimedia::RadioData::stationName
-
- This property has the name of the currently tuned radio station.
- */
-QString QDeclarativeRadioData::stationName() const
-{
- if (m_radioData)
- return m_radioData->stationName();
-
- return QString();
-}
-
-/*!
- \qmlproperty string QtMultimedia::RadioData::radioText
-
- This property holds free-text transmitted by the radio station. This is typically used to
- show supporting information for the currently playing content, for instance song title or
- artist name.
- */
-QString QDeclarativeRadioData::radioText() const
-{
- if (m_radioData)
- return m_radioData->radioText();
-
- return QString();
-}
-
-/*!
- \qmlproperty bool QtMultimedia::RadioData::alternativeFrequenciesEnabled
-
- This property allows you to specify whether the radio should try and tune to alternative
- frequencies if the signal strength of the current station becomes too weak. The alternative
- frequencies are emitted over RDS by the radio station, and the tuning happens automatically.
- */
-bool QDeclarativeRadioData::alternativeFrequenciesEnabled() const
-{
- if (m_radioData)
- return m_radioData->isAlternativeFrequenciesEnabled();
-
- return false;
-}
-
-void QDeclarativeRadioData::setAlternativeFrequenciesEnabled(bool enabled)
-{
- if (m_radioData)
- m_radioData->setAlternativeFrequenciesEnabled(enabled);
-}
-
-void QDeclarativeRadioData::_q_programTypeChanged(QRadioData::ProgramType programType)
-{
- emit programTypeChanged(static_cast<QDeclarativeRadioData::ProgramType>(programType));
-}
-
-void QDeclarativeRadioData::_q_error(QRadioData::Error errorCode)
-{
- emit error(static_cast<QDeclarativeRadioData::Error>(errorCode));
- emit errorChanged();
-}
-
-void QDeclarativeRadioData::_q_availabilityChanged(QMultimedia::AvailabilityStatus availability)
-{
- emit availabilityChanged(Availability(availability));
-}
-
-void QDeclarativeRadioData::connectSignals()
-{
- if (!m_radioData)
- return;
-
- connect(m_radioData, SIGNAL(programTypeChanged(QRadioData::ProgramType)), this,
- SLOT(_q_programTypeChanged(QRadioData::ProgramType)));
-
- connect(m_radioData, SIGNAL(stationIdChanged(QString)), this, SIGNAL(stationIdChanged(QString)));
- connect(m_radioData, SIGNAL(programTypeNameChanged(QString)), this, SIGNAL(programTypeNameChanged(QString)));
- connect(m_radioData, SIGNAL(stationNameChanged(QString)), this, SIGNAL(stationNameChanged(QString)));
- connect(m_radioData, SIGNAL(radioTextChanged(QString)), this, SIGNAL(radioTextChanged(QString)));
- connect(m_radioData, SIGNAL(alternativeFrequenciesEnabledChanged(bool)), this,
- SIGNAL(alternativeFrequenciesEnabledChanged(bool)));
- // Since the radio data type depends on the service for the tuner, the availability is also dictated from the tuner
- connect(m_radioTuner, SIGNAL(availabilityChanged(QMultimedia::AvailabilityStatus)), this, SLOT(_q_availabilityChanged(QMultimedia::AvailabilityStatus)));
-
- connect(m_radioData, SIGNAL(error(QRadioData::Error)), this, SLOT(_q_error(QRadioData::Error)));
-}
-
-QT_END_NAMESPACE
diff --git a/src/imports/multimedia/qdeclarativeradiodata_p.h b/src/imports/multimedia/qdeclarativeradiodata_p.h
deleted file mode 100644
index df99ff6e0..000000000
--- a/src/imports/multimedia/qdeclarativeradiodata_p.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QDECLARATIVERADIODATA_P_H
-#define QDECLARATIVERADIODATA_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of other Qt classes. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <qradiodata.h>
-#include <qradiotuner.h>
-#include <QtQml/qqml.h>
-
-QT_BEGIN_NAMESPACE
-
-class QDeclarativeRadioData : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString stationId READ stationId NOTIFY stationIdChanged)
- Q_PROPERTY(QDeclarativeRadioData::ProgramType programType READ programType NOTIFY programTypeChanged)
- Q_PROPERTY(QString programTypeName READ programTypeName NOTIFY programTypeNameChanged)
- Q_PROPERTY(QString stationName READ stationName NOTIFY stationNameChanged)
- Q_PROPERTY(QString radioText READ radioText NOTIFY radioTextChanged)
- Q_PROPERTY(bool alternativeFrequenciesEnabled READ alternativeFrequenciesEnabled
- WRITE setAlternativeFrequenciesEnabled NOTIFY alternativeFrequenciesEnabledChanged)
- Q_PROPERTY(Availability availability READ availability NOTIFY availabilityChanged)
- Q_ENUMS(Error)
- Q_ENUMS(ProgramType)
- Q_ENUMS(Availability)
-
-public:
-
- enum Error {
- NoError = QRadioData::NoError,
- ResourceError = QRadioData::ResourceError,
- OpenError = QRadioData::OpenError,
- OutOfRangeError = QRadioData::OutOfRangeError
- };
-
- enum ProgramType {
- Undefined = QRadioData::Undefined,
- News = QRadioData::News,
- CurrentAffairs = QRadioData::CurrentAffairs,
- Information = QRadioData::Information,
- Sport = QRadioData::Sport,
- Education = QRadioData::Education,
- Drama = QRadioData::Drama,
- Culture = QRadioData::Culture,
- Science = QRadioData::Science,
- Varied = QRadioData::Varied,
- PopMusic = QRadioData::PopMusic,
- RockMusic = QRadioData::RockMusic,
- EasyListening = QRadioData::EasyListening,
- LightClassical = QRadioData::LightClassical,
- SeriousClassical = QRadioData::SeriousClassical,
- OtherMusic = QRadioData::OtherMusic,
- Weather = QRadioData::Weather,
- Finance = QRadioData::Finance,
- ChildrensProgrammes = QRadioData::ChildrensProgrammes,
- SocialAffairs = QRadioData::SocialAffairs,
- Religion = QRadioData::Religion,
- PhoneIn = QRadioData::PhoneIn,
- Travel = QRadioData::Travel,
- Leisure = QRadioData::Leisure,
- JazzMusic = QRadioData::JazzMusic,
- CountryMusic = QRadioData::CountryMusic,
- NationalMusic = QRadioData::NationalMusic,
- OldiesMusic = QRadioData::OldiesMusic,
- FolkMusic = QRadioData::FolkMusic,
- Documentary = QRadioData::Documentary,
- AlarmTest = QRadioData::AlarmTest,
- Alarm = QRadioData::Alarm,
- Talk = QRadioData::Talk,
- ClassicRock = QRadioData::ClassicRock,
- AdultHits = QRadioData::AdultHits,
- SoftRock = QRadioData::SoftRock,
- Top40 = QRadioData::Top40,
- Soft = QRadioData::Soft,
- Nostalgia = QRadioData::Nostalgia,
- Classical = QRadioData::Classical,
- RhythmAndBlues = QRadioData::RhythmAndBlues,
- SoftRhythmAndBlues = QRadioData::SoftRhythmAndBlues,
- Language = QRadioData::Language,
- ReligiousMusic = QRadioData::ReligiousMusic,
- ReligiousTalk = QRadioData::ReligiousTalk,
- Personality = QRadioData::Personality,
- Public = QRadioData::Public,
- College = QRadioData::College
- };
-
- enum Availability {
- Available = QMultimedia::Available,
- Busy = QMultimedia::Busy,
- Unavailable = QMultimedia::ServiceMissing,
- ResourceMissing = QMultimedia::ResourceError
- };
-
- QDeclarativeRadioData(QObject *parent = 0);
- QDeclarativeRadioData(QRadioTuner *tuner, QObject *parent = 0);
- ~QDeclarativeRadioData();
-
- QString stationId() const;
- QDeclarativeRadioData::ProgramType programType() const;
- QString programTypeName() const;
- QString stationName() const;
- QString radioText() const;
- bool alternativeFrequenciesEnabled() const;
-
- Q_INVOKABLE bool isAvailable() const {return availability() == Available;}
- Availability availability() const;
-
-public Q_SLOTS:
- void setAlternativeFrequenciesEnabled(bool enabled);
-
-Q_SIGNALS:
- void stationIdChanged(QString stationId);
- void programTypeChanged(QDeclarativeRadioData::ProgramType programType);
- void programTypeNameChanged(QString programTypeName);
- void stationNameChanged(QString stationName);
- void radioTextChanged(QString radioText);
- void alternativeFrequenciesEnabledChanged(bool enabled);
-
- void availabilityChanged(Availability availability);
-
- void errorChanged();
- void error(QDeclarativeRadioData::Error errorCode);
-
-private Q_SLOTS:
- void _q_programTypeChanged(QRadioData::ProgramType programType);
- void _q_error(QRadioData::Error errorCode);
- void _q_availabilityChanged(QMultimedia::AvailabilityStatus);
-
-private:
- void connectSignals();
-
- Q_DISABLE_COPY(QDeclarativeRadioData)
-
- QRadioData *m_radioData;
- QRadioTuner *m_radioTuner;
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativeRadioData))
-
-#endif // QDECLARATIVERADIODATA_P_H
diff --git a/src/multimedia/controls/controls.pri b/src/multimedia/controls/controls.pri
index a7f943e78..c0eb28936 100644
--- a/src/multimedia/controls/controls.pri
+++ b/src/multimedia/controls/controls.pri
@@ -27,8 +27,6 @@ PUBLIC_HEADERS += \
controls/qmediastreamscontrol.h \
controls/qmetadatareadercontrol.h \
controls/qmetadatawritercontrol.h \
- controls/qradiodatacontrol.h \
- controls/qradiotunercontrol.h \
controls/qvideodeviceselectorcontrol.h \
controls/qvideoencodersettingscontrol.h \
controls/qvideorenderercontrol.h \
@@ -67,8 +65,6 @@ SOURCES += \
controls/qmediastreamscontrol.cpp \
controls/qmetadatareadercontrol.cpp \
controls/qmetadatawritercontrol.cpp \
- controls/qradiodatacontrol.cpp \
- controls/qradiotunercontrol.cpp \
controls/qvideorenderercontrol.cpp \
controls/qvideowindowcontrol.cpp \
controls/qmediaaudioprobecontrol.cpp \
diff --git a/src/multimedia/controls/qradiodatacontrol.cpp b/src/multimedia/controls/qradiodatacontrol.cpp
deleted file mode 100644
index 27e192674..000000000
--- a/src/multimedia/controls/qradiodatacontrol.cpp
+++ /dev/null
@@ -1,193 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qtmultimediaglobal.h>
-#include "qradiodatacontrol.h"
-#include "qmediacontrol_p.h"
-
-QT_BEGIN_NAMESPACE
-
-
-/*!
- \class QRadioDataControl
- \obsolete
- \inmodule QtMultimedia
-
-
- \ingroup multimedia_control
-
-
- \brief The QRadioDataControl class provides access to the RDS functionality of the
- radio in the QMediaService.
-
- The functionality provided by this control is exposed to application code
- through the QRadioData class.
-
- The interface name of QRadioDataControl is \c org.qt-project.qt.radiodatacontrol/5.0 as
- defined in QRadioDataControl_iid.
-
- \sa QMediaService::requestControl(), QRadioData
-*/
-
-/*!
- \macro QRadioDataControl_iid
-
- \c org.qt-project.qt.radiodatacontrol/5.0
-
- Defines the interface name of the QRadioDataControl class.
-
- \relates QRadioDataControl
-*/
-
-/*!
- Constructs a radio data control with the given \a parent.
-*/
-
-QRadioDataControl::QRadioDataControl(QObject *parent):
- QMediaControl(*new QMediaControlPrivate, parent)
-{
-}
-
-/*!
- Destroys a radio data control.
-*/
-
-QRadioDataControl::~QRadioDataControl()
-{
-}
-
-/*!
- \fn QRadioData::Error QRadioDataControl::error() const
-
- Returns the error state of a radio data.
-*/
-
-/*!
- \fn QString QRadioDataControl::errorString() const
-
- Returns a string describing a radio data's error state.
-*/
-
-/*!
- \fn void QRadioDataControl::error(QRadioData::Error error)
-
- Signals that an \a error has occurred.
-*/
-
-/*!
- \fn QString QRadioDataControl::stationId() const
-
- Returns the current Program Identification
-*/
-
-/*!
- \fn QRadioData::ProgramType QRadioDataControl::programType() const
-
- Returns the current Program Type
-*/
-
-/*!
- \fn QString QRadioDataControl::programTypeName() const
-
- Returns the current Program Type Name
-*/
-
-/*!
- \fn QString QRadioDataControl::stationName() const
-
- Returns the current Program Service
-*/
-
-/*!
- \fn QString QRadioDataControl::radioText() const
-
- Returns the current Radio Text
-*/
-
-/*!
- \fn void QRadioDataControl::setAlternativeFrequenciesEnabled(bool enabled)
-
- Sets the Alternative Frequency to \a enabled
-*/
-
-/*!
- \fn bool QRadioDataControl::isAlternativeFrequenciesEnabled() const
-
- Returns true if Alternative Frequency is currently enabled
-*/
-
-/*!
- \fn QRadioDataControl::alternativeFrequenciesEnabledChanged(bool enabled)
-
- Signals that the alternative frequencies setting has changed to the value of \a enabled.
-*/
-
-/*!
- \fn void QRadioDataControl::stationIdChanged(QString stationId)
-
- Signals that the Program Identification \a stationId has changed
-*/
-
-/*!
- \fn void QRadioDataControl::programTypeChanged(QRadioData::ProgramType programType)
-
- Signals that the Program Type \a programType has changed
-*/
-
-/*!
- \fn void QRadioDataControl::programTypeNameChanged(QString programTypeName)
-
- Signals that the Program Type Name \a programTypeName has changed
-*/
-
-/*!
- \fn void QRadioDataControl::stationNameChanged(QString stationName)
-
- Signals that the Program Service \a stationName has changed
-*/
-
-/*!
- \fn void QRadioDataControl::radioTextChanged(QString radioText)
-
- Signals that the Radio Text \a radioText has changed
-*/
-
-QT_END_NAMESPACE
-
-#include "moc_qradiodatacontrol.cpp"
diff --git a/src/multimedia/controls/qradiodatacontrol.h b/src/multimedia/controls/qradiodatacontrol.h
deleted file mode 100644
index 98302b918..000000000
--- a/src/multimedia/controls/qradiodatacontrol.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QRADIODATACONTROL_H
-#define QRADIODATACONTROL_H
-
-#include <QtMultimedia/qmediacontrol.h>
-#include <QtMultimedia/qradiodata.h>
-
-QT_BEGIN_NAMESPACE
-
-// Required for QDoc workaround
-class QString;
-
-class Q_MULTIMEDIA_EXPORT QRadioDataControl : public QMediaControl
-{
- Q_OBJECT
-
-public:
- ~QRadioDataControl();
-
- virtual QString stationId() const = 0;
- virtual QRadioData::ProgramType programType() const = 0;
- virtual QString programTypeName() const = 0;
- virtual QString stationName() const = 0;
- virtual QString radioText() const = 0;
- virtual void setAlternativeFrequenciesEnabled(bool enabled) = 0;
- virtual bool isAlternativeFrequenciesEnabled() const = 0;
-
- virtual QRadioData::Error error() const = 0;
- virtual QString errorString() const = 0;
-
-Q_SIGNALS:
- void stationIdChanged(QString stationId);
- void programTypeChanged(QRadioData::ProgramType programType);
- void programTypeNameChanged(QString programTypeName);
- void stationNameChanged(QString stationName);
- void radioTextChanged(QString radioText);
- void alternativeFrequenciesEnabledChanged(bool enabled);
- void error(QRadioData::Error err);
-
-protected:
- explicit QRadioDataControl(QObject *parent = nullptr);
-};
-
-#define QRadioDataControl_iid "org.qt-project.qt.radiodatacontrol/5.0"
-Q_MEDIA_DECLARE_CONTROL(QRadioDataControl, QRadioDataControl_iid)
-
-QT_END_NAMESPACE
-
-
-#endif // QRADIODATACONTROL_H
diff --git a/src/multimedia/controls/qradiotunercontrol.cpp b/src/multimedia/controls/qradiotunercontrol.cpp
deleted file mode 100644
index 20897150b..000000000
--- a/src/multimedia/controls/qradiotunercontrol.cpp
+++ /dev/null
@@ -1,344 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qtmultimediaglobal.h>
-#include "qradiotunercontrol.h"
-#include "qmediacontrol_p.h"
-
-QT_BEGIN_NAMESPACE
-
-
-/*!
- \class QRadioTunerControl
- \obsolete
- \inmodule QtMultimedia
-
- \ingroup multimedia_control
-
-
- \brief The QRadioTunerControl class provides access to the radio tuning
- functionality of a QMediaService.
-
- If a QMediaService can tune an analog radio device it will implement
- QRadioTunerControl. This control provides a means to tune a radio device
- to a specific \l {setFrequency()}{frequency} as well as search \l
- {searchForward()}{forwards} and \l {searchBackward()}{backwards} for a
- signal.
-
- The functionality provided by this control is exposed to application code
- through the QRadioTuner class.
-
- The interface name of QRadioTunerControl is \c org.qt-project.qt.radiotunercontrol/5.0 as
- defined in QRadioTunerControl_iid.
-
- \sa QMediaService::requestControl(), QRadioTuner
-*/
-
-/*!
- \macro QRadioTunerControl_iid
-
- \c org.qt-project.qt.radiotunercontrol/5.0
-
- Defines the interface name of the QRadioTunerControl class.
-
- \relates QRadioTunerControl
-*/
-
-/*!
- Constructs a radio tuner control with the given \a parent.
-*/
-
-QRadioTunerControl::QRadioTunerControl(QObject *parent):
- QMediaControl(*new QMediaControlPrivate, parent)
-{
-}
-
-/*!
- Destroys a radio tuner control.
-*/
-
-QRadioTunerControl::~QRadioTunerControl()
-{
-}
-
-/*!
- \fn QRadioTuner::State QRadioTunerControl::state() const
-
- Returns the current radio tuner state.
-*/
-
-/*!
- \fn QRadioTuner::Band QRadioTunerControl::band() const
-
- Returns the frequency band a radio tuner is tuned to.
-*/
-
-/*!
- \fn void QRadioTunerControl::bandChanged(QRadioTuner::Band band)
-
- Signals that the frequency \a band a radio tuner is tuned to has changed.
-*/
-
-/*!
- \fn void QRadioTunerControl::setBand(QRadioTuner::Band band)
-
- Sets the frequecy \a band a radio tuner is tuned to.
-
- Changing the frequency band will reset the frequency to the minimum frequency of the new band.
-*/
-
-/*!
- \fn bool QRadioTunerControl::isBandSupported(QRadioTuner::Band band) const
-
- Identifies if a frequency \a band is supported.
-
- Returns true if the band is supported, and false if it is not.
-*/
-
-/*!
- \fn int QRadioTunerControl::frequency() const
-
- Returns the frequency a radio tuner is tuned to.
-*/
-
-/*!
- \fn int QRadioTunerControl::frequencyStep(QRadioTuner::Band band) const
-
- Returns the number of Hertz to increment the frequency by when stepping through frequencies
- within a given \a band.
-*/
-
-/*!
- \fn QPair<int,int> QRadioTunerControl::frequencyRange(QRadioTuner::Band band) const
-
- Returns a frequency \a band's minimum and maximum frequency.
-*/
-
-/*!
- \fn void QRadioTunerControl::setFrequency(int frequency)
-
- Sets the \a frequency a radio tuner is tuned to.
-*/
-
-/*!
- \fn bool QRadioTunerControl::isStereo() const
-
- Identifies if a radio tuner is receiving a stereo signal.
-
- Returns true if the tuner is receiving a stereo signal, and false if it is not.
-*/
-
-/*!
- \fn QRadioTuner::StereoMode QRadioTunerControl::stereoMode() const
-
- Returns a radio tuner's stereo mode.
-
- \sa QRadioTuner::StereoMode
-*/
-
-/*!
- \fn void QRadioTunerControl::setStereoMode(QRadioTuner::StereoMode mode)
-
- Sets a radio tuner's stereo \a mode.
-
- \sa QRadioTuner::StereoMode
-*/
-
-/*!
- \fn int QRadioTunerControl::signalStrength() const
-
- Return a radio tuner's current signal strength as a percentage.
-*/
-
-/*!
- \fn int QRadioTunerControl::volume() const
-
- Returns the volume of a radio tuner's audio output as a percentage.
-*/
-
-/*!
- \fn void QRadioTunerControl::setVolume(int volume)
-
- Sets the percentage \a volume of a radio tuner's audio output.
-*/
-
-/*!
- \fn bool QRadioTunerControl::isMuted() const
-
- Identifies if a radio tuner's audio output is muted.
-
- Returns true if the audio is muted, and false if it is not.
-*/
-
-/*!
- \fn void QRadioTunerControl::setMuted(bool muted)
-
- Sets the \a muted state of a radio tuner's audio output.
-*/
-
-/*!
- \fn bool QRadioTunerControl::isSearching() const
-
- Identifies if a radio tuner is currently scanning for signal.
-
- Returns true if the tuner is scanning, and false if it is not.
-*/
-
-/*!
- \fn bool QRadioTunerControl::isAntennaConnected() const
-
- Identifies if there is an antenna connected to the device.
-
- Returns true if there is a connected antenna, and false otherwise.
-*/
-
-/*!
- \fn void QRadioTunerControl::searchForward()
-
- Starts a forward scan for a signal, starting from the current \l frequency().
-*/
-
-/*!
- \fn void QRadioTunerControl::searchBackward()
-
- Starts a backwards scan for a signal, starting from the current \l frequency().
-*/
-
-/*!
- \fn void QRadioTunerControl::searchAllStations(QRadioTuner::SearchMode searchMode)
-
- Starts a scan through the whole frequency band searching all stations with a
- specific \a searchMode.
-*/
-
-/*!
- \fn void QRadioTunerControl::cancelSearch()
-
- Stops scanning for a signal.
-*/
-
-/*!
- \fn void QRadioTunerControl::start()
-
- Activate the radio device.
-*/
-
-/*!
- \fn QRadioTunerControl::stop()
-
- Deactivate the radio device.
-*/
-
-/*!
- \fn QRadioTuner::Error QRadioTunerControl::error() const
-
- Returns the error state of a radio tuner.
-*/
-
-/*!
- \fn QString QRadioTunerControl::errorString() const
-
- Returns a string describing a radio tuner's error state.
-*/
-
-/*!
- \fn void QRadioTunerControl::stateChanged(QRadioTuner::State state)
-
- Signals that the \a state of a radio tuner has changed.
-*/
-
-
-/*!
- \fn void QRadioTunerControl::frequencyChanged(int frequency)
-
- Signals that the \a frequency a radio tuner is tuned to has changed.
-*/
-
-/*!
- \fn void QRadioTunerControl::stereoStatusChanged(bool stereo)
-
- Signals that the \a stereo state of a radio tuner has changed.
-*/
-
-/*!
- \fn void QRadioTunerControl::searchingChanged(bool searching)
-
- Signals that the \a searching state of a radio tuner has changed.
-*/
-
-/*!
- \fn void QRadioTunerControl::signalStrengthChanged(int strength)
-
- Signals that the percentage \a strength of the signal received by a radio tuner has changed.
-*/
-
-/*!
- \fn void QRadioTunerControl::volumeChanged(int volume)
-
- Signals that the percentage \a volume of radio tuner's audio output has changed.
-*/
-
-/*!
- \fn void QRadioTunerControl::mutedChanged(bool muted)
-
- Signals that the \a muted state of a radio tuner's audio output has changed.
-*/
-
-/*!
- \fn void QRadioTunerControl::error(QRadioTuner::Error error)
-
- Signals that an \a error has occurred.
-*/
-
-/*!
- \fn void QRadioTunerControl::stationFound(int frequency, QString stationId)
-
- Signals that new station with \a frequency and \a stationId was found when scanning
-*/
-
-/*!
- \fn void QRadioTunerControl::antennaConnectedChanged(bool connectionStatus)
-
- Signals that the antenna has either been connected or disconnected as
- reflected with the \a connectionStatus.
-*/
-
-QT_END_NAMESPACE
-
-#include "moc_qradiotunercontrol.cpp"
diff --git a/src/multimedia/controls/qradiotunercontrol.h b/src/multimedia/controls/qradiotunercontrol.h
deleted file mode 100644
index bdf529d42..000000000
--- a/src/multimedia/controls/qradiotunercontrol.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QRADIOTUNERCONTROL_H
-#define QRADIOTUNERCONTROL_H
-
-#include <QtMultimedia/qmediacontrol.h>
-#include <QtMultimedia/qradiotuner.h>
-
-QT_BEGIN_NAMESPACE
-
-// Required for QDoc workaround
-class QString;
-
-class Q_MULTIMEDIA_EXPORT QRadioTunerControl : public QMediaControl
-{
- Q_OBJECT
-
-public:
- ~QRadioTunerControl();
-
- virtual QRadioTuner::State state() const = 0;
-
- virtual QRadioTuner::Band band() const = 0;
- virtual void setBand(QRadioTuner::Band b) = 0;
- virtual bool isBandSupported(QRadioTuner::Band b) const = 0;
-
- virtual int frequency() const = 0;
- virtual int frequencyStep(QRadioTuner::Band b) const = 0;
- virtual QPair<int,int> frequencyRange(QRadioTuner::Band b) const = 0;
- virtual void setFrequency(int frequency) = 0;
-
- virtual bool isStereo() const = 0;
- virtual QRadioTuner::StereoMode stereoMode() const = 0;
- virtual void setStereoMode(QRadioTuner::StereoMode mode) = 0;
-
- virtual int signalStrength() const = 0;
-
- virtual int volume() const = 0;
- virtual void setVolume(int volume) = 0;
-
- virtual bool isMuted() const = 0;
- virtual void setMuted(bool muted) = 0;
-
- virtual bool isSearching() const = 0;
-
- virtual bool isAntennaConnected() const { return true; }
-
- virtual void searchForward() = 0;
- virtual void searchBackward() = 0;
- virtual void searchAllStations(QRadioTuner::SearchMode searchMode = QRadioTuner::SearchFast) = 0;
- virtual void cancelSearch() = 0;
-
- virtual void start() = 0;
- virtual void stop() = 0;
-
- virtual QRadioTuner::Error error() const = 0;
- virtual QString errorString() const = 0;
-
-Q_SIGNALS:
- void stateChanged(QRadioTuner::State state);
- void bandChanged(QRadioTuner::Band band);
- void frequencyChanged(int frequency);
- void stereoStatusChanged(bool stereo);
- void searchingChanged(bool searching);
- void signalStrengthChanged(int signalStrength);
- void volumeChanged(int volume);
- void mutedChanged(bool muted);
- void error(QRadioTuner::Error err);
- void stationFound(int frequency, QString stationId);
- void antennaConnectedChanged(bool connectionStatus);
-
-protected:
- explicit QRadioTunerControl(QObject *parent = nullptr);
-};
-
-#define QRadioTunerControl_iid "org.qt-project.qt.radiotunercontrol/5.0"
-Q_MEDIA_DECLARE_CONTROL(QRadioTunerControl, QRadioTunerControl_iid)
-
-QT_END_NAMESPACE
-
-
-#endif // QRADIOTUNERCONTROL_H
diff --git a/src/multimedia/doc/snippets/multimedia-snippets/media.cpp b/src/multimedia/doc/snippets/multimedia-snippets/media.cpp
index 7fd6259ea..5ba7fcc25 100644
--- a/src/multimedia/doc/snippets/multimedia-snippets/media.cpp
+++ b/src/multimedia/doc/snippets/multimedia-snippets/media.cpp
@@ -47,8 +47,6 @@
#include "qmediaservice.h"
#include "qmediaplayercontrol.h"
#include "qmediaplayer.h"
-#include "qradiotuner.h"
-#include "qradiodata.h"
#include "qvideowidget.h"
#include "qcameraimagecapture.h"
#include "qcamera.h"
@@ -63,7 +61,6 @@ class MediaExample : public QObject {
void MediaControl();
void MediaPlayer();
- void RadioTuna();
void MediaRecorder();
void AudioRecorder();
void EncoderSettings();
@@ -84,8 +81,6 @@ private:
QCameraViewfinder *viewfinder;
QCameraImageCapture *imageCapture;
QString fileName;
- QRadioTuner *radio;
- QRadioData *radioData;
QAudioRecorder *audioRecorder;
QAudioProbe *audioProbe;
QVideoProbe *videoProbe;
@@ -93,8 +88,6 @@ private:
QMediaContent image1;
QMediaContent image2;
QMediaContent image3;
-
- static const int yourRadioStationFrequency = 11;
};
void MediaExample::MediaControl()
@@ -298,25 +291,6 @@ void MediaExample::AudioRecorder()
//! [Audio recorder inputs]
}
-void MediaExample::RadioTuna()
-{
- //! [Radio tuner]
- radio = new QRadioTuner;
- connect(radio, SIGNAL(frequencyChanged(int)), this, SLOT(freqChanged(int)));
- if (radio->isBandSupported(QRadioTuner::FM)) {
- radio->setBand(QRadioTuner::FM);
- radio->setFrequency(yourRadioStationFrequency);
- radio->setVolume(100);
- radio->start();
- }
- //! [Radio tuner]
-
- //! [Radio data setup]
- radio = new QRadioTuner;
- radioData = radio->radioData();
- //! [Radio data setup]
-}
-
void MediaExample::AudioProbe()
{
//! [Audio probe]
diff --git a/src/multimedia/doc/src/changes.qdoc b/src/multimedia/doc/src/changes.qdoc
index 65bc88073..fd7188fa3 100644
--- a/src/multimedia/doc/src/changes.qdoc
+++ b/src/multimedia/doc/src/changes.qdoc
@@ -53,7 +53,6 @@ There are a number of new features in Qt Multimedia:
\li More examples and documentation
\li QSound moved from Qt GUI to Qt Multimedia
\li QSoundEffect available to C++ now, as well as QML
-\li FM Radio Data System classes and types now available (\l QRadioData, \l RadioData)
\li Various other API improvements and bugfixes
\endlist
diff --git a/src/multimedia/doc/src/multimedia.qdoc b/src/multimedia/doc/src/multimedia.qdoc
index ad8273612..dcf394c87 100644
--- a/src/multimedia/doc/src/multimedia.qdoc
+++ b/src/multimedia/doc/src/multimedia.qdoc
@@ -28,12 +28,12 @@
/*!
\page multimediaoverview.html
\title Multimedia
-\brief A set of APIs for working with audio, video, radio and camera devices.
+\brief A set of APIs for working with audio, video and camera devices.
Multimedia support in Qt is provided by the \l{Qt Multimedia} module. The Qt
Multimedia module provides a rich feature set that enables you to easily take
advantage of a platform's multimedia capabilities such as media playback and
-the use of camera and radio devices.
+the use of camera devices.
\section1 Features
@@ -44,7 +44,6 @@ Here are some examples of what can be done with Qt Multimedia APIs:
\li Play low latency sound effects
\li Play media files in playlists (such as compressed audio or video files)
\li Record audio and compress it
-\li Tune and listen to radio stations
\li Use a camera, including viewfinder, image capture, and movie recording
\li Play 3D positional audio with \l{Qt Audio Engine QML Types}{Qt Audio Engine}
\li Decode audio media files into memory for processing
@@ -61,7 +60,6 @@ available here:
\li \l {Audio Overview}
\li \l {Video Overview}
\li \l {Camera Overview}
-\li \l {Radio Overview}
\endlist
\section1 Multimedia Recipes
@@ -119,11 +117,6 @@ For some quick recipes, look at the overviews above and consult this table:
\li \l {MediaPlayer}, \l VideoOutput
\li QMediaPlayer, QAbstractVideoSurface, QVideoFrame
\row
- \li Listening to the radio
- \li \l {Declarative Radio Example}{declarative-radio}
- \li \l Radio, \l RadioData
- \li QRadioTuner, QRadioData
- \row
\li Accessing camera viewfinder
\li \l {Camera Example}{camera},
\l {QML Camera Example}{declarative-camera}
diff --git a/src/multimedia/doc/src/qtmultimedia-cpp.qdoc b/src/multimedia/doc/src/qtmultimedia-cpp.qdoc
index 053dd3de7..f75ecbfe2 100644
--- a/src/multimedia/doc/src/qtmultimedia-cpp.qdoc
+++ b/src/multimedia/doc/src/qtmultimedia-cpp.qdoc
@@ -31,7 +31,7 @@
\ingroup modules
\qtvariable multimedia
- \brief The \l {Qt Multimedia} module provides audio, video, radio and camera
+ \brief The \l {Qt Multimedia} module provides audio, video and camera
functionality.
To enable Qt Multimedia in a project, add this directive into the
diff --git a/src/multimedia/doc/src/qtmultimedia-index.qdoc b/src/multimedia/doc/src/qtmultimedia-index.qdoc
index abd6a62cc..13c686978 100644
--- a/src/multimedia/doc/src/qtmultimedia-index.qdoc
+++ b/src/multimedia/doc/src/qtmultimedia-index.qdoc
@@ -28,12 +28,12 @@
/*!
\page qtmultimedia-index.html
\title Qt Multimedia
- \brief The Qt Multimedia module provides APIs for audio, video, radio, and
+ \brief The Qt Multimedia module provides APIs for audio, video and
camera-related functionality.
Qt Multimedia is an essential module that provides a rich set of QML types
and C++ classes to handle multimedia content. It also provides necessary
- APIs to access the camera and radio functionality. The included
+ APIs to access the camera functionality. The included
\l{Qt Audio Engine QML Types}{Qt Audio Engine} provides types for
3D positional audio playback and content management.
@@ -98,9 +98,6 @@
\li Add media playback functionality to a scene. It is same as Audio type,
but can be used for video playback with the VideoOutput type.
\row
- \li \l {QtMultimedia::Radio}{Radio}
- \li Access radio functionality
- \row
\li \l {QtMultimedia::Video}{Video}
\li Add Video playback functionality to a scene. It uses MediaPlayer and
VideoOutput types to provide video playback functionality.
@@ -124,7 +121,7 @@
\li Capture still images with a camera.
\row
\li QMediaRecorder
- \li Record media content from a camera or radio tuner source.
+ \li Record media content from a camera source.
\row
\li QMediaPlayer
\li Playback media from a source.
@@ -153,7 +150,6 @@
\li \l{Audio Overview}
\li \l{Video Overview}
\li \l{Camera Overview}
- \li \l{Radio Overview}
\endlist
\section2 Platform Notes
diff --git a/src/multimedia/doc/src/qtmultimedia5.qdoc b/src/multimedia/doc/src/qtmultimedia5.qdoc
index a2aaa1a80..461cc716f 100644
--- a/src/multimedia/doc/src/qtmultimedia5.qdoc
+++ b/src/multimedia/doc/src/qtmultimedia5.qdoc
@@ -34,7 +34,7 @@
The QML types for \l{Qt Multimedia} support the basic use cases such as:
\list
\li audio and video playback,
- \li access camera and radio functionality,
+ \li access camera functionality,
\li record video,
\li and access camera settings.
\endlist
diff --git a/src/multimedia/doc/src/radiooverview.qdoc b/src/multimedia/doc/src/radiooverview.qdoc
deleted file mode 100644
index 7dcad72d0..000000000
--- a/src/multimedia/doc/src/radiooverview.qdoc
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-
-\page radiooverview.html
-\title Radio Overview
-\brief An API to control system radio tuner
-
-The Qt Multimedia API provides a number of radio related classes for control
-over the radio tuner of the system, and gives access to Radio Data System
-(RDS) information for radio stations that broadcasts it.
-
-\section1 Radio Features
-
-The Radio API consists of two separate components. The radio tuner,
-\l QRadioTuner or the \l Radio QML type, which handles control of
-the radio hardware as well as tuning. The other is the radio data
-component, either \l QRadioData or the \l RadioData QML type, which
-gives access to RDS information.
-
-\section1 Radio Implementation Details
-
-The actual level of support depends on the underlying system support. It should
-be noted that only analog radio is supported, and the properties of the radio
-data component will only be populated if the system radio tuner supports RDS.
-
-\section1 Examples
-
-There are two examples showing the usage of the Radio API. One shows how to use
-the QRadioTuner class from C++. The other shows how to implement a similar
-application using QML and \l Radio.
-
-\section2 Radio Example
-
-This image shows the example using the QRadioTuner API.
-
-\image radio-example.png
-
-The example reads the frequency from the radio tuner, and sets the "Got Signal"
-text based on the signal strength. The buttons allow the user to tune and scan
-up and down the frequency band, while the slider to the side allows volume
-adjustments.
-
-Only the FM frequency band is used in this example.
-
-\section2 Declarative Radio Example
-
-\image declarative-radio-example.png
-
-This example has the same functionality of the regular radio example mentioned
-above, but it includes a nice horizontal dial showing the position of the
-current frequency inside the band.
-
-\section1 Reference documentation
-
-\section2 C++ Classes
-
-\annotatedlist multimedia_radio
-
-\section2 QML Types
-
-\annotatedlist multimedia_radio_qml
-
-*/
diff --git a/src/multimedia/multimedia.pro b/src/multimedia/multimedia.pro
index b783efbe0..55fa9c5c4 100644
--- a/src/multimedia/multimedia.pro
+++ b/src/multimedia/multimedia.pro
@@ -61,7 +61,6 @@ include(audio/audio.pri)
include(camera/camera.pri)
include(controls/controls.pri)
include(playback/playback.pri)
-include(radio/radio.pri)
include(recording/recording.pri)
include(video/video.pri)
diff --git a/src/multimedia/qmediaserviceproviderplugin.h b/src/multimedia/qmediaserviceproviderplugin.h
index 6447e319a..3337b2e72 100644
--- a/src/multimedia/qmediaserviceproviderplugin.h
+++ b/src/multimedia/qmediaserviceproviderplugin.h
@@ -234,16 +234,6 @@ public:
#define Q_MEDIASERVICE_CAMERA "org.qt-project.qt.camera"
/*!
- Service with support for radio tuning.
- Required Controls: QRadioTunerControl
- Recording Controls (Optional, used by QMediaRecorder):
- Required: QMediaRecorderControl
- Recommended: QAudioEncoderSettingsControl
- Optional: QMediaContainerControl
-*/
-#define Q_MEDIASERVICE_RADIO "org.qt-project.qt.radio"
-
-/*!
Service with support for decoding audio.
Required Controls: QAudioDecoderControl
Optional: that streams control
diff --git a/src/multimedia/radio/qradiodata.cpp b/src/multimedia/radio/qradiodata.cpp
deleted file mode 100644
index c795cf389..000000000
--- a/src/multimedia/radio/qradiodata.cpp
+++ /dev/null
@@ -1,479 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qradiodata.h"
-#include "qmediaservice.h"
-#include "qmediaobject_p.h"
-#include "qradiodatacontrol.h"
-#include "qmediaserviceprovider_p.h"
-
-#include <QPair>
-
-
-QT_BEGIN_NAMESPACE
-
-static void qRegisterRadioDataMetaTypes()
-{
- qRegisterMetaType<QRadioData::Error>();
- qRegisterMetaType<QRadioData::ProgramType>();
-}
-
-Q_CONSTRUCTOR_FUNCTION(qRegisterRadioDataMetaTypes)
-
-
-/*!
- \class QRadioData
- \obsolete
- \brief The QRadioData class provides interfaces to the RDS functionality of the system radio.
-
- \inmodule QtMultimedia
- \ingroup multimedia
- \ingroup multimedia_radio
-
- The radio data object will emit signals for any changes in radio data. You can enable or disable
- alternative frequency with setAlternativeFrequenciesEnabled().
-
- You can get a QRadioData instance fromt the \l{QRadioTuner::radioData()}{radioData}
- property from a QRadioTuner instance.
-
- \snippet multimedia-snippets/media.cpp Radio data setup
-
- Alternatively, you can pass an instance of QRadioTuner to the constructor to QRadioData.
-
- \sa {Radio Overview}
-
-*/
-
-
-class QRadioDataPrivate
-{
- Q_DECLARE_NON_CONST_PUBLIC(QRadioData)
-public:
- QRadioDataPrivate();
-
- QMediaObject *mediaObject;
- QRadioDataControl* control;
-
- void _q_serviceDestroyed();
-
- QRadioData *q_ptr;
-};
-
-QRadioDataPrivate::QRadioDataPrivate()
- : mediaObject(nullptr)
- , control(nullptr)
-{}
-
-void QRadioDataPrivate::_q_serviceDestroyed()
-{
- mediaObject = nullptr;
- control = nullptr;
-}
-
-/*!
- Constructs a radio data based on a \a mediaObject and \a parent.
-
- The \a mediaObject should be an instance of \l QRadioTuner. It is preferable to use the
- \l{QRadioTuner::radioData()}{radioData} property on a QRadioTuner instance to get an instance
- of QRadioData.
-
- During construction, this class is bound to the \a mediaObject using the
- \l{QMediaObject::bind()}{bind()} method.
-*/
-
-QRadioData::QRadioData(QMediaObject *mediaObject, QObject *parent)
- : QObject(parent)
- , d_ptr(new QRadioDataPrivate)
-{
- Q_D(QRadioData);
-
- d->q_ptr = this;
-
- if (mediaObject)
- mediaObject->bind(this);
-}
-
-/*!
- Destroys a radio data.
-*/
-
-QRadioData::~QRadioData()
-{
- Q_D(QRadioData);
-
- if (d->mediaObject)
- d->mediaObject->unbind(this);
-
- delete d_ptr;
-}
-
-/*!
- \reimp
-*/
-QMediaObject *QRadioData::mediaObject() const
-{
- return d_func()->mediaObject;
-}
-
-/*!
- \reimp
-*/
-bool QRadioData::setMediaObject(QMediaObject *mediaObject)
-{
- Q_D(QRadioData);
-
- if (d->mediaObject) {
- if (d->control) {
- disconnect(d->control, SIGNAL(stationIdChanged(QString)),
- this, SIGNAL(stationIdChanged(QString)));
- disconnect(d->control, SIGNAL(programTypeChanged(QRadioData::ProgramType)),
- this, SIGNAL(programTypeChanged(QRadioData::ProgramType)));
- disconnect(d->control, SIGNAL(programTypeNameChanged(QString)),
- this, SIGNAL(programTypeNameChanged(QString)));
- disconnect(d->control, SIGNAL(stationNameChanged(QString)),
- this, SIGNAL(stationNameChanged(QString)));
- disconnect(d->control, SIGNAL(radioTextChanged(QString)),
- this, SIGNAL(radioTextChanged(QString)));
- disconnect(d->control, SIGNAL(alternativeFrequenciesEnabledChanged(bool)),
- this, SIGNAL(alternativeFrequenciesEnabledChanged(bool)));
- disconnect(d->control, SIGNAL(error(QRadioData::Error)),
- this, SIGNAL(error(QRadioData::Error)));
-
- QMediaService *service = d->mediaObject->service();
- service->releaseControl(d->control);
- disconnect(service, SIGNAL(destroyed()), this, SLOT(_q_serviceDestroyed()));
- }
- }
-
- d->mediaObject = mediaObject;
-
- if (d->mediaObject) {
- QMediaService *service = mediaObject->service();
- if (service) {
- d->control = qobject_cast<QRadioDataControl*>(service->requestControl(QRadioDataControl_iid));
-
- if (d->control) {
- connect(d->control, SIGNAL(stationIdChanged(QString)),
- this, SIGNAL(stationIdChanged(QString)));
- connect(d->control, SIGNAL(programTypeChanged(QRadioData::ProgramType)),
- this, SIGNAL(programTypeChanged(QRadioData::ProgramType)));
- connect(d->control, SIGNAL(programTypeNameChanged(QString)),
- this, SIGNAL(programTypeNameChanged(QString)));
- connect(d->control, SIGNAL(stationNameChanged(QString)),
- this, SIGNAL(stationNameChanged(QString)));
- connect(d->control, SIGNAL(radioTextChanged(QString)),
- this, SIGNAL(radioTextChanged(QString)));
- connect(d->control, SIGNAL(alternativeFrequenciesEnabledChanged(bool)),
- this, SIGNAL(alternativeFrequenciesEnabledChanged(bool)));
- connect(d->control, SIGNAL(error(QRadioData::Error)),
- this, SIGNAL(error(QRadioData::Error)));
-
- connect(service, SIGNAL(destroyed()), this, SLOT(_q_serviceDestroyed()));
-
- return true;
- }
- }
- }
-
- // without QRadioDataControl discard the media object
- d->mediaObject = nullptr;
- d->control = nullptr;
-
- return false;
-}
-
-/*!
- Returns the availability of the radio data service.
-
- A long as there is a media service which provides radio functionality, then the
- \l{QMultimedia::AvailabilityStatus}{availability} will be that
- of the \l{QRadioTuner::availability()}{radio tuner}.
-*/
-QMultimedia::AvailabilityStatus QRadioData::availability() const
-{
- Q_D(const QRadioData);
-
- if (d->control == nullptr)
- return QMultimedia::ServiceMissing;
-
- return d->mediaObject->availability();
-}
-
-/*!
- \property QRadioData::stationId
- \brief Current Program Identification
-
-*/
-
-QString QRadioData::stationId() const
-{
- Q_D(const QRadioData);
-
- if (d->control != nullptr)
- return d->control->stationId();
- return QString();
-}
-
-/*!
- \property QRadioData::programType
- \brief Current Program Type
-
-*/
-
-QRadioData::ProgramType QRadioData::programType() const
-{
- Q_D(const QRadioData);
-
- if (d->control != nullptr)
- return d->control->programType();
-
- return QRadioData::Undefined;
-}
-
-/*!
- \property QRadioData::programTypeName
- \brief Current Program Type Name
-
-*/
-
-QString QRadioData::programTypeName() const
-{
- Q_D(const QRadioData);
-
- if (d->control != nullptr)
- return d->control->programTypeName();
- return QString();
-}
-
-/*!
- \property QRadioData::stationName
- \brief Current Program Service
-
-*/
-
-QString QRadioData::stationName() const
-{
- Q_D(const QRadioData);
-
- if (d->control != nullptr)
- return d->control->stationName();
- return QString();
-}
-
-/*!
- \property QRadioData::radioText
- \brief Current Radio Text
-
-*/
-
-QString QRadioData::radioText() const
-{
- Q_D(const QRadioData);
-
- if (d->control != nullptr)
- return d->control->radioText();
- return QString();
-}
-
-/*!
- \property QRadioData::alternativeFrequenciesEnabled
- \brief Is Alternative Frequency currently enabled
-
-*/
-
-bool QRadioData::isAlternativeFrequenciesEnabled() const
-{
- Q_D(const QRadioData);
-
- if (d->control != nullptr)
- return d->control->isAlternativeFrequenciesEnabled();
- return false;
-}
-
-void QRadioData::setAlternativeFrequenciesEnabled( bool enabled )
-{
- Q_D(const QRadioData);
-
- if (d->control != nullptr)
- return d->control->setAlternativeFrequenciesEnabled(enabled);
-}
-
-/*!
- Returns the error state of a radio data.
-
- \sa errorString()
-*/
-
-QRadioData::Error QRadioData::error() const
-{
- Q_D(const QRadioData);
-
- if (d->control != nullptr)
- return d->control->error();
- return QRadioData::ResourceError;
-}
-
-/*!
- Returns a description of a radio data's error state.
-
- \sa error()
-*/
-QString QRadioData::errorString() const
-{
- Q_D(const QRadioData);
-
- if (d->control != nullptr)
- return d->control->errorString();
- return QString();
-}
-
-/*!
- \fn void QRadioData::stationIdChanged(QString stationId)
-
- Signals that the Program Identification code has changed to \a stationId
-*/
-
-/*!
- \fn void QRadioData::programTypeChanged(QRadioData::ProgramType programType)
-
- Signals that the Program Type code has changed to \a programType
-*/
-
-/*!
- \fn void QRadioData::programTypeNameChanged(QString programTypeName)
-
- Signals that the Program Type Name has changed to \a programTypeName
-*/
-
-/*!
- \fn void QRadioData::stationNameChanged(QString stationName)
-
- Signals that the Program Service has changed to \a stationName
-*/
-
-/*!
- \fn void QRadioData::alternativeFrequenciesEnabledChanged(bool enabled)
-
- Signals that automatically tuning to alternative frequencies has been
- enabled or disabled according to \a enabled.
-*/
-
-/*!
- \fn void QRadioData::radioTextChanged(QString radioText)
-
- Signals that the Radio Text property has changed to \a radioText
-*/
-
-/*!
- \fn void QRadioData::error(QRadioData::Error error)
-
- Signals that an \a error occurred.
-*/
-
-/*!
- \enum QRadioData::Error
-
- Enumerates radio data error conditions.
-
- \value NoError No errors have occurred.
- \value ResourceError There is no radio service available.
- \value OpenError Unable to open radio device.
- \value OutOfRangeError An attempt to set a frequency or band that is not supported by radio device.
-*/
-
-/*!
- \enum QRadioData::ProgramType
-
- This property holds the type of the currently playing program as transmitted
- by the radio station. The value can be any one of the values defined in the
- table below.
-
- \value Undefined
- \value News
- \value CurrentAffairs
- \value Information
- \value Sport
- \value Education
- \value Drama
- \value Culture
- \value Science
- \value Varied
- \value PopMusic
- \value RockMusic
- \value EasyListening
- \value LightClassical
- \value SeriousClassical
- \value OtherMusic
- \value Weather
- \value Finance
- \value ChildrensProgrammes
- \value SocialAffairs
- \value Religion
- \value PhoneIn
- \value Travel
- \value Leisure
- \value JazzMusic
- \value CountryMusic
- \value NationalMusic
- \value OldiesMusic
- \value FolkMusic
- \value Documentary
- \value AlarmTest
- \value Alarm
- \value Talk
- \value ClassicRock
- \value AdultHits
- \value SoftRock
- \value Top40
- \value Soft
- \value Nostalgia
- \value Classical
- \value RhythmAndBlues
- \value SoftRhythmAndBlues
- \value Language
- \value ReligiousMusic
- \value ReligiousTalk
- \value Personality
- \value Public
- \value College
-*/
-
-QT_END_NAMESPACE
-
-#include "moc_qradiodata.cpp"
diff --git a/src/multimedia/radio/qradiodata.h b/src/multimedia/radio/qradiodata.h
deleted file mode 100644
index ffc8b44ba..000000000
--- a/src/multimedia/radio/qradiodata.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QRADIODATA_H
-#define QRADIODATA_H
-
-#include <QtCore/qobject.h>
-
-#include <QtMultimedia/qmediaobject.h>
-#include <QtMultimedia/qmediabindableinterface.h>
-#include <QtMultimedia/qmediaenumdebug.h>
-
-QT_BEGIN_NAMESPACE
-
-
-class QRadioDataPrivate;
-class Q_MULTIMEDIA_EXPORT QRadioData : public QObject, public QMediaBindableInterface
-{
- Q_OBJECT
- Q_PROPERTY(QString stationId READ stationId NOTIFY stationIdChanged)
- Q_PROPERTY(ProgramType programType READ programType NOTIFY programTypeChanged)
- Q_PROPERTY(QString programTypeName READ programTypeName NOTIFY programTypeNameChanged)
- Q_PROPERTY(QString stationName READ stationName NOTIFY stationNameChanged)
- Q_PROPERTY(QString radioText READ radioText NOTIFY radioTextChanged)
- Q_PROPERTY(bool alternativeFrequenciesEnabled READ isAlternativeFrequenciesEnabled
- WRITE setAlternativeFrequenciesEnabled NOTIFY alternativeFrequenciesEnabledChanged)
- Q_ENUMS(Error)
- Q_ENUMS(ProgramType)
-
- Q_INTERFACES(QMediaBindableInterface)
-
-public:
- enum Error { NoError, ResourceError, OpenError, OutOfRangeError };
-
- enum ProgramType { Undefined = 0, News, CurrentAffairs, Information,
- Sport, Education, Drama, Culture, Science, Varied,
- PopMusic, RockMusic, EasyListening, LightClassical,
- SeriousClassical, OtherMusic, Weather, Finance,
- ChildrensProgrammes, SocialAffairs, Religion,
- PhoneIn, Travel, Leisure, JazzMusic, CountryMusic,
- NationalMusic, OldiesMusic, FolkMusic, Documentary,
- AlarmTest, Alarm, Talk, ClassicRock, AdultHits,
- SoftRock, Top40, Soft, Nostalgia, Classical,
- RhythmAndBlues, SoftRhythmAndBlues, Language,
- ReligiousMusic, ReligiousTalk, Personality, Public,
- College
- };
-
- explicit QRadioData(QMediaObject *mediaObject, QObject *parent = nullptr);
- ~QRadioData();
-
- QMultimedia::AvailabilityStatus availability() const;
-
- QMediaObject *mediaObject() const override;
-
- QString stationId() const;
- ProgramType programType() const;
- QString programTypeName() const;
- QString stationName() const;
- QString radioText() const;
- bool isAlternativeFrequenciesEnabled() const;
-
- Error error() const;
- QString errorString() const;
-
-public Q_SLOTS:
- void setAlternativeFrequenciesEnabled(bool enabled);
-
-Q_SIGNALS:
- void stationIdChanged(QString stationId);
- void programTypeChanged(QRadioData::ProgramType programType);
- void programTypeNameChanged(QString programTypeName);
- void stationNameChanged(QString stationName);
- void radioTextChanged(QString radioText);
- void alternativeFrequenciesEnabledChanged(bool enabled);
-
- void error(QRadioData::Error error);
-
-protected:
- bool setMediaObject(QMediaObject *) override;
-
- QRadioDataPrivate *d_ptr;
-private:
-
- Q_DISABLE_COPY(QRadioData)
- Q_DECLARE_PRIVATE(QRadioData)
- Q_PRIVATE_SLOT(d_func(), void _q_serviceDestroyed())
-};
-
-QT_END_NAMESPACE
-
-Q_DECLARE_METATYPE(QRadioData::Error)
-Q_DECLARE_METATYPE(QRadioData::ProgramType)
-
-Q_MEDIA_ENUM_DEBUG(QRadioData, Error)
-Q_MEDIA_ENUM_DEBUG(QRadioData, ProgramType)
-
-#endif // QRADIOPLAYER_H
diff --git a/src/multimedia/radio/qradiotuner.cpp b/src/multimedia/radio/qradiotuner.cpp
deleted file mode 100644
index ea7fb35f5..000000000
--- a/src/multimedia/radio/qradiotuner.cpp
+++ /dev/null
@@ -1,660 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qradiotuner.h"
-#include "qmediaservice.h"
-#include "qmediaobject_p.h"
-#include "qradiotunercontrol.h"
-#include "qradiodata.h"
-#include "qmediaserviceprovider_p.h"
-
-#include <QPair>
-
-
-QT_BEGIN_NAMESPACE
-
-
-static void qRegisterRadioTunerMetaTypes()
-{
- qRegisterMetaType<QRadioTuner::Band>();
- qRegisterMetaType<QRadioTuner::Error>();
- qRegisterMetaType<QRadioTuner::SearchMode>();
- qRegisterMetaType<QRadioTuner::State>();
- qRegisterMetaType<QRadioTuner::StereoMode>();
-}
-
-Q_CONSTRUCTOR_FUNCTION(qRegisterRadioTunerMetaTypes)
-
-
-/*!
- \class QRadioTuner
- \obsolete
- \brief The QRadioTuner class provides an interface to the systems analog radio device.
-
- \inmodule QtMultimedia
- \ingroup multimedia
- \ingroup multimedia_radio
-
- You can control the systems analog radio device using this interface, for example:
-
- \snippet multimedia-snippets/media.cpp Radio tuner
-
- The radio object will emit signals for any changes in state such as:
- bandChanged(), frequencyChanged(), stereoStatusChanged(), searchingChanged(),
- signalStrengthChanged(), volumeChanged(), mutedChanged().
-
- You can change between the frequency bands using setBand() however it is recommended
- that you check to make sure the band is available first using isBandSupported().
-
- \sa QRadioData, {Radio Overview}
-*/
-
-
-class QRadioTunerPrivate : public QMediaObjectPrivate
-{
-public:
- QRadioTunerPrivate():provider(nullptr), control(nullptr), radioData(nullptr) {}
- QMediaServiceProvider *provider;
- QRadioTunerControl* control;
- QRadioData *radioData;
-};
-
-
-
-/*!
- Constructs a radio tuner based on a media service allocated by the default
- media service provider.
-
- The \a parent is passed to QMediaObject.
-*/
-
-QRadioTuner::QRadioTuner(QObject *parent):
- QMediaObject(*new QRadioTunerPrivate,
- parent,
- QMediaServiceProvider::defaultServiceProvider()->requestService(Q_MEDIASERVICE_RADIO))
-{
- Q_D(QRadioTuner);
-
- d->provider = QMediaServiceProvider::defaultServiceProvider();
-
- if (d->service != nullptr) {
- d->control = qobject_cast<QRadioTunerControl*>(d->service->requestControl(QRadioTunerControl_iid));
- if (d->control != nullptr) {
- connect(d->control, SIGNAL(stateChanged(QRadioTuner::State)), SIGNAL(stateChanged(QRadioTuner::State)));
- connect(d->control, SIGNAL(bandChanged(QRadioTuner::Band)), SIGNAL(bandChanged(QRadioTuner::Band)));
- connect(d->control, SIGNAL(frequencyChanged(int)), SIGNAL(frequencyChanged(int)));
- connect(d->control, SIGNAL(stereoStatusChanged(bool)), SIGNAL(stereoStatusChanged(bool)));
- connect(d->control, SIGNAL(searchingChanged(bool)), SIGNAL(searchingChanged(bool)));
- connect(d->control, SIGNAL(signalStrengthChanged(int)), SIGNAL(signalStrengthChanged(int)));
- connect(d->control, SIGNAL(volumeChanged(int)), SIGNAL(volumeChanged(int)));
- connect(d->control, SIGNAL(mutedChanged(bool)), SIGNAL(mutedChanged(bool)));
- connect(d->control, SIGNAL(stationFound(int,QString)), SIGNAL(stationFound(int,QString)));
- connect(d->control, SIGNAL(antennaConnectedChanged(bool)), SIGNAL(antennaConnectedChanged(bool)));
- connect(d->control, SIGNAL(error(QRadioTuner::Error)), SIGNAL(error(QRadioTuner::Error)));
- }
-
- d->radioData = new QRadioData(this, this);
- }
-}
-
-/*!
- Destroys a radio tuner.
-*/
-
-QRadioTuner::~QRadioTuner()
-{
- Q_D(QRadioTuner);
-
- if (d->radioData)
- delete d->radioData;
-
- if (d->service && d->control)
- d->service->releaseControl(d->control);
-
- d->provider->releaseService(d->service);
-}
-
-/*!
- Returns the availability of the radio tuner.
-*/
-QMultimedia::AvailabilityStatus QRadioTuner::availability() const
-{
- if (d_func()->control == nullptr)
- return QMultimedia::ServiceMissing;
-
- if (!d_func()->control->isAntennaConnected())
- return QMultimedia::ResourceError;
-
- return QMediaObject::availability();
-}
-
-/*!
- \property QRadioTuner::state
- Return the current radio tuner state.
-
- \sa QRadioTuner::State
-*/
-
-QRadioTuner::State QRadioTuner::state() const
-{
- return d_func()->control ?
- d_func()->control->state() : QRadioTuner::StoppedState;
-}
-
-/*!
- \property QRadioTuner::band
- \brief the frequency band a radio tuner is tuned to.
-
- \sa QRadioTuner::Band
-*/
-
-QRadioTuner::Band QRadioTuner::band() const
-{
- Q_D(const QRadioTuner);
-
- if (d->control != nullptr)
- return d->control->band();
-
- return QRadioTuner::FM;
-}
-
-/*!
- \property QRadioTuner::frequency
- \brief the frequency in Hertz a radio tuner is tuned to.
-*/
-
-int QRadioTuner::frequency() const
-{
- Q_D(const QRadioTuner);
-
- if (d->control != nullptr)
- return d->control->frequency();
-
- return 0;
-}
-
-/*!
- Returns the number of Hertz to increment the frequency by when stepping through frequencies
- within a given \a band.
-*/
-
-int QRadioTuner::frequencyStep(QRadioTuner::Band band) const
-{
- Q_D(const QRadioTuner);
-
- if (d->control != nullptr)
- return d->control->frequencyStep(band);
-
- return 0;
-}
-
-/*!
- Returns a frequency \a band's minimum and maximum frequency.
-*/
-
-QPair<int,int> QRadioTuner::frequencyRange(QRadioTuner::Band band) const
-{
- Q_D(const QRadioTuner);
-
- if (d->control != nullptr)
- return d->control->frequencyRange(band);
-
- return qMakePair<int,int>(0,0);
-}
-
-/*!
- \property QRadioTuner::stereo
- \brief whether a radio tuner is receiving a stereo signal.
-*/
-
-bool QRadioTuner::isStereo() const
-{
- Q_D(const QRadioTuner);
-
- if (d->control != nullptr)
- return d->control->isStereo();
-
- return false;
-}
-
-
-/*!
- \property QRadioTuner::stereoMode
- \brief the stereo mode of a radio tuner.
-*/
-
-QRadioTuner::StereoMode QRadioTuner::stereoMode() const
-{
- Q_D(const QRadioTuner);
-
- if (d->control != nullptr)
- return d->control->stereoMode();
-
- return QRadioTuner::Auto;
-}
-
-void QRadioTuner::setStereoMode(QRadioTuner::StereoMode mode)
-{
- Q_D(QRadioTuner);
-
- if (d->control != nullptr)
- return d->control->setStereoMode(mode);
-}
-
-/*!
- Identifies if a frequency \a band is supported by a radio tuner.
-
- Returns true if the band is supported, and false if it is not.
-*/
-
-bool QRadioTuner::isBandSupported(QRadioTuner::Band band) const
-{
- Q_D(const QRadioTuner);
-
- if (d->control != nullptr)
- return d->control->isBandSupported(band);
-
- return false;
-}
-
-/*!
- Activate the radio device.
-*/
-
-void QRadioTuner::start()
-{
- Q_D(const QRadioTuner);
-
- if (d->control != nullptr)
- d->control->start();
-}
-
-/*!
- Deactivate the radio device.
-*/
-
-void QRadioTuner::stop()
-{
- Q_D(const QRadioTuner);
-
- if (d->control != nullptr)
- d->control->stop();
-}
-
-/*!
- \property QRadioTuner::signalStrength
- \brief the strength of the current radio signal as a percentage.
-*/
-
-int QRadioTuner::signalStrength() const
-{
- Q_D(const QRadioTuner);
-
- if (d->control != nullptr)
- return d->control->signalStrength();
-
- return 0;
-}
-
-/*!
- \property QRadioTuner::volume
- \brief the volume of a radio tuner's audio output as a percentage.
-*/
-
-
-int QRadioTuner::volume() const
-{
- Q_D(const QRadioTuner);
-
- if (d->control != nullptr)
- return d->control->volume();
-
- return 0;
-}
-
-/*!
- \property QRadioTuner::muted
- \brief whether a radio tuner's audio output is muted.
-*/
-
-bool QRadioTuner::isMuted() const
-{
- Q_D(const QRadioTuner);
-
- if (d->control != nullptr)
- return d->control->isMuted();
-
- return false;
-}
-
-/*!
- Sets a radio tuner's frequency \a band.
-
- Changing the band will reset the \l frequency to the new band's minimum frequency.
-*/
-
-void QRadioTuner::setBand(QRadioTuner::Band band)
-{
- Q_D(QRadioTuner);
-
- if (d->control != nullptr)
- d->control->setBand(band);
-}
-
-/*!
- Sets a radio tuner's \a frequency.
-
- If the tuner is set to a frequency outside the current \l band, the band will be changed to
- one occupied by the new frequency.
-*/
-
-void QRadioTuner::setFrequency(int frequency)
-{
- Q_D(QRadioTuner);
-
- if (d->control != nullptr)
- d->control->setFrequency(frequency);
-}
-
-void QRadioTuner::setVolume(int volume)
-{
- Q_D(QRadioTuner);
-
- if (d->control != nullptr)
- d->control->setVolume(volume);
-}
-
-void QRadioTuner::setMuted(bool muted)
-{
- Q_D(QRadioTuner);
-
- if (d->control != nullptr)
- d->control->setMuted(muted);
-}
-
-/*!
- \property QRadioTuner::searching
- \brief whether a radio tuner is currently scanning for a signal.
-
- \sa searchForward(), searchBackward(), cancelSearch()
-*/
-
-bool QRadioTuner::isSearching() const
-{
- Q_D(const QRadioTuner);
-
- if (d->control != nullptr)
- return d->control->isSearching();
-
- return false;
-}
-
-/*!
- \property QRadioTuner::antennaConnected
- \brief whether there is an antenna connected
-*/
-bool QRadioTuner::isAntennaConnected() const
-{
- Q_D(const QRadioTuner);
-
- if (d->control != nullptr)
- return d->control->isAntennaConnected();
-
- return false;
-}
-
-/*!
- Starts a forward scan for a signal, starting from the current \l frequency.
-
- \sa searchBackward(), cancelSearch(), searching
-*/
-
-void QRadioTuner::searchForward()
-{
- Q_D(QRadioTuner);
-
- if (d->control != nullptr)
- d->control->searchForward();
-}
-
-/*!
- Starts a backwards scan for a signal, starting from the current \l frequency.
-
- \sa searchForward(), cancelSearch(), searching
-*/
-
-void QRadioTuner::searchBackward()
-{
- Q_D(QRadioTuner);
-
- if (d->control != nullptr)
- d->control->searchBackward();
-}
-
-/*!
- \enum QRadioTuner::SearchMode
-
- Enumerates how the radio tuner should search for stations.
-
- \value SearchFast Use only signal strength when searching.
- \value SearchGetStationId After finding a strong signal, wait for the RDS station id (PI) before continuing.
-*/
-
-/*!
- Search all stations in current band
-
- Emits QRadioTuner::stationFound(int, QString) for every found station.
- After searching is completed, QRadioTuner::searchingChanged(bool) is
- emitted (false). If \a searchMode is set to SearchGetStationId, searching
- waits for station id (PI) on each frequency.
-
- \sa searchForward(), searchBackward(), searching
-*/
-
-void QRadioTuner::searchAllStations(QRadioTuner::SearchMode searchMode)
-{
- Q_D(const QRadioTuner);
-
- if (d->control != nullptr)
- d->control->searchAllStations(searchMode);
-}
-
-/*!
- Stops scanning for a signal.
-
- \sa searchForward(), searchBackward(), searching
-*/
-
-void QRadioTuner::cancelSearch()
-{
- Q_D(QRadioTuner);
-
- if (d->control != nullptr)
- d->control->cancelSearch();
-}
-
-/*!
- Returns the error state of a radio tuner.
-
- \sa errorString()
-*/
-
-QRadioTuner::Error QRadioTuner::error() const
-{
- Q_D(const QRadioTuner);
-
- if (d->control != nullptr)
- return d->control->error();
-
- return QRadioTuner::ResourceError;
-}
-
-/*!
- Returns a description of a radio tuner's error state.
-
- \sa error()
-*/
-
-QString QRadioTuner::errorString() const
-{
- Q_D(const QRadioTuner);
-
- if (d->control != nullptr)
- return d->control->errorString();
-
- return QString();
-}
-
-/*!
- \property QRadioTuner::radioData
- \brief holds an instance of \l QRadioData
-
- The instance of QRadioData is already bound to this instance of QRadioTuner.
-*/
-QRadioData *QRadioTuner::radioData() const
-{
- return d_func()->radioData;
-}
-
-
-/*!
- \fn void QRadioTuner::bandChanged(QRadioTuner::Band band)
-
- Signals a radio tuner's \a band has changed.
-*/
-
-/*!
- \fn void QRadioTuner::frequencyChanged(int frequency)
-
- Signals that the \a frequency a radio tuner is tuned to has changed.
-*/
-
-/*!
- \fn void QRadioTuner::mutedChanged(bool muted)
-
- Signals that the \a muted state of a radio tuner's audio output has changed.
-*/
-
-/*!
- \fn void QRadioTuner::volumeChanged(int volume)
-
- Signals that the \a volume of a radio tuner's audio output has changed.
-*/
-
-/*!
- \fn void QRadioTuner::searchingChanged(bool searching)
-
- Signals that the \a searching state of a radio tuner has changed.
-*/
-
-/*!
- \fn void QRadioTuner::stereoStatusChanged(bool stereo)
-
- Signals that the \a stereo state of a radio tuner has changed.
-*/
-
-/*!
- \fn void QRadioTuner::signalStrengthChanged(int strength)
-
- Signals that the \a strength of the signal received by a radio tuner has changed.
-*/
-
-/*!
- \fn void QRadioTuner::stationFound(int frequency, QString stationId)
-
- Signals that a station was found in \a frequency with \a stationId Program
- Identification code.
-*/
-
-/*!
- \fn void QRadioTuner::error(QRadioTuner::Error error)
-
- Signals that an \a error occurred.
-*/
-
-/*!
- \enum QRadioTuner::State
-
- Enumerates radio tuner states.
-
- \value ActiveState The tuner is started and active.
- \value StoppedState The tuner device is stopped.
-*/
-
-
-/*!
- \enum QRadioTuner::Band
-
- Enumerates radio frequency bands.
-
- \value AM 520 to 1610 kHz, 9 or 10kHz channel spacing, extended 1610 to 1710 kHz
- \value FM 87.5 to 108.0 MHz, except Japan 76-90 MHz
- \value SW 1.711 to 30.0 MHz, divided into 15 bands. 5kHz channel spacing
- \value LW 148.5 to 283.5 kHz, 9kHz channel spacing (Europe, Africa, Asia)
- \value FM2 range not defined, used when area supports more than one FM range.
-*/
-
-/*!
- \enum QRadioTuner::Error
-
- Enumerates radio tuner error conditions.
-
- \value NoError No errors have occurred.
- \value ResourceError There is no radio service available.
- \value OpenError Unable to open radio device.
- \value OutOfRangeError An attempt to set a frequency or band that is not supported by radio device.
-*/
-
-/*!
- \enum QRadioTuner::StereoMode
-
- Enumerates radio tuner policy for receiving stereo signals.
-
- \value ForceStereo Provide stereo mode, converting if required.
- \value ForceMono Provide mono mode, converting if required.
- \value Auto Uses the stereo mode matching the station.
-*/
-
-/*! \fn void QRadioTuner::stateChanged(QRadioTuner::State state)
- This signal is emitted when the state changes to \a state.
- */
-
-QT_END_NAMESPACE
-
-#include "moc_qradiotuner.cpp"
diff --git a/src/multimedia/radio/qradiotuner.h b/src/multimedia/radio/qradiotuner.h
deleted file mode 100644
index f7fbcf6c1..000000000
--- a/src/multimedia/radio/qradiotuner.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QRADIOTUNER_H
-#define QRADIOTUNER_H
-
-#include <QtCore/qobject.h>
-
-#include <QtMultimedia/qmediaobject.h>
-#include <QtMultimedia/qmediaenumdebug.h>
-
-#include <QtCore/qpair.h>
-
-Q_MOC_INCLUDE("QtMultimedia/qradiodata.h")
-
-QT_BEGIN_NAMESPACE
-
-class QRadioData;
-class QRadioTunerPrivate;
-class Q_MULTIMEDIA_EXPORT QRadioTuner : public QMediaObject
-{
- Q_OBJECT
- Q_PROPERTY(State state READ state NOTIFY stateChanged)
- Q_PROPERTY(Band band READ band WRITE setBand NOTIFY bandChanged)
- Q_PROPERTY(int frequency READ frequency WRITE setFrequency NOTIFY frequencyChanged)
- Q_PROPERTY(bool stereo READ isStereo NOTIFY stereoStatusChanged)
- Q_PROPERTY(StereoMode stereoMode READ stereoMode WRITE setStereoMode)
- Q_PROPERTY(int signalStrength READ signalStrength NOTIFY signalStrengthChanged)
- Q_PROPERTY(int volume READ volume WRITE setVolume NOTIFY volumeChanged)
- Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged)
- Q_PROPERTY(bool searching READ isSearching NOTIFY searchingChanged)
- Q_PROPERTY(bool antennaConnected READ isAntennaConnected NOTIFY antennaConnectedChanged)
- Q_PROPERTY(QRadioData *radioData READ radioData CONSTANT)
- Q_ENUMS(State)
- Q_ENUMS(Band)
- Q_ENUMS(Error)
- Q_ENUMS(StereoMode)
- Q_ENUMS(SearchMode)
-
-public:
- enum State { ActiveState, StoppedState };
- enum Band { AM, FM, SW, LW, FM2 };
- enum Error { NoError, ResourceError, OpenError, OutOfRangeError };
- enum StereoMode { ForceStereo, ForceMono, Auto };
- enum SearchMode { SearchFast, SearchGetStationId };
-
- explicit QRadioTuner(QObject *parent = nullptr);
- ~QRadioTuner();
-
- QMultimedia::AvailabilityStatus availability() const override;
-
- State state() const;
-
- Band band() const;
-
- bool isBandSupported(Band b) const;
-
- int frequency() const;
- int frequencyStep(Band band) const;
- QPair<int,int> frequencyRange(Band band) const;
-
- bool isStereo() const;
- void setStereoMode(QRadioTuner::StereoMode mode);
- StereoMode stereoMode() const;
-
- int signalStrength() const;
-
- int volume() const;
- bool isMuted() const;
-
- bool isSearching() const;
-
- bool isAntennaConnected() const;
-
- Error error() const;
- QString errorString() const;
-
- QRadioData *radioData() const;
-
-public Q_SLOTS:
- void searchForward();
- void searchBackward();
- void searchAllStations(QRadioTuner::SearchMode searchMode = QRadioTuner::SearchFast);
- void cancelSearch();
-
- void setBand(Band band);
- void setFrequency(int frequency);
-
- void setVolume(int volume);
- void setMuted(bool muted);
-
- void start();
- void stop();
-
-Q_SIGNALS:
- void stateChanged(QRadioTuner::State state);
- void bandChanged(QRadioTuner::Band band);
- void frequencyChanged(int frequency);
- void stereoStatusChanged(bool stereo);
- void searchingChanged(bool searching);
- void signalStrengthChanged(int signalStrength);
- void volumeChanged(int volume);
- void mutedChanged(bool muted);
- void stationFound(int frequency, QString stationId);
- void antennaConnectedChanged(bool connectionStatus);
-
- void error(QRadioTuner::Error error);
-
-private:
- Q_DISABLE_COPY(QRadioTuner)
- Q_DECLARE_PRIVATE(QRadioTuner)
-};
-
-QT_END_NAMESPACE
-
-Q_DECLARE_METATYPE(QRadioTuner::State)
-Q_DECLARE_METATYPE(QRadioTuner::Band)
-Q_DECLARE_METATYPE(QRadioTuner::Error)
-Q_DECLARE_METATYPE(QRadioTuner::StereoMode)
-Q_DECLARE_METATYPE(QRadioTuner::SearchMode)
-
-Q_MEDIA_ENUM_DEBUG(QRadioTuner, State)
-Q_MEDIA_ENUM_DEBUG(QRadioTuner, Band)
-Q_MEDIA_ENUM_DEBUG(QRadioTuner, Error)
-Q_MEDIA_ENUM_DEBUG(QRadioTuner, StereoMode)
-Q_MEDIA_ENUM_DEBUG(QRadioTuner, SearchMode)
-
-#endif // QRADIOPLAYER_H
diff --git a/src/multimedia/radio/radio.pri b/src/multimedia/radio/radio.pri
deleted file mode 100644
index 41e43faa2..000000000
--- a/src/multimedia/radio/radio.pri
+++ /dev/null
@@ -1,9 +0,0 @@
-INCLUDEPATH += radio
-
-PUBLIC_HEADERS += \
- radio/qradiodata.h \
- radio/qradiotuner.h
-
-SOURCES += \
- radio/qradiodata.cpp \
- radio/qradiotuner.cpp
diff --git a/src/multimedia/recording/qmediarecorder.cpp b/src/multimedia/recording/qmediarecorder.cpp
index 1d562a00e..909cf88bb 100644
--- a/src/multimedia/recording/qmediarecorder.cpp
+++ b/src/multimedia/recording/qmediarecorder.cpp
@@ -71,7 +71,7 @@ QT_BEGIN_NAMESPACE
The QMediaRecorder class is a high level media recording class. It's not
intended to be used alone but for accessing the media recording functions
- of other media objects, like QRadioTuner, or QCamera.
+ of other media objects, like QCamera.
\snippet multimedia-snippets/media.cpp Media recorder
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index 95c004125..8e67cb599 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -51,11 +51,6 @@ unix:!mac:!android {
qtConfig(pulseaudio): SUBDIRS += pulseaudio
qtConfig(alsa): SUBDIRS += alsa
-
- # v4l is turned off because it is not supported in Qt 5
- # qtConfig(linux_v4l) {
- # SUBDIRS += v4l
- # }
}
darwin:!watchos {
diff --git a/src/plugins/v4l/radio/radio.pri b/src/plugins/v4l/radio/radio.pri
deleted file mode 100644
index b8a9f750c..000000000
--- a/src/plugins/v4l/radio/radio.pri
+++ /dev/null
@@ -1,9 +0,0 @@
-INCLUDEPATH += $$PWD
-
-HEADERS += \
- $$PWD/v4lradiocontrol.h \
- $$PWD/v4lradioservice.h
-
-SOURCES += \
- $$PWD/v4lradiocontrol.cpp \
- $$PWD/v4lradioservice.cpp
diff --git a/src/plugins/v4l/radio/v4lradiocontrol.cpp b/src/plugins/v4l/radio/v4lradiocontrol.cpp
deleted file mode 100644
index 5eba1350d..000000000
--- a/src/plugins/v4l/radio/v4lradiocontrol.cpp
+++ /dev/null
@@ -1,536 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "v4lradiocontrol.h"
-#include "v4lradioservice.h"
-
-#include <QtCore/qdebug.h>
-
-#include <fcntl.h>
-
-#include <sys/ioctl.h>
-#include "linux/videodev2.h"
-
-#include <sys/soundcard.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-V4LRadioControl::V4LRadioControl(QObject *parent)
- :QRadioTunerControl(parent)
-{
- fd = -1;
- initRadio();
- muted = false;
- stereo = false;
- m_error = false;
- sig = 0;
- currentBand = QRadioTuner::FM;
- step = 100000;
- scanning = false;
- playTime.restart();
- timer = new QTimer(this);
- timer->setInterval(200);
- connect(timer,SIGNAL(timeout()),this,SLOT(search()));
- timer->start();
-}
-
-V4LRadioControl::~V4LRadioControl()
-{
- timer->stop();
-
- if(fd > 0)
- ::close(fd);
-}
-
-bool V4LRadioControl::isAvailable() const
-{
- return available;
-}
-
-QMultimedia::AvailabilityStatus V4LRadioControl::availability() const
-{
- if (fd > 0)
- return QMultimedia::Available;
- else
- return QMultimedia::ResourceError;
-}
-
-QRadioTuner::State V4LRadioControl::state() const
-{
- return fd > 0 ? QRadioTuner::ActiveState : QRadioTuner::StoppedState;
-}
-
-QRadioTuner::Band V4LRadioControl::band() const
-{
- return currentBand;
-}
-
-bool V4LRadioControl::isBandSupported(QRadioTuner::Band b) const
-{
- QRadioTuner::Band bnd = (QRadioTuner::Band)b;
- switch(bnd) {
- case QRadioTuner::FM:
- if(freqMin <= 87500000 && freqMax >= 108000000)
- return true;
- break;
- case QRadioTuner::LW:
- if(freqMin <= 148500 && freqMax >= 283500)
- return true;
- case QRadioTuner::AM:
- if(freqMin <= 520000 && freqMax >= 1610000)
- return true;
- default:
- if(freqMin <= 1711000 && freqMax >= 30000000)
- return true;
- }
-
- return false;
-}
-
-void V4LRadioControl::setBand(QRadioTuner::Band b)
-{
- if(freqMin <= 87500000 && freqMax >= 108000000 && b == QRadioTuner::FM) {
- // FM 87.5 to 108.0 MHz, except Japan 76-90 MHz
- currentBand = (QRadioTuner::Band)b;
- step = 100000; // 100kHz steps
- emit bandChanged(currentBand);
-
- } else if(freqMin <= 148500 && freqMax >= 283500 && b == QRadioTuner::LW) {
- // LW 148.5 to 283.5 kHz, 9kHz channel spacing (Europe, Africa, Asia)
- currentBand = (QRadioTuner::Band)b;
- step = 1000; // 1kHz steps
- emit bandChanged(currentBand);
-
- } else if(freqMin <= 520000 && freqMax >= 1610000 && b == QRadioTuner::AM) {
- // AM 520 to 1610 kHz, 9 or 10kHz channel spacing, extended 1610 to 1710 kHz
- currentBand = (QRadioTuner::Band)b;
- step = 1000; // 1kHz steps
- emit bandChanged(currentBand);
-
- } else if(freqMin <= 1711000 && freqMax >= 30000000 && b == QRadioTuner::SW) {
- // SW 1.711 to 30.0 MHz, divided into 15 bands. 5kHz channel spacing
- currentBand = (QRadioTuner::Band)b;
- step = 500; // 500Hz steps
- emit bandChanged(currentBand);
- }
- playTime.restart();
-}
-
-int V4LRadioControl::frequency() const
-{
- return currentFreq;
-}
-
-int V4LRadioControl::frequencyStep(QRadioTuner::Band b) const
-{
- int step = 0;
-
- if(b == QRadioTuner::FM)
- step = 100000; // 100kHz steps
- else if(b == QRadioTuner::LW)
- step = 1000; // 1kHz steps
- else if(b == QRadioTuner::AM)
- step = 1000; // 1kHz steps
- else if(b == QRadioTuner::SW)
- step = 500; // 500Hz steps
-
- return step;
-}
-
-QPair<int,int> V4LRadioControl::frequencyRange(QRadioTuner::Band b) const
-{
- if(b == QRadioTuner::AM)
- return qMakePair<int,int>(520000,1710000);
- else if(b == QRadioTuner::FM)
- return qMakePair<int,int>(87500000,108000000);
- else if(b == QRadioTuner::SW)
- return qMakePair<int,int>(1711111,30000000);
- else if(b == QRadioTuner::LW)
- return qMakePair<int,int>(148500,283500);
-
- return qMakePair<int,int>(0,0);
-}
-
-void V4LRadioControl::setFrequency(int frequency)
-{
- qint64 f = frequency;
-
- v4l2_frequency freq;
-
- if(frequency < freqMin)
- f = freqMax;
- if(frequency > freqMax)
- f = freqMin;
-
- if(fd > 0) {
- memset( &freq, 0, sizeof( freq ) );
- // Use the first tuner
- freq.tuner = 0;
- if ( ioctl( fd, VIDIOC_G_FREQUENCY, &freq ) >= 0 ) {
- if(low) {
- // For low, freq in units of 62.5Hz, so convert from Hz to units.
- freq.frequency = (int)(f/62.5);
- } else {
- // For high, freq in units of 62.5kHz, so convert from Hz to units.
- freq.frequency = (int)(f/62500);
- }
- ioctl( fd, VIDIOC_S_FREQUENCY, &freq );
- currentFreq = f;
- playTime.restart();
- emit frequencyChanged(currentFreq);
- }
- }
- playTime.restart();
-}
-
-bool V4LRadioControl::isStereo() const
-{
- return stereo;
-}
-
-QRadioTuner::StereoMode V4LRadioControl::stereoMode() const
-{
- return QRadioTuner::Auto;
-}
-
-void V4LRadioControl::setStereoMode(QRadioTuner::StereoMode mode)
-{
- bool stereo = true;
-
- if(mode == QRadioTuner::ForceMono)
- stereo = false;
-
- v4l2_tuner tuner;
-
- memset( &tuner, 0, sizeof( tuner ) );
-
- if ( ioctl( fd, VIDIOC_G_TUNER, &tuner ) >= 0 ) {
- if(stereo)
- tuner.audmode = V4L2_TUNER_MODE_STEREO;
- else
- tuner.audmode = V4L2_TUNER_MODE_MONO;
-
- if ( ioctl( fd, VIDIOC_S_TUNER, &tuner ) >= 0 ) {
- emit stereoStatusChanged(stereo);
- }
- }
-}
-
-int V4LRadioControl::signalStrength() const
-{
- v4l2_tuner tuner;
-
- // Return the first tuner founds signal strength.
- for ( int index = 0; index < tuners; ++index ) {
- memset( &tuner, 0, sizeof( tuner ) );
- tuner.index = index;
- if ( ioctl( fd, VIDIOC_G_TUNER, &tuner ) < 0 )
- continue;
- if ( tuner.type != V4L2_TUNER_RADIO )
- continue;
- // percentage signal strength
- return tuner.signal*100/65535;
- }
-
- return 0;
-}
-
-int V4LRadioControl::volume() const
-{
- v4l2_queryctrl queryctrl;
-
- if(fd > 0) {
- memset( &queryctrl, 0, sizeof( queryctrl ) );
- queryctrl.id = V4L2_CID_AUDIO_VOLUME;
- if ( ioctl( fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) {
- if(queryctrl.maximum == 0) {
- return vol;
- } else {
- // percentage volume returned
- return queryctrl.default_value*100/queryctrl.maximum;
- }
- }
- }
- return 0;
-}
-
-void V4LRadioControl::setVolume(int volume)
-{
- v4l2_queryctrl queryctrl;
-
- if(fd > 0) {
- memset( &queryctrl, 0, sizeof( queryctrl ) );
- queryctrl.id = V4L2_CID_AUDIO_VOLUME;
- if ( ioctl( fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) {
- v4l2_control control;
-
- if(queryctrl.maximum > 0) {
- memset( &control, 0, sizeof( control ) );
- control.id = V4L2_CID_AUDIO_VOLUME;
- control.value = volume*queryctrl.maximum/100;
- ioctl( fd, VIDIOC_S_CTRL, &control );
- } else {
- setVol(volume);
- }
- emit volumeChanged(volume);
- }
- }
-}
-
-bool V4LRadioControl::isMuted() const
-{
- return muted;
-}
-
-void V4LRadioControl::setMuted(bool muted)
-{
- v4l2_queryctrl queryctrl;
-
- if(fd > 0) {
- memset( &queryctrl, 0, sizeof( queryctrl ) );
- queryctrl.id = V4L2_CID_AUDIO_MUTE;
- if ( ioctl( fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) {
- v4l2_control control;
- memset( &control, 0, sizeof( control ) );
- control.id = V4L2_CID_AUDIO_MUTE;
- control.value = (muted ? queryctrl.maximum : queryctrl.minimum );
- ioctl( fd, VIDIOC_S_CTRL, &control );
- this->muted = muted;
- emit mutedChanged(muted);
- }
- }
-}
-
-bool V4LRadioControl::isSearching() const
-{
- return scanning;
-}
-
-void V4LRadioControl::cancelSearch()
-{
- scanning = false;
- timer->stop();
-}
-
-void V4LRadioControl::searchForward()
-{
- // Scan up
- if(scanning) {
- cancelSearch();
- return;
- }
- scanning = true;
- forward = true;
- timer->start();
-}
-
-void V4LRadioControl::searchBackward()
-{
- // Scan down
- if(scanning) {
- cancelSearch();
- return;
- }
- scanning = true;
- forward = false;
- timer->start();
-}
-
-void V4LRadioControl::start()
-{
-}
-
-void V4LRadioControl::stop()
-{
-}
-
-QRadioTuner::Error V4LRadioControl::error() const
-{
- if(m_error)
- return QRadioTuner::OpenError;
-
- return QRadioTuner::NoError;
-}
-
-QString V4LRadioControl::errorString() const
-{
- return QString();
-}
-
-void V4LRadioControl::search()
-{
- int signal = signalStrength();
- if(sig != signal) {
- sig = signal;
- emit signalStrengthChanged(sig);
- }
-
- if(!scanning) return;
-
- if (signal > 25) {
- cancelSearch();
- return;
- }
-
- if(forward) {
- setFrequency(currentFreq+step);
- } else {
- setFrequency(currentFreq-step);
- }
-}
-
-bool V4LRadioControl::initRadio()
-{
- v4l2_tuner tuner;
- v4l2_input input;
- v4l2_frequency freq;
- v4l2_capability cap;
-
- low = false;
- available = false;
- freqMin = freqMax = currentFreq = 0;
-
- fd = ::open("/dev/radio0", O_RDWR);
-
- if(fd != -1) {
- // Capabilities
- memset( &cap, 0, sizeof( cap ) );
- if(::ioctl(fd, VIDIOC_QUERYCAP, &cap ) >= 0) {
- if(((cap.capabilities & V4L2_CAP_RADIO) == 0) && ((cap.capabilities & V4L2_CAP_AUDIO) == 0))
- available = true;
- }
-
- // Tuners
- memset( &input, 0, sizeof( input ) );
- tuners = 0;
- for ( ;; ) {
- memset( &input, 0, sizeof( input ) );
- input.index = tuners;
- if ( ioctl( fd, VIDIOC_ENUMINPUT, &input ) < 0 )
- break;
- ++tuners;
- }
-
- // Freq bands
- for ( int index = 0; index < tuners; ++index ) {
- memset( &tuner, 0, sizeof( tuner ) );
- tuner.index = index;
- if ( ioctl( fd, VIDIOC_G_TUNER, &tuner ) < 0 )
- continue;
- if ( tuner.type != V4L2_TUNER_RADIO )
- continue;
- if ( ( tuner.capability & V4L2_TUNER_CAP_LOW ) != 0 ) {
- // Units are 1/16th of a kHz.
- low = true;
- }
- if(low) {
- freqMin = tuner.rangelow * 62.5;
- freqMax = tuner.rangehigh * 62.5;
- } else {
- freqMin = tuner.rangelow * 62500;
- freqMax = tuner.rangehigh * 62500;
- }
- }
-
- // frequency
- memset( &freq, 0, sizeof( freq ) );
- if(::ioctl(fd, VIDIOC_G_FREQUENCY, &freq ) >= 0) {
- if ( ((int)freq.frequency) != -1 ) { // -1 means not set.
- if(low)
- currentFreq = freq.frequency * 62.5;
- else
- currentFreq = freq.frequency * 62500;
- }
- }
-
- // stereo
- bool stereo = false;
- memset( &tuner, 0, sizeof( tuner ) );
- if ( ioctl( fd, VIDIOC_G_TUNER, &tuner ) >= 0 ) {
- if((tuner.rxsubchans & V4L2_TUNER_SUB_STEREO) != 0)
- stereo = true;
- }
-
- vol = getVol();
-
- return true;
- }
- m_error = true;
- emit error();
-
- return false;
-}
-
-void V4LRadioControl::setVol(int v)
-{
- int fd = ::open( "/dev/mixer", O_RDWR, 0 );
- if ( fd < 0 )
- return;
- int volume = v;
- if ( volume < 0 )
- volume = 0;
- else if ( volume > 100 )
- volume = 100;
- vol = volume;
- volume += volume << 8;
- ::ioctl( fd, MIXER_WRITE(SOUND_MIXER_VOLUME), &volume );
- ::close( fd );
-}
-
-int V4LRadioControl::getVol()
-{
- int fd = ::open( "/dev/mixer", O_RDWR, 0 );
- if ( fd >= 0 ) {
- int volume = 0;
- ::ioctl( fd, MIXER_READ(SOUND_MIXER_VOLUME), &volume );
- int left = ( volume & 0xFF );
- int right = ( ( volume >> 8 ) & 0xFF );
- if ( left > right )
- vol = left;
- else
- vol = right;
- ::close( fd );
- return vol;
- }
- return 0;
-}
-
diff --git a/src/plugins/v4l/radio/v4lradiocontrol.h b/src/plugins/v4l/radio/v4lradiocontrol.h
deleted file mode 100644
index ce68ebeec..000000000
--- a/src/plugins/v4l/radio/v4lradiocontrol.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef V4LRADIOCONTROL_H
-#define V4LRADIOCONTROL_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/qtimer.h>
-#include <QtCore/qdatetime.h>
-
-#include <qradiotunercontrol.h>
-
-#if defined(Q_OS_FREEBSD)
-#include <sys/types.h>
-#else
-#include <linux/types.h>
-#endif
-#include <sys/time.h>
-#include <sys/ioctl.h>
-#include <linux/videodev2.h>
-
-QT_USE_NAMESPACE
-
-class V4LRadioService;
-
-class V4LRadioControl : public QRadioTunerControl
-{
- Q_OBJECT
-public:
- V4LRadioControl(QObject *parent = 0);
- ~V4LRadioControl();
-
- bool isAvailable() const;
- QMultimedia::AvailabilityStatus availability() const;
-
- QRadioTuner::State state() const;
-
- QRadioTuner::Band band() const;
- void setBand(QRadioTuner::Band b);
- bool isBandSupported(QRadioTuner::Band b) const;
-
- int frequency() const;
- int frequencyStep(QRadioTuner::Band b) const;
- QPair<int,int> frequencyRange(QRadioTuner::Band b) const;
- void setFrequency(int frequency);
-
- bool isStereo() const;
- QRadioTuner::StereoMode stereoMode() const;
- void setStereoMode(QRadioTuner::StereoMode mode);
-
- int signalStrength() const;
-
- int volume() const;
- void setVolume(int volume);
-
- bool isMuted() const;
- void setMuted(bool muted);
-
- bool isSearching() const;
- void cancelSearch();
-
- void searchForward();
- void searchBackward();
-
- void start();
- void stop();
-
- QRadioTuner::Error error() const;
- QString errorString() const;
-
-private slots:
- void search();
-
-private:
- bool initRadio();
- void setVol(int v);
- int getVol();
-
- int fd;
-
- bool m_error;
- bool muted;
- bool stereo;
- bool low;
- bool available;
- int tuners;
- int step;
- int vol;
- int sig;
- bool scanning;
- bool forward;
- QTimer* timer;
- QRadioTuner::Band currentBand;
- qint64 freqMin;
- qint64 freqMax;
- qint64 currentFreq;
- QTime playTime;
-};
-
-#endif
diff --git a/src/plugins/v4l/radio/v4lradioservice.cpp b/src/plugins/v4l/radio/v4lradioservice.cpp
deleted file mode 100644
index 60356abb7..000000000
--- a/src/plugins/v4l/radio/v4lradioservice.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtCore/qvariant.h>
-#include <QtCore/qdebug.h>
-#include <QtCore/qfile.h>
-#include <QtWidgets/qwidget.h>
-
-#include "v4lradioservice.h"
-#include "v4lradiocontrol.h"
-
-V4LRadioService::V4LRadioService(QObject *parent):
- QMediaService(parent)
-{
- m_control = new V4LRadioControl(this);
-}
-
-V4LRadioService::~V4LRadioService()
-{
-}
-
-QMediaControl *V4LRadioService::requestControl(const char* name)
-{
- if (qstrcmp(name,QRadioTunerControl_iid) == 0)
- return m_control;
-
- return 0;
-}
-
-
-void V4LRadioService::releaseControl(QMediaControl *)
-{
-}
diff --git a/src/plugins/v4l/radio/v4lradioservice.h b/src/plugins/v4l/radio/v4lradioservice.h
deleted file mode 100644
index adf4e3ae3..000000000
--- a/src/plugins/v4l/radio/v4lradioservice.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef V4LRADIOSERVICE_H
-#define V4LRADIOSERVICE_H
-
-#include <QtCore/qobject.h>
-
-#include <qmediaservice.h>
-QT_USE_NAMESPACE
-
-class V4LRadioControl;
-
-class V4LRadioService : public QMediaService
-{
- Q_OBJECT
-
-public:
- V4LRadioService(QObject *parent = 0);
- ~V4LRadioService();
-
- QMediaControl *requestControl(const char* name);
- void releaseControl(QMediaControl *);
-
-private:
- V4LRadioControl *m_control;
-};
-
-#endif
diff --git a/src/plugins/v4l/v4l.json b/src/plugins/v4l/v4l.json
deleted file mode 100644
index 467fd526f..000000000
--- a/src/plugins/v4l/v4l.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Keys": ["v4l"],
- "Services": ["org.qt-project.qt.radio"]
-}
diff --git a/src/plugins/v4l/v4l.pro b/src/plugins/v4l/v4l.pro
deleted file mode 100644
index 28d89e3e9..000000000
--- a/src/plugins/v4l/v4l.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TARGET = qtmedia_v4lengine
-QT += multimedia-private
-
-HEADERS += v4lserviceplugin.h
-SOURCES += v4lserviceplugin.cpp
-
-include(radio/radio.pri)
-
-PLUGIN_TYPE = mediaservice
-PLUGIN_CLASS_NAME = V4LServicePlugin
-load(qt_plugin)
diff --git a/src/plugins/v4l/v4lserviceplugin.cpp b/src/plugins/v4l/v4lserviceplugin.cpp
deleted file mode 100644
index 3a71709c6..000000000
--- a/src/plugins/v4l/v4lserviceplugin.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtCore/qstring.h>
-#include <QtCore/qfile.h>
-#include <QtCore/qdebug.h>
-#include <QtCore/qdir.h>
-
-#include "v4lserviceplugin.h"
-#include "v4lradioservice.h"
-
-#include <qmediaserviceprovider.h>
-
-
-QMediaService* V4LServicePlugin::create(QString const& key)
-{
- if (key == QLatin1String(Q_MEDIASERVICE_RADIO))
- return new V4LRadioService;
-
- return 0;
-}
-
-void V4LServicePlugin::release(QMediaService *service)
-{
- delete service;
-}
-
-QList<QByteArray> V4LServicePlugin::devices(const QByteArray &service) const
-{
- return QList<QByteArray>();
-}
-
-QString V4LServicePlugin::deviceDescription(const QByteArray &service, const QByteArray &device)
-{
- return QString();
-}
diff --git a/src/plugins/v4l/v4lserviceplugin.h b/src/plugins/v4l/v4lserviceplugin.h
deleted file mode 100644
index b1347b407..000000000
--- a/src/plugins/v4l/v4lserviceplugin.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#ifndef V4LSERVICEPLUGIN_H
-#define V4LSERVICEPLUGIN_H
-
-#include <qmediaserviceproviderplugin.h>
-
-QT_USE_NAMESPACE
-
-class V4LServicePlugin : public QMediaServiceProviderPlugin, public QMediaServiceSupportedDevicesInterface
-{
- Q_OBJECT
- Q_INTERFACES(QMediaServiceSupportedDevicesInterface)
- Q_PLUGIN_METADATA(IID "org.qt-project.qt.mediaserviceproviderfactory/5.0" FILE "v4l.json")
-public:
- QMediaService* create(QString const& key);
- void release(QMediaService *service);
-
- QList<QByteArray> devices(const QByteArray &service) const;
- QString deviceDescription(const QByteArray &service, const QByteArray &device);
-};
-
-#endif // V4LSERVICEPLUGIN_H