Restructure the source code a little.

Change-Id: I995b0fb33bdda7f01bf6266c1c50a1b17eba6760
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
This commit is contained in:
Michael Goddard
2012-01-04 16:05:55 +10:00
committed by Qt by Nokia
parent 6ee1977d60
commit 502d3c8eb3
123 changed files with 198 additions and 169 deletions

View File

@@ -0,0 +1,60 @@
INCLUDEPATH += controls
PUBLIC_HEADERS += \
controls/qaudioencodercontrol.h \
controls/qcameracapturebufferformatcontrol.h \
controls/qcameracapturedestinationcontrol.h \
controls/qcameracontrol.h \
controls/qcameraexposurecontrol.h \
controls/qcameraflashcontrol.h \
controls/qcamerafocuscontrol.h \
controls/qcameraimagecapturecontrol.h \
controls/qcameraimageprocessingcontrol.h \
controls/qcameralockscontrol.h \
controls/qimageencodercontrol.h \
controls/qmediabackgroundplaybackcontrol.h \
controls/qmediacontainercontrol.h \
controls/qmediagaplessplaybackcontrol.h \
controls/qmedianetworkaccesscontrol.h \
controls/qmediaplayercontrol.h \
controls/qmediaplaylistcontrol.h \
controls/qmediaplaylistsourcecontrol.h \
controls/qmediarecordercontrol.h \
controls/qmediastreamscontrol.h \
controls/qmetadatareadercontrol.h \
controls/qmetadatawritercontrol.h \
controls/qradiodatacontrol.h \
controls/qradiotunercontrol.h \
controls/qvideodevicecontrol.h \
controls/qvideoencodercontrol.h \
controls/qvideorenderercontrol.h
SOURCES += \
controls/qaudioencodercontrol.cpp \
controls/qcameracapturebufferformatcontrol.cpp \
controls/qcameracapturedestinationcontrol.cpp \
controls/qcameracontrol.cpp \
controls/qcameraexposurecontrol.cpp \
controls/qcameraflashcontrol.cpp \
controls/qcamerafocuscontrol.cpp \
controls/qcameraimagecapturecontrol.cpp \
controls/qcameraimageprocessingcontrol.cpp \
controls/qcameralockscontrol.cpp \
controls/qimageencodercontrol.cpp \
controls/qmediabackgroundplaybackcontrol.cpp \
controls/qmediacontainercontrol.cpp \
controls/qmediagaplessplaybackcontrol.cpp \
controls/qmedianetworkaccesscontrol.cpp \
controls/qmediaplayercontrol.cpp \
controls/qmediaplaylistcontrol.cpp \
controls/qmediaplaylistsourcecontrol.cpp \
controls/qmediarecordercontrol.cpp \
controls/qmediastreamscontrol.cpp \
controls/qmetadatareadercontrol.cpp \
controls/qmetadatawritercontrol.cpp \
controls/qradiodatacontrol.cpp \
controls/qradiotunercontrol.cpp \
controls/qvideodevicecontrol.cpp \
controls/qvideoencodercontrol.cpp \
controls/qvideorenderercontrol.cpp

View File

@@ -0,0 +1,167 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qaudioencodercontrol.h"
#include <QtCore/qstringlist.h>
QT_BEGIN_NAMESPACE
/*!
\class QAudioEncoderControl
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.0
\brief The QAudioEncoderControl class provides access to the settings of a
media service that performs audio encoding.
If a QMediaService supports encoding audio data it will implement
QAudioEncoderControl. This control provides information about the limits
of restricted audio encoder options and allows the selection of a set of
audio encoder settings as specified in a QAudioEncoderSettings object.
The functionality provided by this control is exposed to application code through the
QMediaRecorder class.
The interface name of QAudioEncoderControl is \c com.nokia.Qt.QAudioEncoderControl/1.0 as
defined in QAudioEncoderControl_iid.
\sa QMediaService::requestControl(), QMediaRecorder
*/
/*!
\macro QAudioEncoderControl_iid
\c com.nokia.Qt.AudioEncoderControl/1.0
Defines the interface name of the QAudioEncoderControl class.
\relates QAudioEncoderControl
*/
/*!
Create a new audio encode control object with the given \a parent.
*/
QAudioEncoderControl::QAudioEncoderControl(QObject *parent)
:QMediaControl(parent)
{
}
/*!
Destroys the audio encode control.
*/
QAudioEncoderControl::~QAudioEncoderControl()
{
}
/*!
\fn QAudioEncoderControl::supportedAudioCodecs() const
Returns the list of supported audio codec names.
\since 1.0
*/
/*!
\fn QAudioEncoderControl::codecDescription(const QString &codec) const
Returns description of audio \a codec.
\since 1.0
*/
/*!
\fn QAudioEncoderControl::supportedSampleRates(const QAudioEncoderSettings &settings = QAudioEncoderSettings(),
bool *continuous) const
Returns the list of supported audio sample rates, if known.
If non null audio \a settings parameter is passed,
the returned list is reduced to sample rates supported with partial settings applied.
It can be used for example to query the list of sample rates, supported by specific audio codec.
If the encoder supports arbitrary sample rates within the supported rates range,
*\a continuous is set to true, otherwise *\a continuous is set to false.
\since 1.0
*/
/*!
\fn QAudioEncoderControl::supportedEncodingOptions(const QString &codec) const
Returns the list of \a codec specific audio encoding options.
\since 1.0
*/
/*!
\fn QAudioEncoderControl::encodingOption(const QString &codec, const QString &option) const
Returns the value of audio encoding \a option for \a codec.
\since 1.0
*/
/*!
\fn QAudioEncoderControl::setEncodingOption(const QString &codec, const QString &option, const QVariant &value)
Set the \a codec specific \a option to \a value.
\since 1.0
*/
/*!
\fn QAudioEncoderControl::audioSettings() const
Returns the audio encoder settings.
The returned value may be different tha passed to QAudioEncoderControl::setAudioSettings()
if the settings contains the default or undefined parameters.
In this case if the undefined parameters are already resolved, they should be returned.
\since 1.0
*/
/*!
\fn QAudioEncoderControl::setAudioSettings(const QAudioEncoderSettings &settings)
Sets the selected audio \a settings.
\since 1.0
*/
#include "moc_qaudioencodercontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,95 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QAUDIOENCODERCONTROL_H
#define QAUDIOENCODERCONTROL_H
#include "qmediacontrol.h"
#include "qmediarecorder.h"
#include <QtCore/qlist.h>
#include <QtCore/qpair.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class QStringList;
class QAudioFormat;
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
class Q_MULTIMEDIA_EXPORT QAudioEncoderControl : public QMediaControl
{
Q_OBJECT
public:
virtual ~QAudioEncoderControl();
virtual QStringList supportedAudioCodecs() const = 0;
virtual QString codecDescription(const QString &codecName) const = 0;
virtual QList<int> supportedSampleRates(const QAudioEncoderSettings &settings,
bool *continuous = 0) const = 0;
virtual QAudioEncoderSettings audioSettings() const = 0;
virtual void setAudioSettings(const QAudioEncoderSettings&) = 0;
virtual QStringList supportedEncodingOptions(const QString &codec) const = 0;
virtual QVariant encodingOption(const QString &codec, const QString &name) const = 0;
virtual void setEncodingOption(
const QString &codec, const QString &name, const QVariant &value) = 0;
protected:
QAudioEncoderControl(QObject *parent = 0);
};
#define QAudioEncoderControl_iid "com.nokia.Qt.QAudioEncoderControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QAudioEncoderControl, QAudioEncoderControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif // QAUDIOCAPTUREPROPERTIESCONTROL_H

View File

@@ -0,0 +1,117 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <qcameracapturebufferformatcontrol.h>
QT_BEGIN_NAMESPACE
/*!
\class QCameraCaptureBufferFormatControl
\brief The QCameraCaptureBufferFormatControl class provides a control for setting the capture buffer format.
The format is of type QVideoFrame::PixelFormat.
\inmodule QtMultimedia
\ingroup multimedia-serv
The interface name of QCameraCaptureBufferFormatControl is \c com.nokia.Qt.QCameraCaptureBufferFormatControl/1.0 as
defined in QCameraCaptureBufferFormatControl_iid.
\sa QMediaService::requestControl()
*/
/*!
\macro QCameraCaptureBufferFormatControl_iid
\c com.nokia.Qt.QCameraCaptureBufferFormatControl/1.0
Defines the interface name of the QCameraCaptureBufferFormatControl class.
\relates QCameraCaptureBufferFormatControl
*/
/*!
Constructs a new image buffer capture format control object with the given \a parent
*/
QCameraCaptureBufferFormatControl::QCameraCaptureBufferFormatControl(QObject *parent)
:QMediaControl(parent)
{
}
/*!
Destroys an image buffer capture format control.
*/
QCameraCaptureBufferFormatControl::~QCameraCaptureBufferFormatControl()
{
}
/*!
\fn QCameraCaptureBufferFormatControl::supportedBufferFormats() const
Returns the list of the supported buffer capture formats.
\since 1.2
*/
/*!
\fn QCameraCaptureBufferFormatControl::bufferFormat() const
Returns the current buffer capture format.
\since 1.2
*/
/*!
\fn QCameraCaptureBufferFormatControl::setBufferFormat(QVideoFrame::PixelFormat format)
Sets the buffer capture \a format.
\since 1.2
*/
/*!
\fn QCameraCaptureBufferFormatControl::bufferFormatChanged(QVideoFrame::PixelFormat format)
Signals the buffer image capture format changed to \a format.
\since 1.2
*/
#include "moc_qcameracapturebufferformatcontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,81 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QCAMERACAPTUREBUFFERFORMATCONTROL_H
#define QCAMERACAPTUREBUFFERFORMATCONTROL_H
#include <qmediacontrol.h>
#include <qcameraimagecapture.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class Q_MULTIMEDIA_EXPORT QCameraCaptureBufferFormatControl : public QMediaControl
{
Q_OBJECT
public:
~QCameraCaptureBufferFormatControl();
virtual QList<QVideoFrame::PixelFormat> supportedBufferFormats() const = 0;
virtual QVideoFrame::PixelFormat bufferFormat() const = 0;
virtual void setBufferFormat(QVideoFrame::PixelFormat format) = 0;
Q_SIGNALS:
void bufferFormatChanged(QVideoFrame::PixelFormat);
protected:
QCameraCaptureBufferFormatControl(QObject* parent = 0);
};
#define QCameraCaptureBufferFormatControl_iid "com.nokia.Qt.QCameraCaptureBufferFormatControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QCameraCaptureBufferFormatControl, QCameraCaptureBufferFormatControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif

View File

@@ -0,0 +1,121 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <qcameracapturedestinationcontrol.h>
#include <QtCore/qstringlist.h>
QT_BEGIN_NAMESPACE
/*!
\class QCameraCaptureDestinationControl
\brief The QCameraCaptureDestinationControl class provides a control for setting capture destination.
Depending on backend capabilities capture to file, buffer or both can be supported.
\inmodule QtMultimedia
\ingroup multimedia-serv
The interface name of QCameraCaptureDestinationControl is \c com.nokia.Qt.QCameraCaptureDestinationControl/1.0 as
defined in QCameraCaptureDestinationControl_iid.
\sa QMediaService::requestControl()
*/
/*!
\macro QCameraCaptureDestinationControl_iid
\c com.nokia.Qt.QCameraCaptureDestinationControl/1.0
Defines the interface name of the QCameraCaptureDestinationControl class.
\relates QCameraCaptureDestinationControl
*/
/*!
Constructs a new image capture destination control object with the given \a parent
*/
QCameraCaptureDestinationControl::QCameraCaptureDestinationControl(QObject *parent)
:QMediaControl(parent)
{
}
/*!
Destroys an image capture destination control.
*/
QCameraCaptureDestinationControl::~QCameraCaptureDestinationControl()
{
}
/*!
\fn QCameraCaptureDestinationControl::isCaptureDestinationSupported(QCameraImageCapture::CaptureDestinations destination) const
Returns true if the capture \a destination is supported; and false if it is not.
\since 1.2
*/
/*!
\fn QCameraCaptureDestinationControl::captureDestination() const
Returns the current capture \a destination. The default destination is QCameraImageCapture::CaptureToFile.
\since 1.2
*/
/*!
\fn QCameraCaptureDestinationControl::setCaptureDestination(QCameraImageCapture::CaptureDestinations destination)
Sets the capture \a destination.
\since 1.2
*/
/*!
\fn QCameraCaptureDestinationControl::captureDestinationChanged(QCameraImageCapture::CaptureDestinations destination)
Signals the image capture \a destination changed.
\since 1.2
*/
#include "moc_qcameracapturedestinationcontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,81 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QCAMERACAPTUREDESTINATIONCONTROL_H
#define QCAMERACAPTUREDESTINATIONCONTROL_H
#include <qmediacontrol.h>
#include <qcameraimagecapture.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class Q_MULTIMEDIA_EXPORT QCameraCaptureDestinationControl : public QMediaControl
{
Q_OBJECT
public:
~QCameraCaptureDestinationControl();
virtual bool isCaptureDestinationSupported(QCameraImageCapture::CaptureDestinations destination) const = 0;
virtual QCameraImageCapture::CaptureDestinations captureDestination() const = 0;
virtual void setCaptureDestination(QCameraImageCapture::CaptureDestinations destination) = 0;
Q_SIGNALS:
void captureDestinationChanged(QCameraImageCapture::CaptureDestinations);
protected:
QCameraCaptureDestinationControl(QObject* parent = 0);
};
#define QCameraCaptureDestinationControl_iid "com.nokia.Qt.QCameraCaptureDestinationControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QCameraCaptureDestinationControl, QCameraCaptureDestinationControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif

View File

@@ -0,0 +1,215 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <qcameracontrol.h>
#include "qmediacontrol_p.h"
QT_BEGIN_NAMESPACE
/*!
\class QCameraControl
\brief The QCameraControl class is an abstract base class for
classes that control still cameras or video cameras.
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.1
This service is provided by a QMediaService object via
QMediaService::control(). It is used by QCamera.
The interface name of QCameraControl is \c com.nokia.Qt.QCameraControl/1.0 as
defined in QCameraControl_iid.
\sa QMediaService::requestControl(), QCamera
*/
/*!
\macro QCameraControl_iid
\c com.nokia.Qt.QCameraControl/1.0
Defines the interface name of the QCameraControl class.
\relates QCameraControl
*/
/*!
Constructs a camera control object with \a parent.
*/
QCameraControl::QCameraControl(QObject *parent):
QMediaControl(*new QMediaControlPrivate, parent)
{
}
/*!
Destruct the camera control object.
*/
QCameraControl::~QCameraControl()
{
}
/*!
\fn QCameraControl::state() const
Returns the state of the camera service.
\since 1.1
\sa QCamera::state
*/
/*!
\fn QCameraControl::setState(QCamera::State state)
Sets the camera \a state.
State changes are synchronous and indicate user intention,
while camera status is used as a feedback mechanism to inform application about backend status.
Status changes are reported asynchronously with QCameraControl::statusChanged() signal.
\since 1.1
\sa QCamera::State
*/
/*!
\fn void QCameraControl::stateChanged(QCamera::State state)
Signal emitted when the camera \a state changes.
In most cases the state chage is caused by QCameraControl::setState(),
but if critical error has occurred the state changes to QCamera::UnloadedState.
\since 1.1
*/
/*!
\fn QCameraControl::status() const
Returns the status of the camera service.
\since 1.1
\sa QCamera::state
*/
/*!
\fn void QCameraControl::statusChanged(QCamera::Status status)
Signal emitted when the camera \a status changes.
\since 1.1
*/
/*!
\fn void QCameraControl::error(int error, const QString &errorString)
Signal emitted when an error occurs with error code \a error and
a description of the error \a errorString.
\since 1.1
*/
/*!
\fn Camera::CaptureMode QCameraControl::captureMode() const = 0
Returns the current capture mode.
\since 1.1
*/
/*!
\fn void QCameraControl::setCaptureMode(QCamera::CaptureMode mode) = 0;
Sets the current capture \a mode.
The capture mode changes are synchronous and allowed in any camera state.
If the capture mode is changed while camera is active,
it's recommended to change status to QCamera::LoadedStatus
and start activating the camera in the next event loop
with the status changed to QCamera::StartingStatus.
This allows the capture settings to be applied before camera is started.
Than change the status to QCamera::StartedStatus when the capture mode change is done.
\since 1.1
*/
/*!
\fn bool QCameraControl::isCaptureModeSupported(QCamera::CaptureMode mode) const = 0;
Returns true if the capture \a mode is suported.
\since 1.1
*/
/*!
\fn QCameraControl::captureModeChanged(QCamera::CaptureMode mode)
Signal emitted when the camera capture \a mode changes.
\since 1.1
*/
/*!
\fn bool QCameraControl::canChangeProperty(PropertyChangeType changeType, QCamera::Status status) const
Returns true if backend can effectively apply changing camera properties of \a changeType type
while the camera state is QCamera::Active and camera status matches \a status parameter.
If backend doesn't support applying this change in the active state, it will be stopped
before the settings are changed and restarted after.
Otherwise the backend should apply the change in the current state,
with the camera status indicating the progress, if necessary.
\since 1.1
*/
/*!
\enum QCameraControl::PropertyChangeType
\value CaptureMode Indicates the capture mode is changed.
\value ImageEncodingSettings Image encoder settings are changed, including resolution.
\value VideoEncodingSettings
Video encoder settings are changed, including audio, video and container settings.
\value Viewfinder Viewfinder is changed.
*/
#include "moc_qcameracontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,101 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QCAMERACONTROL_H
#define QCAMERACONTROL_H
#include <qmediacontrol.h>
#include <qmediaobject.h>
#include <qcamera.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class Q_MULTIMEDIA_EXPORT QCameraControl : public QMediaControl
{
Q_OBJECT
public:
enum PropertyChangeType {
CaptureMode = 1,
ImageEncodingSettings = 2,
VideoEncodingSettings = 3,
Viewfinder = 4
};
~QCameraControl();
virtual QCamera::State state() const = 0;
virtual void setState(QCamera::State state) = 0;
virtual QCamera::Status status() const = 0;
virtual QCamera::CaptureMode captureMode() const = 0;
virtual void setCaptureMode(QCamera::CaptureMode) = 0;
virtual bool isCaptureModeSupported(QCamera::CaptureMode mode) const = 0;
virtual bool canChangeProperty(PropertyChangeType changeType, QCamera::Status status) const = 0;
Q_SIGNALS:
void stateChanged(QCamera::State);
void statusChanged(QCamera::Status);
void error(int error, const QString &errorString);
void captureModeChanged(QCamera::CaptureMode);
protected:
QCameraControl(QObject* parent = 0);
};
#define QCameraControl_iid "com.nokia.Qt.QCameraControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QCameraControl, QCameraControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif // QCAMERACONTROL_H

View File

@@ -0,0 +1,252 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <qcameraexposurecontrol.h>
#include "qmediacontrol_p.h"
QT_BEGIN_NAMESPACE
/*!
\class QCameraExposureControl
\brief The QCameraExposureControl class allows controlling camera exposure parameters.
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.1
You can adjust a number of parameters that will affect images and video taken with
the corresponding QCamera object.
There are a number of different parameters that can be adjusted, including:
\table
\row
\header
\
\endtable
The interface name of QCameraExposureControl is \c com.nokia.Qt.QCameraExposureControl/1.0 as
defined in QCameraExposureControl_iid.
\sa QCamera
*/
/*!
\macro QCameraExposureControl_iid
\c com.nokia.Qt.QCameraExposureControl/1.0
Defines the interface name of the QCameraExposureControl class.
\relates QCameraExposureControl
*/
/*!
Constructs a camera exposure control object with \a parent.
*/
QCameraExposureControl::QCameraExposureControl(QObject *parent):
QMediaControl(*new QMediaControlPrivate, parent)
{
}
/*!
Destroys the camera control object.
*/
QCameraExposureControl::~QCameraExposureControl()
{
}
/*!
\fn QCamera::ExposureMode QCameraExposureControl::exposureMode() const
Returns the exposure mode.
\since 1.1
*/
/*!
\fn void QCameraExposureControl::setExposureMode(QCameraExposure::ExposureMode mode)
Set the exposure mode to \a mode.
\since 1.1
*/
/*!
\fn bool QCameraExposureControl::isExposureModeSupported(QCameraExposure::ExposureMode mode) const
Returns true if the exposure \a mode is supported.
\since 1.1
*/
/*!
\fn QCameraExposure::MeteringMode QCameraExposureControl::meteringMode() const
Returns the current metering mode.
\since 1.1
*/
/*!
\fn void QCameraExposureControl::setMeteringMode(QCameraExposure::MeteringMode mode)
Set the metering mode to \a mode.
\since 1.1
*/
/*!
\fn bool QCameraExposureControl::isMeteringModeSupported(QCameraExposure::MeteringMode mode) const
Returns true if the metering \a mode is supported.
\since 1.1
*/
/*!
\enum QCameraExposureControl::ExposureParameter
\value InvalidParameter
Parameter is invalid.
\value ISO
Camera ISO sensitivity, specified as integer value.
\value Aperture
Lens aperture is specified as an qreal F number.
The supported apertures list can change depending on the focal length,
in such a case the exposureParameterRangeChanged() signal is emitted.
\value ShutterSpeed
Shutter speed in seconds, specified as qreal.
\value ExposureCompensation
Exposure compensation, specified as qreal EV value.
\value FlashPower
Manual flash power, specified as qreal value.
Accepted power range is [0..1.0],
with 0 value means no flash and 1.0 corresponds to full flash power.
This value is only used in the \l{QCameraExposure::FlashManual}{manual flash mode}.
\value FlashCompensation
Flash compensation, specified as qreal EV value.
\value ExtendedExposureParameter
The base value for platform specific extended parameters.
For such parameters the sequential values starting from ExtendedExposureParameter shuld be used.
*/
/*!
\enum QCameraExposureControl::ParameterFlag
\value AutomaticValue
Use the automatic values for parameters.
\value ReadOnly
Parameters are read only.
\value ContinuousRange
Parameters are continuous in their range.
*/
/*!
\fn QCameraExposureControl::isParameterSupported(ExposureParameter parameter) const
Returns true is exposure \a parameter is supported by backend.
\since 1.1
*/
/*!
\fn QCameraExposureControl::exposureParameter(ExposureParameter parameter) const
Returns the exposure \a parameter value, or invalid QVariant() if the value is unknown or not supported.
\since 1.1
*/
/*!
\fn QCameraExposureControl::exposureParameterFlags(ExposureParameter parameter) const
Returns the properties of exposure \a parameter.
\since 1.1
*/
/*!
\fn QCameraExposureControl::supportedParameterRange(ExposureParameter parameter) const
Returns the list of supported \a parameter values;
\since 1.1
*/
/*!
\fn bool QCameraExposureControl::setExposureParameter(ExposureParameter parameter, const QVariant& value)
Set the exposure \a parameter to \a value.
If a null or invalid QVariant is passed, backend should choose the value automatically,
and if possible report the actual value to user with QCameraExposureControl::exposureParameter().
Returns true if parameter is supported and value is correct.
\since 1.1
*/
/*!
\fn QCameraExposureControl::extendedParameterName(ExposureParameter parameter)
Returns the extended exposure \a parameter name.
\since 1.1
*/
/*!
\fn void QCameraExposureControl::flashReady(bool ready)
Signal emitted when flash state changes, flash is charged \a ready.
\since 1.1
*/
/*!
\fn void QCameraExposureControl::exposureParameterChanged(int parameter)
Signal emitted when the exposure \a parameter has changed.
\since 1.1
*/
/*!
\fn void QCameraExposureControl::exposureParameterRangeChanged(int parameter)
Signal emitted when the exposure \a parameter range has changed.
\since 1.1
*/
#include "moc_qcameraexposurecontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,124 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QCAMERAEXPOSURECONTROL_H
#define QCAMERAEXPOSURECONTROL_H
#include <qmediacontrol.h>
#include <qmediaobject.h>
#include <qcameraexposure.h>
#include <qcamera.h>
#include <qmediaenumdebug.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class Q_MULTIMEDIA_EXPORT QCameraExposureControl : public QMediaControl
{
Q_OBJECT
Q_ENUMS(ExposureParameter)
public:
~QCameraExposureControl();
enum ExposureParameter {
InvalidParameter = 0,
ISO = 1,
Aperture = 2,
ShutterSpeed = 3,
ExposureCompensation = 4,
FlashPower = 5,
FlashCompensation = 6,
ExtendedExposureParameter = 1000
};
enum ParameterFlag {
AutomaticValue = 0x01,
ReadOnly = 0x02,
ContinuousRange = 0x04
};
Q_DECLARE_FLAGS(ParameterFlags, ParameterFlag)
virtual QCameraExposure::ExposureMode exposureMode() const = 0;
virtual void setExposureMode(QCameraExposure::ExposureMode mode) = 0;
virtual bool isExposureModeSupported(QCameraExposure::ExposureMode mode) const = 0;
virtual QCameraExposure::MeteringMode meteringMode() const = 0;
virtual void setMeteringMode(QCameraExposure::MeteringMode mode) = 0;
virtual bool isMeteringModeSupported(QCameraExposure::MeteringMode mode) const = 0;
virtual bool isParameterSupported(ExposureParameter parameter) const = 0;
virtual QVariant exposureParameter(ExposureParameter parameter) const = 0;
virtual ParameterFlags exposureParameterFlags(ExposureParameter parameter) const = 0;
virtual QVariantList supportedParameterRange(ExposureParameter parameter) const = 0;
virtual bool setExposureParameter(ExposureParameter parameter, const QVariant& value) = 0;
virtual QString extendedParameterName(ExposureParameter parameter) = 0;
Q_SIGNALS:
void flashReady(bool);
void exposureParameterChanged(int parameter);
void exposureParameterRangeChanged(int parameter);
protected:
QCameraExposureControl(QObject* parent = 0);
};
#define QCameraExposureControl_iid "com.nokia.Qt.QCameraExposureControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QCameraExposureControl, QCameraExposureControl_iid)
Q_DECLARE_OPERATORS_FOR_FLAGS(QCameraExposureControl::ParameterFlags)
Q_MEDIA_ENUM_DEBUG(QCameraExposureControl, ExposureParameter)
QT_END_NAMESPACE
QT_END_HEADER
#endif // QCAMERAEXPOSURECONTROL_H

View File

@@ -0,0 +1,141 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <qcameraflashcontrol.h>
#include "qmediacontrol_p.h"
QT_BEGIN_NAMESPACE
/*!
\class QCameraFlashControl
\brief The QCameraFlashControl class allows controlling a camera's flash.
\ingroup multimedia-serv
\inmodule QtMultimedia
\since 1.1
\inmodule QtMultimedia
You can set the type of flash effect used when an image is captured, and test to see
if the flash hardware is ready to fire.
You can retrieve this control from the camera object in the usual way:
Some camera devices may not have flash hardware, or may not be configurable. In that
case, there will be no QCameraFlashControl available.
The interface name of QCameraFlashControl is \c com.nokia.Qt.QCameraFlashControl/1.0 as
defined in QCameraFlashControl_iid.
\sa QCamera
*/
/*!
\macro QCameraFlashControl_iid
\c com.nokia.Qt.QCameraFlashControl/1.0
Defines the interface name of the QCameraFlashControl class.
\relates QCameraFlashControl
*/
/*!
Constructs a camera flash control object with \a parent.
*/
QCameraFlashControl::QCameraFlashControl(QObject *parent):
QMediaControl(*new QMediaControlPrivate, parent)
{
}
/*!
Destroys the camera control object.
*/
QCameraFlashControl::~QCameraFlashControl()
{
}
/*!
\fn QCamera::FlashModes QCameraFlashControl::flashMode() const
Returns the current flash mode.
\since 1.1
*/
/*!
\fn void QCameraFlashControl::setFlashMode(QCameraExposure::FlashModes mode)
Set the current flash \a mode.
Usually a single QCameraExposure::FlashMode flag is used,
but some non conflicting flags combination are also allowed,
like QCameraExposure::FlashManual | QCameraExposure::FlashSlowSyncRearCurtain.
\since 1.1
*/
/*!
\fn QCameraFlashControl::isFlashModeSupported(QCameraExposure::FlashModes mode) const
Return true if the reqested flash \a mode is supported.
Some QCameraExposure::FlashMode values can be combined,
for example QCameraExposure::FlashManual | QCameraExposure::FlashSlowSyncRearCurtain
\since 1.1
*/
/*!
\fn bool QCameraFlashControl::isFlashReady() const
Returns true if flash is charged.
\since 1.1
*/
/*!
\fn void QCameraFlashControl::flashReady(bool ready)
Signal emitted when flash state changes to \a ready.
\since 1.1
*/
#include "moc_qcameraflashcontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,87 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QCAMERAFLASHCONTROL_H
#define QCAMERAFLASHCONTROL_H
#include <qmediacontrol.h>
#include <qmediaobject.h>
#include <qcameraexposure.h>
#include <qcamera.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class Q_MULTIMEDIA_EXPORT QCameraFlashControl : public QMediaControl
{
Q_OBJECT
public:
~QCameraFlashControl();
virtual QCameraExposure::FlashModes flashMode() const = 0;
virtual void setFlashMode(QCameraExposure::FlashModes mode) = 0;
virtual bool isFlashModeSupported(QCameraExposure::FlashModes mode) const = 0;
virtual bool isFlashReady() const = 0;
Q_SIGNALS:
void flashReady(bool);
protected:
QCameraFlashControl(QObject* parent = 0);
};
#define QCameraFlashControl_iid "com.nokia.Qt.QCameraFlashControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QCameraFlashControl, QCameraFlashControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif // QCAMERAFLASHCONTROL_H

View File

@@ -0,0 +1,253 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <qcamerafocuscontrol.h>
#include "qmediacontrol_p.h"
QT_BEGIN_NAMESPACE
/*!
\class QCameraFocusControl
\brief The QCameraFocusControl class supplies control for
focusing related camera parameters.
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.1
The interface name of QCameraFocusControl is \c com.nokia.Qt.QCameraFocusControl/1.0 as
defined in QCameraFocusControl_iid.
\sa QMediaService::requestControl(), QCamera
*/
/*!
\macro QCameraFocusControl_iid
\c com.nokia.Qt.QCameraFocusControl/1.0
Defines the interface name of the QCameraFocusControl class.
\relates QCameraFocusControl
*/
/*!
Constructs a camera control object with \a parent.
*/
QCameraFocusControl::QCameraFocusControl(QObject *parent):
QMediaControl(*new QMediaControlPrivate, parent)
{
}
/*!
Destruct the camera control object.
*/
QCameraFocusControl::~QCameraFocusControl()
{
}
/*!
\fn QCameraFocus::FocusMode QCameraFocusControl::focusMode() const
Returns the focus mode being used.
\since 1.1
*/
/*!
\fn void QCameraFocusControl::setFocusMode(QCameraFocus::FocusMode mode)
Set the focus mode to \a mode.
\since 1.1
*/
/*!
\fn bool QCameraFocusControl::isFocusModeSupported(QCameraFocus::FocusMode mode) const
Returns true if focus \a mode is supported.
\since 1.1
*/
/*!
\fn qreal QCameraFocusControl::maximumOpticalZoom() const
Returns the maximum optical zoom value, or 1.0 if optical zoom is not supported.
\since 1.1
*/
/*!
\fn qreal QCameraFocusControl::maximumDigitalZoom() const
Returns the maximum digital zoom value, or 1.0 if digital zoom is not supported.
\since 1.1
*/
/*!
\fn qreal QCameraFocusControl::opticalZoom() const
Return the current optical zoom value.
\since 1.1
*/
/*!
\fn qreal QCameraFocusControl::digitalZoom() const
Return the current digital zoom value.
\since 1.1
*/
/*!
\fn void QCameraFocusControl::zoomTo(qreal optical, qreal digital)
Sets \a optical and \a digital zoom values.
\since 1.1
*/
/*!
\fn QCameraFocusControl::focusPointMode() const
Returns the camera focus point selection mode.
\since 1.1
*/
/*!
\fn QCameraFocusControl::setFocusPointMode(QCameraFocus::FocusPointMode mode)
Sets the camera focus point selection \a mode.
\since 1.1
*/
/*!
\fn QCameraFocusControl::isFocusPointModeSupported(QCameraFocus::FocusPointMode mode) const
Returns true if the camera focus point \a mode is supported.
\since 1.1
*/
/*!
\fn QCameraFocusControl::customFocusPoint() const
Return the position of custom focus point, in relative frame coordinates:
QPointF(0,0) points to the left top frame point, QPointF(0.5,0.5) points to the frame center.
Custom focus point is used only in FocusPointCustom focus mode.
\since 1.1
*/
/*!
\fn QCameraFocusControl::setCustomFocusPoint(const QPointF &point)
Sets the custom focus \a point.
If camera supports fixed set of focus points,
it should use the nearest supported focus point,
and return the actual focus point with QCameraFocusControl::focusZones().
\since 1.1
\sa QCameraFocusControl::customFocusPoint(), QCameraFocusControl::focusZones()
*/
/*!
\fn QCameraFocusControl::focusZones() const
Returns the list of zones, the camera is using for focusing or focused on.
\since 1.1
*/
/*!
\fn void QCameraFocusControl::opticalZoomChanged(qreal zoom)
Signal emitted when the optical \a zoom value changed.
\since 1.1
*/
/*!
\fn void QCameraFocusControl::digitalZoomChanged(qreal zoom)
Signal emitted when the digital \a zoom value changed.
\since 1.1
*/
/*!
\fn void QCameraFocusControl::maximumOpticalZoomChanged(qreal zoom)
Signal emitted when the maximum supported optical \a zoom value changed.
\since 1.1
*/
/*!
\fn void QCameraFocusControl::maximumDigitalZoomChanged(qreal zoom)
Signal emitted when the maximum supported digital \a zoom value changed.
The maximum supported zoom value can depend on other camera settings,
like capture mode or resolution.
\since 1.1
*/
/*!
\fn QCameraFocusControl::focusZonesChanged()
Signal is emitted when the set of zones, camera focused on is changed.
Usually the zones list is changed when the camera is focused.
\since 1.1
\sa QCameraFocusControl::focusZones()
*/
#include "moc_qcamerafocuscontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,103 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QCAMERAFOCUSCONTROL_H
#define QCAMERAFOCUSCONTROL_H
#include <qmediacontrol.h>
#include <qmediaobject.h>
#include <qcamerafocus.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class Q_MULTIMEDIA_EXPORT QCameraFocusControl : public QMediaControl
{
Q_OBJECT
public:
~QCameraFocusControl();
virtual QCameraFocus::FocusMode focusMode() const = 0;
virtual void setFocusMode(QCameraFocus::FocusMode mode) = 0;
virtual bool isFocusModeSupported(QCameraFocus::FocusMode mode) const = 0;
virtual qreal maximumOpticalZoom() const = 0;
virtual qreal maximumDigitalZoom() const = 0;
virtual qreal opticalZoom() const = 0;
virtual qreal digitalZoom() const = 0;
virtual void zoomTo(qreal optical, qreal digital) = 0;
virtual QCameraFocus::FocusPointMode focusPointMode() const = 0;
virtual void setFocusPointMode(QCameraFocus::FocusPointMode mode) = 0;
virtual bool isFocusPointModeSupported(QCameraFocus::FocusPointMode mode) const = 0;
virtual QPointF customFocusPoint() const = 0;
virtual void setCustomFocusPoint(const QPointF &point) = 0;
virtual QCameraFocusZoneList focusZones() const = 0;
Q_SIGNALS:
void opticalZoomChanged(qreal opticalZoom);
void digitalZoomChanged(qreal digitalZoom);
void focusZonesChanged();
void maximumOpticalZoomChanged(qreal);
void maximumDigitalZoomChanged(qreal);
protected:
QCameraFocusControl(QObject* parent = 0);
};
#define QCameraFocusControl_iid "com.nokia.Qt.QCameraFocusingControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QCameraFocusControl, QCameraFocusControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif // QCAMERAFOCUSCONTROL_H

View File

@@ -0,0 +1,208 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <qcameraimagecapturecontrol.h>
#include <QtCore/qstringlist.h>
QT_BEGIN_NAMESPACE
/*!
\class QCameraImageCaptureControl
\brief The QCameraImageCaptureControl class provides a control interface
for image capture services.
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.1
The interface name of QCameraImageCaptureControl is \c com.nokia.Qt.QCameraImageCaptureControl/1.0 as
defined in QCameraImageCaptureControl_iid.
\sa QMediaService::requestControl()
*/
/*!
\macro QCameraImageCaptureControl_iid
\c com.nokia.Qt.QCameraImageCaptureControl/1.0
Defines the interface name of the QCameraImageCaptureControl class.
\relates QCameraImageCaptureControl
*/
/*!
Constructs a new image capture control object with the given \a parent
*/
QCameraImageCaptureControl::QCameraImageCaptureControl(QObject *parent)
:QMediaControl(parent)
{
}
/*!
Destroys an image capture control.
*/
QCameraImageCaptureControl::~QCameraImageCaptureControl()
{
}
/*!
\fn QCameraImageCaptureControl::isReadyForCapture() const
Identifies if a capture control is ready to perform a capture
immediately (all the resources necessary for image capture are allocated,
hardware initialized, flash is charged, etc).
Returns true if the camera is ready for capture; and false if it is not.
\since 1.1
*/
/*!
\fn QCameraImageCaptureControl::readyForCaptureChanged(bool ready)
Signals that a capture control's \a ready state has changed.
\since 1.1
*/
/*!
\fn QCameraImageCaptureControl::capture(const QString &fileName)
Initiates the capture of an image to \a fileName.
The \a fileName can be relative or empty,
in this case the service should use the system specific place
and file naming scheme.
Returns the capture request id number, which is used later
with imageExposed(), imageCaptured() and imageSaved() signals.
\since 1.1
*/
/*!
\fn QCameraImageCaptureControl::cancelCapture()
Cancel pending capture requests.
\since 1.1
*/
/*!
\fn QCameraImageCaptureControl::imageExposed(int requestId)
Signals that an image with it \a requestId
has just been exposed.
This signal can be used for the shutter sound or other indicaton.
\since 1.1
*/
/*!
\fn QCameraImageCaptureControl::imageCaptured(int requestId, const QImage &preview)
Signals that an image with it \a requestId
has been captured and a \a preview is available.
\since 1.1
*/
/*!
\fn QCameraImageCaptureControl::imageMetadataAvailable(int id, QtMultimedia::MetaData key, const QVariant &value)
Signals that a metadata for an image with request \a id is available.
This signal is emitted for metadata \a value with a \a key listed in QtMultimedia::MetaData enum.
This signal should be emitted between imageExposed and imageSaved signals.
\since 1.2
*/
/*!
\fn QCameraImageCaptureControl::imageMetadataAvailable(int id, const QString &key, const QVariant &value)
Signals that a metadata for an image with request \a id is available.
This signal is emitted for extended metadata \a value with a \a key not listed in QtMultimedia::MetaData enum.
This signal should be emitted between imageExposed and imageSaved signals.
\since 1.2
*/
/*!
\fn QCameraImageCaptureControl::imageAvailable(int requestId, const QVideoFrame &buffer)
Signals that a captured \a buffer with a \a requestId is available.
\since 1.2
*/
/*!
\fn QCameraImageCaptureControl::imageSaved(int requestId, const QString &fileName)
Signals that a captured image with a \a requestId has been saved
to \a fileName.
\since 1.1
*/
/*!
\fn QCameraImageCaptureControl::driveMode() const
Returns the current camera drive mode.
\since 1.1
*/
/*!
\fn QCameraImageCaptureControl::setDriveMode(QCameraImageCapture::DriveMode mode)
Sets the current camera drive \a mode.
\since 1.1
*/
/*!
\fn QCameraImageCaptureControl::error(int id, int error, const QString &errorString)
Signals the capture request \a id failed with \a error code and message \a errorString.
\since 1.1
\sa QCameraImageCapture::Error
*/
#include "moc_qcameraimagecapturecontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,99 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QCAMERAIMAGECAPTURECONTROL_H
#define QCAMERAIMAGECAPTURECONTROL_H
#include <qmediacontrol.h>
#include <qcameraimagecapture.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class QImage;
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
class Q_MULTIMEDIA_EXPORT QCameraImageCaptureControl : public QMediaControl
{
Q_OBJECT
public:
~QCameraImageCaptureControl();
virtual bool isReadyForCapture() const = 0;
virtual QCameraImageCapture::DriveMode driveMode() const = 0;
virtual void setDriveMode(QCameraImageCapture::DriveMode mode) = 0;
virtual int capture(const QString &fileName) = 0;
virtual void cancelCapture() = 0;
Q_SIGNALS:
void readyForCaptureChanged(bool);
void imageExposed(int id);
void imageCaptured(int id, const QImage &preview);
void imageMetadataAvailable(int id, QtMultimedia::MetaData key, const QVariant &value);
void imageMetadataAvailable(int id, const QString &key, const QVariant &value);
void imageAvailable(int id, const QVideoFrame &buffer);
void imageSaved(int id, const QString &fileName);
void error(int id, int error, const QString &errorString);
protected:
QCameraImageCaptureControl(QObject* parent = 0);
};
#define QCameraImageCaptureControl_iid "com.nokia.Qt.QCameraImageCaptureControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QCameraImageCaptureControl, QCameraImageCaptureControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif // QCAMERAIMAGECAPTURECONTROL_H

View File

@@ -0,0 +1,181 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <qcameraimageprocessingcontrol.h>
#include "qmediacontrol_p.h"
QT_BEGIN_NAMESPACE
namespace
{
class QCameraImageProcessingControlPrivateRegisterMetaTypes
{
public:
QCameraImageProcessingControlPrivateRegisterMetaTypes()
{
qRegisterMetaType<QCameraImageProcessingControl::ProcessingParameter>();
}
} _registerMetaTypes;
}
/*!
\class QCameraImageProcessingControl
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.1
\brief The QCameraImageProcessingControl class provides an abstract class
for controlling image processing parameters, like white balance,
contrast, saturation, sharpening and denoising.
The interface name of QCameraImageProcessingControl is \c com.nokia.Qt.QCameraImageProcessingControl/1.0 as
defined in QCameraImageProcessingControl_iid.
\sa QMediaService::requestControl(), QCamera
*/
/*!
\macro QCameraImageProcessingControl_iid
\c com.nokia.Qt.QCameraImageProcessingControl/1.0
Defines the interface name of the QCameraImageProcessingControl class.
\relates QCameraImageProcessingControl
*/
/*!
Constructs an image processing control object with \a parent.
*/
QCameraImageProcessingControl::QCameraImageProcessingControl(QObject *parent):
QMediaControl(*new QMediaControlPrivate, parent)
{
}
/*!
Destruct the image processing control object.
*/
QCameraImageProcessingControl::~QCameraImageProcessingControl()
{
}
/*!
\fn QCameraImageProcessingControl::whiteBalanceMode() const
Return the white balance mode being used.
\since 1.1
*/
/*!
\fn QCameraImageProcessingControl::setWhiteBalanceMode(QCameraImageProcessing::WhiteBalanceMode mode)
Set the white balance mode to \a mode
\since 1.1
*/
/*!
\fn QCameraImageProcessingControl::isWhiteBalanceModeSupported(QCameraImageProcessing::WhiteBalanceMode mode) const
Returns true if the white balance \a mode is supported.
The backend should support at least QCameraImageProcessing::WhiteBalanceAuto mode.
\since 1.1
*/
/*!
\fn bool QCameraImageProcessingControl::isProcessingParameterSupported(ProcessingParameter parameter) const
Returns true if the camera supports adjusting image processing \a parameter.
Usually the the supported settings is static,
but some parameter may not be available depending on other
camera settings, like presets.
In such case the currently supported parameters should be returned.
\since 1.1
*/
/*!
\fn QCameraImageProcessingControl::processingParameter(ProcessingParameter parameter) const
Returns the image processing \a parameter value.
\since 1.1
*/
/*!
\fn QCameraImageProcessingControl::setProcessingParameter(ProcessingParameter parameter, QVariant value)
Sets the image processing \a parameter \a value.
Passing the null or invalid QVariant value allows
backend to choose the suitable parameter value.
The valid values range depends on the parameter type,
for contrast, saturation and brightness value should be
between -100 and 100, the default is 0,
For sharpening and denoising the range is 0..100,
0 for sharpening or denoising disabled
and 100 for maximum sharpening/denoising applied.
\since 1.1
*/
/*!
\enum QCameraImageProcessingControl::ProcessingParameter
\value Contrast
Image contrast.
\value Saturation
Image saturation.
\value Brightness
Image brightness.
\value Sharpening
Amount of sharpening applied.
\value Denoising
Amount of denoising applied.
\value ColorTemperature
Color temperature in K. This value is used when the manual white balance mode is selected.
\value ExtendedParameter
The base value for platform specific extended parameters.
*/
#include "moc_qcameraimageprocessingcontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,100 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QCAMERAIMAGEPROCESSINGCONTROL_H
#define QCAMERAIMAGEPROCESSINGCONTROL_H
#include <qmediacontrol.h>
#include <qmediaobject.h>
#include <qcamera.h>
#include <qmediaenumdebug.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class Q_MULTIMEDIA_EXPORT QCameraImageProcessingControl : public QMediaControl
{
Q_OBJECT
Q_ENUMS(ProcessingParameter)
public:
~QCameraImageProcessingControl();
enum ProcessingParameter {
Contrast = 0,
Saturation = 1,
Brightness = 2,
Sharpening = 3,
Denoising = 4,
ColorTemperature = 5,
ExtendedParameter = 1000
};
virtual QCameraImageProcessing::WhiteBalanceMode whiteBalanceMode() const = 0;
virtual void setWhiteBalanceMode(QCameraImageProcessing::WhiteBalanceMode mode) = 0;
virtual bool isWhiteBalanceModeSupported(QCameraImageProcessing::WhiteBalanceMode) const = 0;
virtual bool isProcessingParameterSupported(ProcessingParameter) const = 0;
virtual QVariant processingParameter(ProcessingParameter parameter) const = 0;
virtual void setProcessingParameter(ProcessingParameter parameter, QVariant value) = 0;
protected:
QCameraImageProcessingControl(QObject* parent = 0);
};
#define QCameraImageProcessingControl_iid "com.nokia.Qt.QCameraImageProcessingControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QCameraImageProcessingControl, QCameraImageProcessingControl_iid)
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QCameraImageProcessingControl::ProcessingParameter)
Q_MEDIA_ENUM_DEBUG(QCameraImageProcessingControl, ProcessingParameter)
QT_END_HEADER
#endif

View File

@@ -0,0 +1,134 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <qcameralockscontrol.h>
#include "qmediacontrol_p.h"
QT_BEGIN_NAMESPACE
/*!
\class QCameraLocksControl
\brief The QCameraLocksControl class is an abstract base class for
classes that control still cameras or video cameras.
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.1
This service is provided by a QMediaService object via
QMediaService::control(). It is used by QCamera.
The interface name of QCameraLocksControl is \c com.nokia.Qt.QCameraLocksControl/1.0 as
defined in QCameraLocksControl_iid.
\sa QMediaService::requestControl(), QCamera
*/
/*!
\macro QCameraLocksControl_iid
\c com.nokia.Qt.QCameraLocksControl/1.0
Defines the interface name of the QCameraLocksControl class.
\relates QCameraLocksControl
*/
/*!
Constructs a camera locks control object with \a parent.
*/
QCameraLocksControl::QCameraLocksControl(QObject *parent):
QMediaControl(*new QMediaControlPrivate, parent)
{
}
/*!
Destruct the camera locks control object.
*/
QCameraLocksControl::~QCameraLocksControl()
{
}
/*!
\fn QCameraLocksControl::supportedLocks() const
Returns the lock types, the camera supports.
\since 1.1
*/
/*!
\fn QCameraLocksControl::lockStatus(QCamera::LockType lock) const
Returns the camera \a lock status.
\since 1.1
*/
/*!
\fn QCameraLocksControl::searchAndLock(QCamera::LockTypes locks)
Request camera \a locks.
\since 1.1
*/
/*!
\fn QCameraLocksControl::unlock(QCamera::LockTypes locks)
Unlock camera \a locks.
\since 1.1
*/
/*!
\fn QCameraLocksControl::lockStatusChanged(QCamera::LockType lock, QCamera::LockStatus status, QCamera::LockChangeReason reason)
Signals the \a lock \a status was changed with a specified \a reason.
\since 1.1
*/
#include "moc_qcameralockscontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,86 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QCAMERALOCKSCONTROL_H
#define QCAMERALOCKSCONTROL_H
#include <qmediacontrol.h>
#include <qmediaobject.h>
#include <qcamera.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class Q_MULTIMEDIA_EXPORT QCameraLocksControl : public QMediaControl
{
Q_OBJECT
public:
~QCameraLocksControl();
virtual QCamera::LockTypes supportedLocks() const = 0;
virtual QCamera::LockStatus lockStatus(QCamera::LockType lock) const = 0;
virtual void searchAndLock(QCamera::LockTypes locks) = 0;
virtual void unlock(QCamera::LockTypes locks) = 0;
Q_SIGNALS:
void lockStatusChanged(QCamera::LockType type, QCamera::LockStatus status, QCamera::LockChangeReason reason);
protected:
QCameraLocksControl(QObject* parent = 0);
};
#define QCameraLocksControl_iid "com.nokia.Qt.QCameraLocksControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QCameraLocksControl, QCameraLocksControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif // QCAMERALOCKSCONTROL_H

View File

@@ -0,0 +1,142 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qimageencodercontrol.h"
#include <QtCore/qstringlist.h>
QT_BEGIN_NAMESPACE
/*!
\class QImageEncoderControl
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.0
\brief The QImageEncoderControl class provides access to the settings of a media service that
performs image encoding.
If a QMediaService supports encoding image data it will implement QImageEncoderControl.
This control allows to \l {setImageSettings()}{set image encoding settings} and
provides functions for quering supported image \l {supportedImageCodecs()}{codecs} and
\l {supportedResolutions()}{resolutions}.
The interface name of QImageEncoderControl is \c com.nokia.Qt.QImageEncoderControl/1.0 as
defined in QImageEncoderControl_iid.
\sa QImageEncoderSettings, QMediaService::requestControl()
*/
/*!
\macro QImageEncoderControl_iid
\c com.nokia.Qt.QImageEncoderControl/1.0
Defines the interface name of the QImageEncoderControl class.
\relates QImageEncoderControl
*/
/*!
Constructs a new image encoder control object with the given \a parent
*/
QImageEncoderControl::QImageEncoderControl(QObject *parent)
:QMediaControl(parent)
{
}
/*!
Destroys the image encoder control.
*/
QImageEncoderControl::~QImageEncoderControl()
{
}
/*!
\fn QImageEncoderControl::supportedResolutions(const QImageEncoderSettings &settings = QImageEncoderSettings(),
bool *continuous = 0) const
Returns a list of supported resolutions.
If non null image \a settings parameter is passed,
the returned list is reduced to resolutions supported with partial settings applied.
It can be used to query the list of resolutions, supported by specific image codec.
If the encoder supports arbitrary resolutions within the supported resolutions range,
*\a continuous is set to true, otherwise *\a continuous is set to false.
\since 1.0
*/
/*!
\fn QImageEncoderControl::supportedImageCodecs() const
Returns a list of supported image codecs.
\since 1.0
*/
/*!
\fn QImageEncoderControl::imageCodecDescription(const QString &codec) const
Returns a description of an image \a codec.
\since 1.0
*/
/*!
\fn QImageEncoderControl::imageSettings() const
Returns the currently used image encoder settings.
The returned value may be different tha passed to QImageEncoderControl::setImageSettings()
if the settings contains the default or undefined parameters.
In this case if the undefined parameters are already resolved, they should be returned.
\since 1.0
*/
/*!
\fn QImageEncoderControl::setImageSettings(const QImageEncoderSettings &settings)
Sets the selected image encoder \a settings.
\since 1.0
*/
#include "moc_qimageencodercontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,91 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QIMAGEENCODERCONTROL_H
#define QIMAGEENCODERCONTROL_H
#include "qmediacontrol.h"
#include "qmediarecorder.h"
#include "qmediaencodersettings.h"
#include <QtCore/qsize.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class QByteArray;
class QStringList;
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
class Q_MULTIMEDIA_EXPORT QImageEncoderControl : public QMediaControl
{
Q_OBJECT
public:
virtual ~QImageEncoderControl();
virtual QStringList supportedImageCodecs() const = 0;
virtual QString imageCodecDescription(const QString &codecName) const = 0;
virtual QList<QSize> supportedResolutions(const QImageEncoderSettings &settings,
bool *continuous = 0) const = 0;
virtual QImageEncoderSettings imageSettings() const = 0;
virtual void setImageSettings(const QImageEncoderSettings &settings) = 0;
protected:
QImageEncoderControl(QObject *parent = 0);
};
#define QImageEncoderControl_iid "com.nokia.Qt.QImageEncoderControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QImageEncoderControl, QImageEncoderControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif

View File

@@ -0,0 +1,149 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmediabackgroundplaybackcontrol.h"
#include "qmediacontrol_p.h"
QT_BEGIN_NAMESPACE
/*!
\class QMediaBackgroundPlaybackControl
\inmodule QtMultimedia
\ingroup multimedia
\since 5.0
\brief The QMediaBackgroundPlaybackControl class provides access to the background playback
related control of a QMediaService.
If a QMediaService can play media in background, it should implement QMediaBackgroundPlaybackControl.
This control provides a means to set the \l {setContextId()}{contextId} for application,
\l {acquire()}{acquire the resource for playback} and \l {release()} {release the playback resource}.
The interface name of QMediaBackgroundPlaybackControl is \c com.nokia.Qt.QMediaBackgroundPlaybackControl/1.0 as
defined in QMediaBackgroundPlaybackControl_iid.
\sa QMediaService::requestControl(), QMediaPlayer
*/
/*!
\macro QMediaBackgroundPlaybackControl_iid
\c com.nokia.Qt.QMediaBackgroundPlaybackControl/1.0
Defines the interface name of the QMediaBackgroundPlaybackControl class.
\relates QMediaBackgroundPlaybackControl
*/
/*!
Destroys a media background playback control.
*/
QMediaBackgroundPlaybackControl::~QMediaBackgroundPlaybackControl()
{
}
/*!
Constructs a new media background playback control with the given \a parent.
*/
QMediaBackgroundPlaybackControl::QMediaBackgroundPlaybackControl(QObject *parent):
QMediaControl(*new QMediaControlPrivate, parent)
{
}
/*!
\fn QMediaBackgroundPlaybackControl::setContextId(const QString& contextId)
Sets the contextId for the application, the last contextId will be released if previously set.
\l {acquire()}{acquire method} will be automatically invoked after setting a new contextId.
contextId is an unique string set by the application and is used by the background daemon to
distinguish and manage different context for different application.
\since 1.0
*/
/*!
\fn QMediaBackgroundPlaybackControl::acquire()
Try to acquire the playback resource for current application
\since 1.0
*/
/*!
\fn QMediaBackgroundPlaybackControl::release()
Give up the playback resource if current applicaiton holds it.
\since 1.0
*/
/*!
\property QMediaBackgroundPlaybackControl::isAcquired()
\brief indicate whether the background playback resource is granted or not
It may take sometime for the backend to actually update this value before the first use.
By default this property is false
\since 1.0
*/
/*!
\fn QMediaBackgroundPlaybackControl::acquired()
Signals that the playback resource is acquired
\since 1.0
*/
/*!
\fn QMediaBackgroundPlaybackControl::lost()
Signals that the playback resource is lost
\since 1.0
*/
#include "moc_qmediabackgroundplaybackcontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,83 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMEDIABACKGROUNDPLAYBACKCONTROL_H
#define QMEDIABACKGROUNDPLAYBACKCONTROL_H
#include "qmediacontrol.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class Q_MULTIMEDIA_EXPORT QMediaBackgroundPlaybackControl : public QMediaControl
{
Q_OBJECT
public:
virtual ~QMediaBackgroundPlaybackControl();
virtual void setContextId(const QString& contextId) = 0;
virtual void acquire() = 0;
virtual void release() = 0;
virtual bool isAcquired() const = 0;
Q_SIGNALS:
void acquired();
void lost();
protected:
QMediaBackgroundPlaybackControl(QObject* parent = 0);
};
#define QMediaBackgroundPlaybackControl_iid "com.nokia.Qt.QMediaBackgroundPlaybackControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QMediaBackgroundPlaybackControl, QMediaBackgroundPlaybackControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif // QMEDIABACKGROUNDPLAYBACKCONTROL_H

View File

@@ -0,0 +1,126 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmediacontainercontrol.h"
QT_BEGIN_NAMESPACE
/*!
\class QMediaContainerControl
\brief The QMediaContainerControl class provides access to the output container format of a QMediaService
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.0
If a QMediaService supports writing encoded data it will implement
QMediaContainerControl. This control provides information about the output
containers supported by a media service and allows one to be selected as
the current output containers.
The functionality provided by this control is exposed to application code
through the QMediaRecorder class.
The interface name of QMediaContainerControl is \c com.nokia.Qt.QMediaContainerControl/1.0 as
defined in QMediaContainerControl_iid.
\sa QMediaService::requestControl(), QMediaRecorder
*/
/*!
\macro QMediaContainerControl_iid
\c com.nokia.Qt.QMediaContainerControl/1.0
Defines the interface name of the QMediaContainerControl class.
\relates QMediaContainerControl
*/
/*!
Constructs a new media container control with the given \a parent.
*/
QMediaContainerControl::QMediaContainerControl(QObject *parent)
:QMediaControl(parent)
{
}
/*!
Destroys a media container control.
*/
QMediaContainerControl::~QMediaContainerControl()
{
}
/*!
\fn QMediaContainerControl::supportedContainers() const
Returns a list of MIME types of supported container formats.
\since 1.0
*/
/*!
\fn QMediaContainerControl::containerMimeType() const
Returns the MIME type of the selected container format.
\since 1.0
*/
/*!
\fn QMediaContainerControl::setContainerMimeType(const QString &mimeType)
Sets the current container format to the format identified by the given \a mimeType.
\since 1.0
*/
/*!
\fn QMediaContainerControl::containerDescription(const QString &mimeType) const
Returns a description of the container format identified by the given \a mimeType.
\since 1.0
*/
#include "moc_qmediacontainercontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,80 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMEDIACONTAINERCONTROL_H
#define QMEDIACONTAINERCONTROL_H
#include "qmediacontrol.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class Q_MULTIMEDIA_EXPORT QMediaContainerControl : public QMediaControl
{
Q_OBJECT
public:
virtual ~QMediaContainerControl();
virtual QStringList supportedContainers() const = 0;
virtual QString containerMimeType() const = 0;
virtual void setContainerMimeType(const QString &formatMimeType) = 0;
virtual QString containerDescription(const QString &formatMimeType) const = 0;
protected:
QMediaContainerControl(QObject *parent = 0);
};
#define QMediaContainerControl_iid "com.nokia.Qt.QMediaContainerControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QMediaContainerControl, QMediaContainerControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif // QMEDIACONTAINERCONTROL_H

View File

@@ -0,0 +1,165 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmediagaplessplaybackcontrol.h"
#include "qmediacontrol_p.h"
/*!
\class QMediaGaplessPlaybackControl
\inmodule QtMultimedia
\ingroup multimedia
\since 5.0
\brief The QMediaGaplessPlaybackControl class provides access to the gapless playback
related control of a QMediaService.
If a QMediaService supports gapless playback it will implement QMediaGaplessPlaybackControl.
This control provides a means to set the \l {setNextMedia()}{next media} or
\l {setCrossfadeTime()}{crossfade time} for smooth transitions between tracks.
The functionality provided by this control is exposed to application
code through the QMediaPlayer class.
The interface name of QMediaGaplessPlaybackControl is
\c com.nokia.Qt.QMediaGaplessPlaybackControl/1.0 as defined in QMediaGaplessPlaybackControl_iid.
\sa QMediaService::requestControl(), QMediaPlayer
*/
/*!
\macro QMediaGaplessPlaybackControl_iid
\c com.nokia.Qt.QMediaGaplessPlaybackControl/1.0
Defines the interface name of the QMediaGaplessPlaybackControl class.
\relates QMediaGaplessPlaybackControl
*/
/*!
Destroys a gapless playback control.
*/
QMediaGaplessPlaybackControl::~QMediaGaplessPlaybackControl()
{
}
/*!
Constructs a new gapless playback control with the given \a parent.
*/
QMediaGaplessPlaybackControl::QMediaGaplessPlaybackControl(QObject *parent):
QMediaControl(*new QMediaControlPrivate, parent)
{
}
/*!
\fn QMediaGaplessPlaybackControl::nextMedia() const
Returns the content of the next media
\since 1.0
*/
/*!
\fn QMediaGaplessPlaybackControl::setNextMedia(const QMediaContent& media)
Sets the next media for smooth transition.
\since 1.0
*/
/*!
\fn QMediaGaplessPlaybackControl::nextMediaChanged(const QMediaContent& media)
Signals that the next media has changed (either explicitly via \l setNextMedia() or when the
player clears the next media while advancing to it).
\since 1.0
\sa nextMedia()
*/
/*!
\fn QMediaGaplessPlaybackControl::advancedToNextMedia()
Signals when the player advances to the next media (the content of next media will be cleared).
\since 1.0
\sa nextMedia()
*/
/*!
\fn QMediaGaplessPlaybackControl::isCrossfadeSupported() const
Indicates whether crossfading is supported or not.
If crossfading is not supported, \l setCrossfadTime() will be ignored and \l crossfadeTime() will
always return 0.
\since 1.0
*/
/*!
\fn QMediaGaplessPlaybackControl::setCrossfadeTime(qreal crossfadeTime)
Sets the crossfade time in seconds for smooth transition.
Positive value means how much time it will take for the next media to transit from silent to
full volume and vice versa for current one. So both current and the next one will be playing
during this period of time.
A crossfade time of zero or negative will result in gapless playback (suitable for some
continuous media).
\since 1.0
*/
/*!
\fn QMediaGaplessPlaybackControl::crossfadeTime() const
Returns current crossfade time in seconds.
\since 1.0
*/
/*!
\fn QMediaGaplessPlaybackControl::crossfadeTimeChanged(qreal crossfadeTime)
Signals that the crossfade time has changed.
\since 1.0
\sa crossfadeTime()
*/

View File

@@ -0,0 +1,82 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMEDIAGAPLESSPLAYBACKCONTROL_H
#define QMEDIAGAPLESSPLAYBACKCONTROL_H
#include "qmediacontrol.h"
#include "qmediacontent.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class Q_MULTIMEDIA_EXPORT QMediaGaplessPlaybackControl : public QMediaControl
{
Q_OBJECT
public:
virtual ~QMediaGaplessPlaybackControl();
virtual QMediaContent nextMedia() const = 0;
virtual void setNextMedia(const QMediaContent &media) = 0;
virtual bool isCrossfadeSupported() const = 0;
virtual qreal crossfadeTime() const = 0;
virtual void setCrossfadeTime(qreal crossfadeTime) = 0;
Q_SIGNALS:
void crossfadeTimeChanged(qreal crossfadeTime);
void nextMediaChanged(const QMediaContent& media);
void advancedToNextMedia();
protected:
QMediaGaplessPlaybackControl(QObject* parent = 0);
};
#define QMediaGaplessPlaybackControl_iid "com.nokia.Qt.QMediaGaplessPlaybackControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QMediaGaplessPlaybackControl, QMediaGaplessPlaybackControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif // QMEDIAGAPLESSPLAYBACKCONTROL_H

View File

@@ -0,0 +1,103 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmedianetworkaccesscontrol.h"
QT_BEGIN_NAMESPACE
/*!
\class QMediaNetworkAccessControl
\preliminary
\brief The QMediaNetworkAccessControl class allows the setting of the Network Access Point for media related activities.
\ingroup multimedia-serv
\inmodule QtMultimedia
\since 1.2
The functionality provided by this control allows the
setting of a Network Access Point.
This control can be used to set a network access for various
network related activities. the exact nature in dependant on the underlying
usage by the supported QMediaObject
*/
QMediaNetworkAccessControl::QMediaNetworkAccessControl(QObject *parent) :
QMediaControl(parent)
{
}
/*!
Destroys a network access control.
*/
QMediaNetworkAccessControl::~QMediaNetworkAccessControl()
{
}
/*!
\fn void QMediaNetworkAccessControl::setConfigurations(const QList<QNetworkConfiguration> &configurations);
\a configurations contains a list of network configurations to be used for network access.
It is assumed the list is given in highest to lowest preference order.
By calling this function all previous configurations will be invalidated
and replaced with the new list.
\since 1.2
*/
/*
\fn QNetworkConfiguration QMediaNetworkAccessControl::currentConfiguration() const
Returns the current active configuration in use.
A default constructed QNetworkConfigration is returned if no user supplied configuration are in use.
*/
/*!
\fn QMediaNetworkAccessControl::configurationChanged(const QNetworkConfiguration &configuration)
This signal is emitted when the current active network configuration changes
to \a configuration.
\since 1.2
*/
#include "moc_qmedianetworkaccesscontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,83 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMEDIANETWORKACCESSCONTROL_H
#define QMEDIANETWORKACCESSCONTROL_H
#include "qmediacontrol.h"
#include <QtCore/qlist.h>
#include <QtNetwork/qnetworkconfiguration.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class Q_MULTIMEDIA_EXPORT QMediaNetworkAccessControl : public QMediaControl
{
Q_OBJECT
public:
virtual ~QMediaNetworkAccessControl();
virtual void setConfigurations(const QList<QNetworkConfiguration> &configuration) = 0;
virtual QNetworkConfiguration currentConfiguration() const = 0;
Q_SIGNALS:
void configurationChanged(const QNetworkConfiguration& configuration);
protected:
QMediaNetworkAccessControl(QObject *parent = 0);
};
#define QMediaNetworkAccessControl_iid "com.nokia.Qt.QMediaNetworkAccessControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QMediaNetworkAccessControl, QMediaNetworkAccessControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif

View File

@@ -0,0 +1,414 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmediaplayercontrol.h"
#include "qmediacontrol_p.h"
#include "qmediaplayer.h"
QT_BEGIN_NAMESPACE
/*!
\class QMediaPlayerControl
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.0
\brief The QMediaPlayerControl class provides access to the media playing
functionality of a QMediaService.
If a QMediaService can play media is will implement QMediaPlayerControl.
This control provides a means to set the \l {setMedia()}{media} to play,
\l {play()}{start}, \l {pause()} {pause} and \l {stop()}{stop} playback,
\l {setPosition()}{seek}, and control the \l {setVolume()}{volume}.
It also provides feedback on the \l {duration()}{duration} of the media,
the current \l {position()}{position}, and \l {bufferStatus()}{buffering}
progress.
The functionality provided by this control is exposed to application
code through the QMediaPlayer class.
The interface name of QMediaPlayerControl is \c com.nokia.Qt.QMediaPlayerControl/1.0 as
defined in QMediaPlayerControl_iid.
\sa QMediaService::requestControl(), QMediaPlayer
*/
/*!
\macro QMediaPlayerControl_iid
\c com.nokia.Qt.QMediaPlayerControl/1.0
Defines the interface name of the QMediaPlayerControl class.
\relates QMediaPlayerControl
*/
/*!
Destroys a media player control.
*/
QMediaPlayerControl::~QMediaPlayerControl()
{
}
/*!
Constructs a new media player control with the given \a parent.
*/
QMediaPlayerControl::QMediaPlayerControl(QObject *parent):
QMediaControl(*new QMediaControlPrivate, parent)
{
}
/*!
\fn QMediaPlayerControl::state() const
Returns the state of a player control.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::stateChanged(QMediaPlayer::State state)
Signals that the \a state of a player control has changed.
\since 1.0
\sa state()
*/
/*!
\fn QMediaPlayerControl::mediaStatus() const
Returns the status of the current media.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::mediaStatusChanged(QMediaPlayer::MediaStatus status)
Signals that the \a status of the current media has changed.
\since 1.0
\sa mediaStatus()
*/
/*!
\fn QMediaPlayerControl::duration() const
Returns the duration of the current media in milliseconds.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::durationChanged(qint64 duration)
Signals that the \a duration of the current media has changed.
\since 1.0
\sa duration()
*/
/*!
\fn QMediaPlayerControl::position() const
Returns the current playback position in milliseconds.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::setPosition(qint64 position)
Sets the playback \a position of the current media. This will initiate a seek and it may take
some time for playback to reach the position set.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::positionChanged(qint64 position)
Signals the playback \a position has changed.
This is only emitted in when there has been a discontinous change in the playback postion, such
as a seek or the position being reset.
\since 1.0
\sa position()
*/
/*!
\fn QMediaPlayerControl::volume() const
Returns the audio volume of a player control.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::setVolume(int volume)
Sets the audio \a volume of a player control.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::volumeChanged(int volume)
Signals the audio \a volume of a player control has changed.
\since 1.0
\sa volume()
*/
/*!
\fn QMediaPlayerControl::isMuted() const
Returns the mute state of a player control.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::setMuted(bool mute)
Sets the \a mute state of a player control.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::mutedChanged(bool mute)
Signals a change in the \a mute status of a player control.
\since 1.0
\sa isMuted()
*/
/*!
\fn QMediaPlayerControl::bufferStatus() const
Returns the buffering progress of the current media. Progress is measured in the percentage
of the buffer filled.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::bufferStatusChanged(int progress)
Signals that buffering \a progress has changed.
\since 1.0
\sa bufferStatus()
*/
/*!
\fn QMediaPlayerControl::isAudioAvailable() const
Identifies if there is audio output available for the current media.
Returns true if audio output is available and false otherwise.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::audioAvailableChanged(bool audio)
Signals that there has been a change in the availability of \a audio output.
\since 1.0
\sa isAudioAvailable()
*/
/*!
\fn QMediaPlayerControl::isVideoAvailable() const
Identifies if there is video output available for the current media.
Returns true if video output is available and false otherwise.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::videoAvailableChanged(bool video)
Signals that there has been a change in the availability of \a video output.
\since 1.0
\sa isVideoAvailable()
*/
/*!
\fn QMediaPlayerControl::isSeekable() const
Identifies if the current media is seekable.
Returns true if it possible to seek within the current media, and false otherwise.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::seekableChanged(bool seekable)
Signals that the \a seekable state of a player control has changed.
\since 1.0
\sa isSeekable()
*/
/*!
\fn QMediaPlayerControl::availablePlaybackRanges() const
Returns a range of times in milliseconds that can be played back.
Usually for local files this is a continuous interval equal to [0..duration()]
or an empty time range if seeking is not supported, but for network sources
it refers to the buffered parts of the media.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::availablePlaybackRangesChanged(const QMediaTimeRange &ranges)
Signals that the available media playback \a ranges have changed.
\since 1.0
\sa QMediaPlayerControl::availablePlaybackRanges()
*/
/*!
\fn qreal QMediaPlayerControl::playbackRate() const
Returns the rate of playback.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::setPlaybackRate(qreal rate)
Sets the \a rate of playback.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::media() const
Returns the current media source.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::mediaStream() const
Returns the current media stream. This is only a valid if a stream was passed to setMedia().
\since 1.0
\sa setMedia()
*/
/*!
\fn QMediaPlayerControl::setMedia(const QMediaContent &media, QIODevice *stream)
Sets the current \a media source. If a \a stream is supplied; data will be read from that
instead of attempting to resolve the media source. The media source may still be used to
supply media information such as mime type.
Setting the media to a null QMediaContent will cause the control to discard all
information relating to the current media source and to cease all I/O operations related
to that media.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::mediaChanged(const QMediaContent& content)
Signals that the current media \a content has changed.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::play()
Starts playback of the current media.
If successful the player control will immediately enter the \l {QMediaPlayer::PlayingState}
{playing} state.
\since 1.0
\sa state()
*/
/*!
\fn QMediaPlayerControl::pause()
Pauses playback of the current media.
If sucessful the player control will immediately enter the \l {QMediaPlayer::PausedState}
{paused} state.
\since 1.0
\sa state(), play(), stop()
*/
/*!
\fn QMediaPlayerControl::stop()
Stops playback of the current media.
If successful the player control will immediately enter the \l {QMediaPlayer::StoppedState}
{stopped} state.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::error(int error, const QString &errorString)
Signals that an \a error has occurred. The \a errorString provides a more detailed explanation.
\since 1.0
*/
/*!
\fn QMediaPlayerControl::playbackRateChanged(qreal rate)
Signal emitted when playback rate changes to \a rate.
\since 1.0
*/
#include "moc_qmediaplayercontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,131 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMEDIAPLAYERCONTROL_H
#define QMEDIAPLAYERCONTROL_H
#include "qmediacontrol.h"
#include "qmediaplayer.h"
#include "qmediatimerange.h"
#include <QtCore/qpair.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class QMediaPlaylist;
class Q_MULTIMEDIA_EXPORT QMediaPlayerControl : public QMediaControl
{
Q_OBJECT
public:
~QMediaPlayerControl();
virtual QMediaPlayer::State state() const = 0;
virtual QMediaPlayer::MediaStatus mediaStatus() const = 0;
virtual qint64 duration() const = 0;
virtual qint64 position() const = 0;
virtual void setPosition(qint64 position) = 0;
virtual int volume() const = 0;
virtual void setVolume(int volume) = 0;
virtual bool isMuted() const = 0;
virtual void setMuted(bool muted) = 0;
virtual int bufferStatus() const = 0;
virtual bool isAudioAvailable() const = 0;
virtual bool isVideoAvailable() const = 0;
virtual bool isSeekable() const = 0;
virtual QMediaTimeRange availablePlaybackRanges() const = 0;
virtual qreal playbackRate() const = 0;
virtual void setPlaybackRate(qreal rate) = 0;
virtual QMediaContent media() const = 0;
virtual const QIODevice *mediaStream() const = 0;
virtual void setMedia(const QMediaContent &media, QIODevice *stream) = 0;
virtual void play() = 0;
virtual void pause() = 0;
virtual void stop() = 0;
Q_SIGNALS:
void mediaChanged(const QMediaContent& content);
void durationChanged(qint64 duration);
void positionChanged(qint64 position);
void stateChanged(QMediaPlayer::State newState);
void mediaStatusChanged(QMediaPlayer::MediaStatus status);
void volumeChanged(int volume);
void mutedChanged(bool muted);
void audioAvailableChanged(bool audioAvailable);
void videoAvailableChanged(bool videoAvailable);
void bufferStatusChanged(int percentFilled);
void seekableChanged(bool);
void availablePlaybackRangesChanged(const QMediaTimeRange&);
void playbackRateChanged(qreal rate);
void error(int error, const QString &errorString);
protected:
QMediaPlayerControl(QObject* parent = 0);
};
#define QMediaPlayerControl_iid "com.nokia.Qt.QMediaPlayerControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QMediaPlayerControl, QMediaPlayerControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif // QMEDIAPLAYERCONTROL_H

View File

@@ -0,0 +1,219 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmediaplaylistcontrol.h"
#include "qmediacontrol_p.h"
QT_BEGIN_NAMESPACE
/*!
\class QMediaPlaylistControl
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.0
\brief The QMediaPlaylistControl class provides access to the playlist
functionality of a QMediaService.
If a QMediaService contains an internal playlist it will implement
QMediaPlaylistControl. This control provides access to the contents of the
\l {playlistProvider()}{playlist}, as well as the \l
{currentIndex()}{position} of the current media, and a means of navigating
to the \l {next()}{next} and \l {previous()}{previous} media.
The functionality provided by the control is exposed to application code
through the QMediaPlaylist class.
The interface name of QMediaPlaylistControl is \c com.nokia.Qt.QMediaPlaylistControl/1.0 as
defined in QMediaPlaylistControl_iid.
\sa QMediaService::requestControl(), QMediaPlayer
*/
/*!
\macro QMediaPlaylistControl_iid
\c com.nokia.Qt.QMediaPlaylistControl/1.0
Defines the interface name of the QMediaPlaylistControl class.
\relates QMediaPlaylistControl
*/
/*!
Create a new playlist control object with the given \a parent.
*/
QMediaPlaylistControl::QMediaPlaylistControl(QObject *parent):
QMediaControl(*new QMediaControlPrivate, parent)
{
}
/*!
Destroys the playlist control.
*/
QMediaPlaylistControl::~QMediaPlaylistControl()
{
}
/*!
\fn QMediaPlaylistControl::playlistProvider() const
Returns the playlist used by this media player.
\since 1.0
*/
/*!
\fn QMediaPlaylistControl::setPlaylistProvider(QMediaPlaylistProvider *playlist)
Set the playlist of this media player to \a playlist.
In many cases it is possible just to use the playlist
constructed by player, but sometimes replacing the whole
playlist allows to avoid copyting of all the items bettween playlists.
Returns true if player can use this passed playlist; otherwise returns false.
\since 1.0
*/
/*!
\fn QMediaPlaylistControl::currentIndex() const
Returns position of the current media source in the playlist.
\since 1.0
*/
/*!
\fn QMediaPlaylistControl::setCurrentIndex(int position)
Jump to the item at the given \a position.
\since 1.0
*/
/*!
\fn QMediaPlaylistControl::nextIndex(int step) const
Returns the index of item, which were current after calling next()
\a step times.
Returned value depends on the size of playlist, current position
and playback mode.
\since 1.0
\sa QMediaPlaylist::playbackMode
*/
/*!
\fn QMediaPlaylistControl::previousIndex(int step) const
Returns the index of item, which were current after calling previous()
\a step times.
\since 1.0
\sa QMediaPlaylist::playbackMode
*/
/*!
\fn QMediaPlaylistControl::next()
Moves to the next item in playlist.
\since 1.0
*/
/*!
\fn QMediaPlaylistControl::previous()
Returns to the previous item in playlist.
\since 1.0
*/
/*!
\fn QMediaPlaylistControl::playbackMode() const
Returns the playlist navigation mode.
\since 1.0
\sa QMediaPlaylist::PlaybackMode
*/
/*!
\fn QMediaPlaylistControl::setPlaybackMode(QMediaPlaylist::PlaybackMode mode)
Sets the playback \a mode.
\since 1.0
\sa QMediaPlaylist::PlaybackMode
*/
/*!
\fn QMediaPlaylistControl::playlistProviderChanged()
Signal emitted when the playlist provider has changed.
\since 1.0
*/
/*!
\fn QMediaPlaylistControl::currentIndexChanged(int position)
Signal emitted when the playlist \a position is changed.
\since 1.0
*/
/*!
\fn QMediaPlaylistControl::playbackModeChanged(QMediaPlaylist::PlaybackMode mode)
Signal emitted when the playback \a mode is changed.
\since 1.0
*/
/*!
\fn QMediaPlaylistControl::currentMediaChanged(const QMediaContent& content)
Signal emitted when current media changes to \a content.
\since 1.0
*/
#include "moc_qmediaplaylistcontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,98 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMEDIAPLAYLISTCONTROL_H
#define QMEDIAPLAYLISTCONTROL_H
#include "qmediacontrol.h"
#include "qmediaplaylistnavigator.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class QMediaPlaylistProvider;
class Q_MULTIMEDIA_EXPORT QMediaPlaylistControl : public QMediaControl
{
Q_OBJECT
public:
virtual ~QMediaPlaylistControl();
virtual QMediaPlaylistProvider* playlistProvider() const = 0;
virtual bool setPlaylistProvider(QMediaPlaylistProvider *playlist) = 0;
virtual int currentIndex() const = 0;
virtual void setCurrentIndex(int position) = 0;
virtual int nextIndex(int steps) const = 0;
virtual int previousIndex(int steps) const = 0;
virtual void next() = 0;
virtual void previous() = 0;
virtual QMediaPlaylist::PlaybackMode playbackMode() const = 0;
virtual void setPlaybackMode(QMediaPlaylist::PlaybackMode mode) = 0;
Q_SIGNALS:
void playlistProviderChanged();
void currentIndexChanged(int position);
void currentMediaChanged(const QMediaContent&);
void playbackModeChanged(QMediaPlaylist::PlaybackMode mode);
protected:
QMediaPlaylistControl(QObject* parent = 0);
};
#define QMediaPlaylistControl_iid "com.nokia.Qt.QMediaPlaylistControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QMediaPlaylistControl, QMediaPlaylistControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif // QMEDIAPLAYLISTCONTROL_H

View File

@@ -0,0 +1,128 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmediaplaylistsourcecontrol.h"
#include "qmediacontrol_p.h"
QT_BEGIN_NAMESPACE
/*!
\class QMediaPlaylistSourceControl
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.0
\brief The QMediaPlaylistSourceControl class provides access to the playlist playback
functionality of a QMediaService.
This control allows QMediaPlaylist to be passed directly to the service
instead of playing media sources one by one. This control should be
implemented if backend benefits from knowing the next media source to be
played, for example for preloading, cross fading or gap-less playback.
If QMediaPlaylistSourceControl is provided, the backend must listen for
current playlist item changes to load corresponding media source and
advance the playlist with QMediaPlaylist::next() when playback of the
current media is finished.
The interface name of QMediaPlaylistSourceControl is \c com.nokia.Qt.QMediaPlaylistSourceControl/1.0 as
defined in QMediaPlaylistSourceControl_iid.
\sa QMediaService::requestControl(), QMediaPlayer
*/
/*!
\macro QMediaPlaylistSourceControl_iid
\c com.nokia.Qt.QMediaPlaylistSourceControl/1.0
Defines the interface name of the QMediaPlaylistSourceControl class.
\relates QMediaPlaylistSourceControl
*/
/*!
Create a new playlist source control object with the given \a parent.
*/
QMediaPlaylistSourceControl::QMediaPlaylistSourceControl(QObject *parent):
QMediaControl(*new QMediaControlPrivate, parent)
{
}
/*!
Destroys the playlist control.
*/
QMediaPlaylistSourceControl::~QMediaPlaylistSourceControl()
{
}
/*!
\fn QMediaPlaylistSourceControl::playlist() const
Returns the current playlist.
Should return a null pointer if no playlist is assigned.
\since 1.0
*/
/*!
\fn QMediaPlaylistSourceControl::setPlaylist(QMediaPlaylist *playlist)
Set the playlist of this media player to \a playlist.
If a null pointer is passed, the playlist source should be disabled.
The current media should be replaced with the current item of the media playlist.
\since 1.0
*/
/*!
\fn QMediaPlaylistSourceControl::playlistChanged(QMediaPlaylist* playlist)
Signal emitted when the playlist has changed to \a playlist.
\since 1.0
*/
#include "moc_qmediaplaylistsourcecontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,82 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMEDIAPLAYLISTSOURCECONTROL_H
#define QMEDIAPLAYLISTSOURCECONTROL_H
#include <qmediacontrol.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class QMediaPlaylist;
class Q_MULTIMEDIA_EXPORT QMediaPlaylistSourceControl : public QMediaControl
{
Q_OBJECT
public:
virtual ~QMediaPlaylistSourceControl();
virtual QMediaPlaylist *playlist() const = 0;
virtual void setPlaylist(QMediaPlaylist *) = 0;
Q_SIGNALS:
void playlistChanged(QMediaPlaylist* playlist);
protected:
QMediaPlaylistSourceControl(QObject* parent = 0);
};
#define QMediaPlaylistSourceControl_iid "com.nokia.Qt.QMediaPlaylistSourceControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QMediaPlaylistSourceControl, QMediaPlaylistSourceControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif // QMEDIAPLAYLISTCONTROL_H

View File

@@ -0,0 +1,209 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmediarecordercontrol.h"
QT_BEGIN_NAMESPACE
/*!
\class QMediaRecorderControl
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.0
\brief The QMediaRecorderControl class provides access to the recording
functionality of a QMediaService.
If a QMediaService can record media it will implement QMediaRecorderControl.
This control provides a means to set the \l {outputLocation()}{output location},
and \l {record()}{start}, \l {pause()}{pause} and \l {stop()}{stop}
recording. It also provides feedback on the \l {duration()}{duration}
of the recording.
The functionality provided by this control is exposed to application
code through the QMediaRecorder class.
The interface name of QMediaRecorderControl is \c com.nokia.Qt.QMediaRecorderControl/1.0 as
defined in QMediaRecorderControl_iid.
\sa QMediaService::requestControl(), QMediaRecorder
*/
/*!
\macro QMediaRecorderControl_iid
\c com.nokia.Qt.QMediaRecorderControl/1.0
Defines the interface name of the QMediaRecorderControl class.
\relates QMediaRecorderControl
*/
/*!
Constructs a media recorder control with the given \a parent.
*/
QMediaRecorderControl::QMediaRecorderControl(QObject* parent)
: QMediaControl(parent)
{
}
/*!
Destroys a media recorder control.
*/
QMediaRecorderControl::~QMediaRecorderControl()
{
}
/*!
\fn QUrl QMediaRecorderControl::outputLocation() const
Returns the current output location being used.
\since 1.0
*/
/*!
\fn bool QMediaRecorderControl::setOutputLocation(const QUrl &location)
Sets the output \a location and returns if this operation is successful.
If file at the output location already exists, it should be overwritten.
The \a location can be relative or empty;
in this case the service should use the system specific place and file naming scheme.
After recording has stated, QMediaRecorderControl::outputLocation() should return the actual output location.
\since 1.0
*/
/*!
\fn int QMediaRecorderControl::state() const
Return the current recording state.
\since 1.0
*/
/*!
\fn qint64 QMediaRecorderControl::duration() const
Return the current duration in milliseconds.
\since 1.0
*/
/*!
\fn void QMediaRecorderControl::record()
Start recording.
\since 1.0
*/
/*!
\fn void QMediaRecorderControl::pause()
Pause recording.
\since 1.0
*/
/*!
\fn void QMediaRecorderControl::stop()
Stop recording.
\since 1.0
*/
/*!
\fn void QMediaRecorderControl::applySettings()
Commits the encoder settings and performs pre-initialization to reduce delays when recording
is started.
\since 1.0
*/
/*!
\fn bool QMediaRecorderControl::isMuted() const
Returns true if the recorder is muted, and false if it is not.
\since 1.0
*/
/*!
\fn void QMediaRecorderControl::setMuted(bool muted)
Sets the \a muted state of a media recorder.
\since 1.0
*/
/*!
\fn void QMediaRecorderControl::stateChanged(QMediaRecorder::State state)
Signals that the \a state of a media recorder has changed.
\since 1.0
*/
/*!
\fn void QMediaRecorderControl::durationChanged(qint64 duration)
Signals that the \a duration of the recorded media has changed.
This only emitted when there is a discontinuous change in the duration such as being reset to 0.
\since 1.0
*/
/*!
\fn void QMediaRecorderControl::mutedChanged(bool muted)
Signals that the \a muted state of a media recorder has changed.
\since 1.0
*/
/*!
\fn void QMediaRecorderControl::error(int error, const QString &errorString)
Signals that an \a error has occurred. The \a errorString describes the error.
\since 1.0
*/
#include "moc_qmediarecordercontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,101 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMEDIARECORDERCONTROL_H
#define QMEDIARECORDERCONTROL_H
#include "qmediacontrol.h"
#include "qmediarecorder.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class QUrl;
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
class Q_MULTIMEDIA_EXPORT QMediaRecorderControl : public QMediaControl
{
Q_OBJECT
public:
virtual ~QMediaRecorderControl();
virtual QUrl outputLocation() const = 0;
virtual bool setOutputLocation(const QUrl &location) = 0;
virtual QMediaRecorder::State state() const = 0;
virtual qint64 duration() const = 0;
virtual bool isMuted() const = 0;
virtual void applySettings() = 0;
Q_SIGNALS:
void stateChanged(QMediaRecorder::State state);
void durationChanged(qint64 position);
void mutedChanged(bool muted);
void error(int error, const QString &errorString);
public Q_SLOTS:
virtual void record() = 0;
virtual void pause() = 0;
virtual void stop() = 0;
virtual void setMuted(bool muted) = 0;
protected:
QMediaRecorderControl(QObject* parent = 0);
};
#define QMediaRecorderControl_iid "com.nokia.Qt.QMediaRecorderControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QMediaRecorderControl, QMediaRecorderControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif

View File

@@ -0,0 +1,173 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmediastreamscontrol.h"
#include "qmediacontrol_p.h"
QT_BEGIN_NAMESPACE
namespace
{
class QMediaStreamsControlPrivateRegisterMetaTypes
{
public:
QMediaStreamsControlPrivateRegisterMetaTypes()
{
qRegisterMetaType<QMediaStreamsControl::StreamType>();
}
} _registerMetaTypes;
}
/*!
\class QMediaStreamsControl
\preliminary
\inmodule QtMultimedia
\ingroup multimedia-serv
\brief The QMediaStreamsControl class provides a media stream selection control.
\since 1.0
The QMediaStreamsControl class provides descriptions of the available media streams
and allows individual streams to be activated and deactivated.
The interface name of QMediaStreamsControl is \c com.nokia.Qt.MediaStreamsControl as
defined in QMediaStreamsControl_iid.
\sa QMediaService::requestControl()
*/
/*!
\macro QMediaStreamsControl_iid
\c com.nokia.Qt.MediaStreamsControl
Defines the interface name of the QMediaStreamsControl class.
\relates QMediaStreamsControl
\since 1.0
*/
/*!
Constructs a new media streams control with the given \a parent.
*/
QMediaStreamsControl::QMediaStreamsControl(QObject *parent)
:QMediaControl(*new QMediaControlPrivate, parent)
{
}
/*!
Destroys a media streams control.
*/
QMediaStreamsControl::~QMediaStreamsControl()
{
}
/*!
\enum QMediaStreamsControl::StreamType
Media stream type.
\value AudioStream Audio stream.
\value VideoStream Video stream.
\value SubPictureStream Subpicture or teletext stream.
\value UnknownStream The stream type is unknown.
\value DataStream
*/
/*!
\fn QMediaStreamsControl::streamCount()
Returns the number of media streams.
\since 1.0
*/
/*!
\fn QMediaStreamsControl::streamType(int stream)
Return the type of a media \a stream.
\since 1.0
*/
/*!
\fn QMediaStreamsControl::metaData(int stream, QtMultimedia::MetaData key)
Returns the meta-data value of \a key for a given \a stream.
Useful metadata keya are QtMultimedia::Title, QtMultimedia::Description and QtMultimedia::Language.
\since 1.0
*/
/*!
\fn QMediaStreamsControl::isActive(int stream)
Returns true if the media \a stream is active.
\since 1.0
*/
/*!
\fn QMediaStreamsControl::setActive(int stream, bool state)
Sets the active \a state of a media \a stream.
Setting the active state of a media stream to true will activate it. If any other stream
of the same type was previously active it will be deactivated. Setting the active state fo a
media stream to false will deactivate it.
\since 1.0
*/
/*!
\fn QMediaStreamsControl::streamsChanged()
The signal is emitted when the available streams list is changed.
\since 1.0
*/
/*!
\fn QMediaStreamsControl::activeStreamsChanged()
The signal is emitted when the active streams list is changed.
\since 1.0
*/
#include "moc_qmediastreamscontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,95 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMEDIASTREAMSCONTROL_H
#define QMEDIASTREAMSCONTROL_H
#include "qmediacontrol.h"
#include "qtmedianamespace.h"
#include "qtmultimediadefs.h"
#include <qmediaenumdebug.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class Q_MULTIMEDIA_EXPORT QMediaStreamsControl : public QMediaControl
{
Q_OBJECT
Q_ENUMS(SteamType)
public:
enum StreamType { UnknownStream, VideoStream, AudioStream, SubPictureStream, DataStream };
virtual ~QMediaStreamsControl();
virtual int streamCount() = 0;
virtual StreamType streamType(int streamNumber) = 0;
virtual QVariant metaData(int streamNumber, QtMultimedia::MetaData key) = 0;
virtual bool isActive(int streamNumber) = 0;
virtual void setActive(int streamNumber, bool state) = 0;
Q_SIGNALS:
void streamsChanged();
void activeStreamsChanged();
protected:
QMediaStreamsControl(QObject *parent = 0);
};
#define QMediaStreamsControl_iid "com.nokia.Qt.QMediaStreamsControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QMediaStreamsControl, QMediaStreamsControl_iid)
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QMediaStreamsControl::StreamType)
Q_MEDIA_ENUM_DEBUG(QMediaStreamsControl, StreamType)
QT_END_HEADER
#endif // QMEDIASTREAMSCONTROL_H

View File

@@ -0,0 +1,163 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmediacontrol_p.h"
#include <qmetadatareadercontrol.h>
QT_BEGIN_NAMESPACE
/*!
\class QMetaDataReaderControl
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.0
\brief The QMetaDataReaderControl class provides read access to the
meta-data of a QMediaService's media.
If a QMediaService can provide read or write access to the meta-data of
its current media it will implement QMetaDataReaderControl. This control
provides functions for both retrieving and setting meta-data values.
Meta-data may be addressed by the well defined keys in the
QtMultimedia::MetaData enumeration using the metaData() functions, or by
string keys using the extendedMetaData() functions.
The functionality provided by this control is exposed to application
code by the meta-data members of QMediaObject, and so meta-data access
is potentially available in any of the media object classes. Any media
service may implement QMetaDataReaderControl.
The interface name of QMetaDataReaderControl is
\c com.nokia.Qt.QMetaDataReaderControl/1.0 as defined in
QMetaDataReaderControl_iid.
\sa QMediaService::requestControl(), QMediaObject
*/
/*!
\macro QMetaDataReaderControl_iid
\c com.nokia.Qt.QMetaDataReaderControl/1.0
Defines the interface name of the QMetaDataReaderControl class.
\relates QMetaDataReaderControl
*/
/*!
Construct a QMetaDataReaderControl with \a parent. This class is meant as a base class
for service specific meta data providers so this constructor is protected.
*/
QMetaDataReaderControl::QMetaDataReaderControl(QObject *parent):
QMediaControl(*new QMediaControlPrivate, parent)
{
}
/*!
Destroy the meta-data object.
*/
QMetaDataReaderControl::~QMetaDataReaderControl()
{
}
/*!
\fn bool QMetaDataReaderControl::isMetaDataAvailable() const
Identifies if meta-data is available from a media service.
Returns true if the meta-data is available and false otherwise.
\since 1.0
*/
/*!
\fn QVariant QMetaDataReaderControl::metaData(QtMultimedia::MetaData key) const
Returns the meta-data for the given \a key.
\since 1.0
*/
/*!
\fn QMetaDataReaderControl::availableMetaData() const
Returns a list of keys there is meta-data available for.
\since 1.0
*/
/*!
\fn QMetaDataReaderControl::extendedMetaData(const QString &key) const
Returns the metaData for an abitrary string \a key.
The valid selection of keys for extended meta-data is determined by the provider and the meaning
and type may differ between providers.
\since 1.0
*/
/*!
\fn QMetaDataReaderControl::availableExtendedMetaData() const
Returns a list of keys there is extended meta-data available for.
\since 1.0
*/
/*!
\fn void QMetaDataReaderControl::metaDataChanged()
Signal the changes of meta-data.
\since 1.0
*/
/*!
\fn void QMetaDataReaderControl::metaDataAvailableChanged(bool available)
Signal the availability of meta-data has changed, \a available will
be true if the multimedia object has meta-data.
\since 1.0
*/
#include "moc_qmetadatareadercontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,92 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMETADATAREADERCONTROL_H
#define QMETADATAREADERCONTROL_H
#include <qmediacontrol.h>
#include <qmediaobject.h>
#include <qmediaresource.h>
#include <qtmultimediadefs.h>
#include "qtmedianamespace.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class Q_MULTIMEDIA_EXPORT QMetaDataReaderControl : public QMediaControl
{
Q_OBJECT
public:
~QMetaDataReaderControl();
virtual bool isMetaDataAvailable() const = 0;
virtual QVariant metaData(QtMultimedia::MetaData key) const = 0;
virtual QList<QtMultimedia::MetaData> availableMetaData() const = 0;
virtual QVariant extendedMetaData(const QString &key) const = 0;
virtual QStringList availableExtendedMetaData() const = 0;
Q_SIGNALS:
void metaDataChanged();
void metaDataAvailableChanged(bool available);
protected:
QMetaDataReaderControl(QObject *parent = 0);
};
#define QMetaDataReaderControl_iid "com.nokia.Qt.QMetaDataReaderControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QMetaDataReaderControl, QMetaDataReaderControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif // QMETADATAPROVIDER_H

View File

@@ -0,0 +1,195 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmediacontrol_p.h"
#include <qmetadatawritercontrol.h>
QT_BEGIN_NAMESPACE
/*!
\class QMetaDataWriterControl
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.0
\brief The QMetaDataWriterControl class provides write access to the
meta-data of a QMediaService's media.
If a QMediaService can provide write access to the meta-data of its
current media it will implement QMetaDataWriterControl. This control
provides functions for both retrieving and setting meta-data values.
Meta-data may be addressed by the well defined keys in the
QtMultimedia::MetaData enumeration using the metaData() functions, or
by string keys using the extendedMetaData() functions.
The functionality provided by this control is exposed to application code
by the meta-data members of QMediaObject, and so meta-data access is
potentially available in any of the media object classes. Any media
service may implement QMetaDataControl.
The interface name of QMetaDataWriterControl is \c com.nokia.Qt.QMetaDataWriterControl/1.0 as
defined in QMetaDataWriterControl_iid.
\sa QMediaService::requestControl(), QMediaObject
*/
/*!
\macro QMetaDataWriterControl_iid
\c com.nokia.Qt.QMetaDataWriterControl/1.0
Defines the interface name of the QMetaDataWriterControl class.
\relates QMetaDataWriterControl
*/
/*!
Construct a QMetaDataWriterControl with \a parent. This class is meant as a base class
for service specific meta data providers so this constructor is protected.
*/
QMetaDataWriterControl::QMetaDataWriterControl(QObject *parent):
QMediaControl(*new QMediaControlPrivate, parent)
{
}
/*!
Destroy the meta-data writer control.
*/
QMetaDataWriterControl::~QMetaDataWriterControl()
{
}
/*!
\fn bool QMetaDataWriterControl::isMetaDataAvailable() const
Identifies if meta-data is available from a media service.
Returns true if the meta-data is available and false otherwise.
\since 1.0
*/
/*!
\fn bool QMetaDataWriterControl::isWritable() const
Identifies if a media service's meta-data can be edited.
Returns true if the meta-data is writable and false otherwise.
\since 1.0
*/
/*!
\fn QVariant QMetaDataWriterControl::metaData(QtMultimedia::MetaData key) const
Returns the meta-data for the given \a key.
\since 1.0
*/
/*!
\fn void QMetaDataWriterControl::setMetaData(QtMultimedia::MetaData key, const QVariant &value)
Sets the \a value of the meta-data element with the given \a key.
\since 1.0
*/
/*!
\fn QMetaDataWriterControl::availableMetaData() const
Returns a list of keys there is meta-data available for.
*/
/*!
\fn QMetaDataWriterControl::extendedMetaData(const QString &key) const
Returns the meta-data for an abitrary string \a key.
The valid selection of keys for extended meta-data is determined by the provider and the meaning
and type may differ between providers.
\since 1.0
*/
/*!
\fn QMetaDataWriterControl::setExtendedMetaData(const QString &key, const QVariant &value)
Change the value of the meta-data element with an abitrary string \a key to \a value.
The valid selection of keys for extended meta-data is determined by the provider and the meaning
and type may differ between providers.
\since 1.0
*/
/*!
\fn QMetaDataWriterControl::availableExtendedMetaData() const
Returns a list of keys there is extended meta-data available for.
\since 1.0
*/
/*!
\fn void QMetaDataWriterControl::metaDataChanged()
Signal the changes of meta-data.
\since 1.0
*/
/*!
\fn void QMetaDataWriterControl::metaDataAvailableChanged(bool available)
Signal the availability of meta-data has changed, \a available will
be true if the multimedia object has meta-data.
\since 1.0
*/
/*!
\fn void QMetaDataWriterControl::writableChanged(bool writable)
Signal a change in the writable status of meta-data, \a writable will be
true if meta-data elements can be added or adjusted.
\since 1.0
*/
#include "moc_qmetadatawritercontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,97 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMETADATAWRITERCONTROL_H
#define QMETADATAWRITERCONTROL_H
#include "qmediacontrol.h"
#include "qmediaobject.h"
#include "qmediaresource.h"
#include <qtmultimediadefs.h>
#include "qtmedianamespace.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class Q_MULTIMEDIA_EXPORT QMetaDataWriterControl : public QMediaControl
{
Q_OBJECT
public:
~QMetaDataWriterControl();
virtual bool isWritable() const = 0;
virtual bool isMetaDataAvailable() const = 0;
virtual QVariant metaData(QtMultimedia::MetaData key) const = 0;
virtual void setMetaData(QtMultimedia::MetaData key, const QVariant &value) = 0;
virtual QList<QtMultimedia::MetaData> availableMetaData() const = 0;
virtual QVariant extendedMetaData(const QString &key) const = 0;
virtual void setExtendedMetaData(const QString &key, const QVariant &value) = 0;
virtual QStringList availableExtendedMetaData() const = 0;
Q_SIGNALS:
void metaDataChanged();
void writableChanged(bool writable);
void metaDataAvailableChanged(bool available);
protected:
QMetaDataWriterControl(QObject *parent = 0);
};
#define QMetaDataWriterControl_iid "com.nokia.Qt.QMetaDataWriterControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QMetaDataWriterControl, QMetaDataWriterControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif

View File

@@ -0,0 +1,216 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <qtmultimediadefs.h>
#include "qradiodatacontrol.h"
#include "qmediacontrol_p.h"
QT_BEGIN_NAMESPACE
/*!
\class QRadioDataControl
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 5.0
\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 com.nokia.Qt.QRadioDataControl/5.0 as
defined in QRadioDataControl_iid.
\sa QMediaService::requestControl(), QRadioData
*/
/*!
\macro QRadioDataControl_iid
\c com.nokia.Qt.QRadioDataControl/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 bool QRadioDataControl::isAvailable() const
Returns true if the radio service is ready to use.
\since 5.0
*/
/*!
\fn QtMultimedia::AvailabilityError QRadioDataControl::availabilityError() const
Returns the error state of the radio service.
\since 5.0
*/
/*!
\fn QRadioData::Error QRadioDataControl::error() const
Returns the error state of a radio data.
\since 5.0
*/
/*!
\fn QString QRadioDataControl::errorString() const
Returns a string describing a radio data's error state.
\since 5.0
*/
/*!
\fn void QRadioDataControl::error(QRadioData::Error error)
Signals that an \a error has occurred.
\since 5.0
*/
/*!
\fn int QRadioDataControl::stationId()
Returns the current Program Identification
\since 5.0
*/
/*!
\fn QRadioData::ProgramType QRadioDataControl::programType()
Returns the current Program Type
\since 5.0
*/
/*!
\fn QString QRadioDataControl::programTypeName()
Returns the current Program Type Name
\since 5.0
*/
/*!
\fn QString QRadioDataControl::stationName()
Returns the current Program Service
\since 5.0
*/
/*!
\fn QString QRadioDataControl::radioText()
Returns the current Radio Text
\since 5.0
*/
/*!
\fn void QRadioDataControl::setAlternativeFrequenciesEnabled(bool enabled)
Sets the Alternative Frequency to \a enabled
\since 5.0
*/
/*!
\fn bool QRadioDataControl::isAlternativeFrequenciesEnabled()
Returns true if Alternative Frequency is currently enabled
\since 5.0
*/
/*!
\fn void QRadioDataControl::stationIdChanged(QString stationId)
Signals that the Program Identification \a stationId has changed
\since 5.0
*/
/*!
\fn void QRadioDataControl::programTypeChanged(QRadioData::ProgramType programType)
Signals that the Program Type \a programType has changed
\since 5.0
*/
/*!
\fn void QRadioDataControl::programTypeNameChanged(QString programTypeName)
Signals that the Program Type Name \a programTypeName has changed
\since 5.0
*/
/*!
\fn void QRadioDataControl::stationNameChanged(QString stationName)
Signals that the Program Service \a stationName has changed
\since 5.0
*/
/*!
\fn void QRadioDataControl::radioTextChanged(QString radioText)
Signals that the Radio Text \a radioText has changed
\since 5.0
*/
#include "moc_qradiodatacontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,97 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QRADIODATACONTROL_H
#define QRADIODATACONTROL_H
#include "qmediacontrol.h"
#include "qradiodata.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class Q_MULTIMEDIA_EXPORT QRadioDataControl : public QMediaControl
{
Q_OBJECT
public:
~QRadioDataControl();
virtual bool isAvailable() const = 0;
virtual QtMultimedia::AvailabilityError availabilityError() const = 0;
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:
QRadioDataControl(QObject *parent = 0);
};
#define QRadioDataControl_iid "com.nokia.Qt.QRadioDataControl/5.0"
Q_MEDIA_DECLARE_CONTROL(QRadioDataControl, QRadioDataControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif // QRADIODATACONTROL_H

View File

@@ -0,0 +1,378 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <qtmultimediadefs.h>
#include "qradiotunercontrol.h"
#include "qmediacontrol_p.h"
QT_BEGIN_NAMESPACE
/*!
\class QRadioTunerControl
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.0
\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 com.nokia.Qt.QRadioTunerControl/1.0 as
defined in QRadioTunerControl_iid.
\sa QMediaService::requestControl(), QRadioTuner
*/
/*!
\macro QRadioTunerControl_iid
\c com.nokia.Qt.QRadioTunerControl/1.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 bool QRadioTunerControl::isAvailable() const
Returns true if the radio service is ready to use.
\since 1.0
*/
/*!
\fn QtMultimedia::AvailabilityError QRadioTunerControl::availabilityError() const
Returns the error state of the radio service.
\since 1.0
*/
/*!
\fn QRadioTuner::State QRadioTunerControl::state() const
Returns the current radio tuner state.
\since 1.0
*/
/*!
\fn QRadioTuner::Band QRadioTunerControl::band() const
Returns the frequency band a radio tuner is tuned to.
\since 1.0
*/
/*!
\fn void QRadioTunerControl::bandChanged(QRadioTuner::Band band)
Signals that the frequency \a band a radio tuner is tuned to has changed.
\since 1.0
*/
/*!
\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.
\since 1.0
*/
/*!
\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.
\since 1.0
*/
/*!
\fn int QRadioTunerControl::frequency() const
Returns the frequency a radio tuner is tuned to.
\since 1.0
*/
/*!
\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.
\since 1.0
*/
/*!
\fn QPair<int,int> QRadioTunerControl::frequencyRange(QRadioTuner::Band band) const
Returns a frequency \a band's minimum and maximum frequency.
\since 1.0
*/
/*!
\fn void QRadioTunerControl::setFrequency(int frequency)
Sets the \a frequency a radio tuner is tuned to.
\since 1.0
*/
/*!
\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.
\since 1.0
*/
/*!
\fn QRadioTuner::StereoMode QRadioTunerControl::stereoMode() const
Returns a radio tuner's stereo mode.
\since 1.0
\sa QRadioTuner::StereoMode
*/
/*!
\fn void QRadioTunerControl::setStereoMode(QRadioTuner::StereoMode mode)
Sets a radio tuner's stereo \a mode.
\since 1.0
\sa QRadioTuner::StereoMode
*/
/*!
\fn int QRadioTunerControl::signalStrength() const
Return a radio tuner's current signal strength as a percentage.
\since 1.0
*/
/*!
\fn int QRadioTunerControl::volume() const
Returns the volume of a radio tuner's audio output as a percentage.
\since 1.0
*/
/*!
\fn void QRadioTunerControl::setVolume(int volume)
Sets the percentage \a volume of a radio tuner's audio output.
\since 1.0
*/
/*!
\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.
\since 1.0
*/
/*!
\fn void QRadioTunerControl::setMuted(bool muted)
Sets the \a muted state of a radio tuner's audio output.
\since 1.0
*/
/*!
\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.
\since 1.0
*/
/*!
\fn void QRadioTunerControl::searchForward()
Starts a forward scan for a signal, starting from the current \l frequency().
\since 1.0
*/
/*!
\fn void QRadioTunerControl::searchBackward()
Starts a backwards scan for a signal, starting from the current \l frequency().
\since 1.0
*/
/*!
\fn void QRadioTunerControl::searchAllStations()
Starts a scan through the whole frequency band searching all stations
\since 5.0
*/
/*!
\fn void QRadioTunerControl::cancelSearch()
Stops scanning for a signal.
\since 1.0
*/
/*!
\fn void QRadioTunerControl::start()
Activate the radio device.
\since 1.0
*/
/*!
\fn QRadioTunerControl::stop()
Deactivate the radio device.
\since 1.0
*/
/*!
\fn QRadioTuner::Error QRadioTunerControl::error() const
Returns the error state of a radio tuner.
\since 1.0
*/
/*!
\fn QString QRadioTunerControl::errorString() const
Returns a string describing a radio tuner's error state.
\since 1.0
*/
/*!
\fn void QRadioTunerControl::stateChanged(QRadioTuner::State state)
Signals that the \a state of a radio tuner has changed.
\since 1.0
*/
/*!
\fn void QRadioTunerControl::frequencyChanged(int frequency)
Signals that the \a frequency a radio tuner is tuned to has changed.
\since 1.0
*/
/*!
\fn void QRadioTunerControl::stereoStatusChanged(bool stereo)
Signals that the \a stereo state of a radio tuner has changed.
\since 1.0
*/
/*!
\fn void QRadioTunerControl::searchingChanged(bool searching)
Signals that the \a searching state of a radio tuner has changed.
\since 1.0
*/
/*!
\fn void QRadioTunerControl::signalStrengthChanged(int strength)
Signals that the percentage \a strength of the signal received by a radio tuner has changed.
\since 1.0
*/
/*!
\fn void QRadioTunerControl::volumeChanged(int volume)
Signals that the percentage \a volume of radio tuner's audio output has changed.
\since 1.0
*/
/*!
\fn void QRadioTunerControl::mutedChanged(bool muted)
Signals that the \a muted state of a radio tuner's audio output has changed.
\since 1.0
*/
/*!
\fn void QRadioTunerControl::error(QRadioTuner::Error error)
Signals that an \a error has occurred.
\since 1.0
*/
/*!
\fn void QRadioTunerControl::stationFound(int frequency)
Signals that new station with \a frequency was found when scanning
\since 5.0
*/
#include "moc_qradiotunercontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,125 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QRADIOTUNERCONTROL_H
#define QRADIOTUNERCONTROL_H
#include "qmediacontrol.h"
#include "qradiotuner.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class Q_MULTIMEDIA_EXPORT QRadioTunerControl : public QMediaControl
{
Q_OBJECT
public:
~QRadioTunerControl();
virtual bool isAvailable() const = 0;
virtual QtMultimedia::AvailabilityError availabilityError() const = 0;
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 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);
protected:
QRadioTunerControl(QObject *parent = 0);
};
#define QRadioTunerControl_iid "com.nokia.Qt.QRadioTunerControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QRadioTunerControl, QRadioTunerControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif // QRADIOTUNERCONTROL_H

View File

@@ -0,0 +1,159 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qvideodevicecontrol.h"
QT_BEGIN_NAMESPACE
/*!
\class QVideoDeviceControl
\brief The QVideoDeviceControl class provides an video device selector media control.
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.0
The QVideoDeviceControl class provides descriptions of the video devices
available on a system and allows one to be selected as the endpoint of a
media service.
The interface name of QVideoDeviceControl is \c com.nokia.Qt.VideoDeviceControl as
defined in QVideoDeviceControl_iid.
*/
/*!
\macro QVideoDeviceControl_iid
\c com.nokia.Qt.VideoDeviceControl
Defines the interface name of the QVideoDeviceControl class.
\relates QVideoDeviceControl
*/
/*!
Constructs a video device control with the given \a parent.
*/
QVideoDeviceControl::QVideoDeviceControl(QObject *parent)
:QMediaControl(parent)
{
}
/*!
Destroys a video device control.
*/
QVideoDeviceControl::~QVideoDeviceControl()
{
}
/*!
\fn QVideoDeviceControl::deviceCount() const
Returns the number of available video devices;
\since 1.0
*/
/*!
\fn QVideoDeviceControl::deviceName(int index) const
Returns the name of the video device at \a index.
\since 1.0
*/
/*!
\fn QVideoDeviceControl::deviceDescription(int index) const
Returns a description of the video device at \a index.
\since 1.0
*/
/*!
\fn QVideoDeviceControl::deviceIcon(int index) const
Returns an icon for the video device at \a index.
\since 1.0
*/
/*!
\fn QVideoDeviceControl::defaultDevice() const
Returns the index of the default video device.
\since 1.0
*/
/*!
\fn QVideoDeviceControl::selectedDevice() const
Returns the index of the selected video device.
\since 1.0
*/
/*!
\fn QVideoDeviceControl::setSelectedDevice(int index)
Sets the selected video device \a index.
\since 1.0
*/
/*!
\fn QVideoDeviceControl::devicesChanged()
Signals that the list of available video devices has changed.
\since 1.0
*/
/*!
\fn QVideoDeviceControl::selectedDeviceChanged(int index)
Signals that the selected video device \a index has changed.
\since 1.0
*/
/*!
\fn QVideoDeviceControl::selectedDeviceChanged(const QString &name)
Signals that the selected video device \a name has changed.
\since 1.0
*/
#include "moc_qvideodevicecontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,88 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QVIDEODEVICECONTROL_H
#define QVIDEODEVICECONTROL_H
#include "qmediacontrol.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class Q_MULTIMEDIA_EXPORT QVideoDeviceControl : public QMediaControl
{
Q_OBJECT
public:
virtual ~QVideoDeviceControl();
virtual int deviceCount() const = 0;
virtual QString deviceName(int index) const = 0;
virtual QString deviceDescription(int index) const = 0;
virtual QIcon deviceIcon(int index) const = 0;
virtual int defaultDevice() const = 0;
virtual int selectedDevice() const = 0;
public Q_SLOTS:
virtual void setSelectedDevice(int index) = 0;
Q_SIGNALS:
void selectedDeviceChanged(int index);
void selectedDeviceChanged(const QString &deviceName);
void devicesChanged();
protected:
QVideoDeviceControl(QObject *parent = 0);
};
#define QVideoDeviceControl_iid "com.nokia.Qt.QVideoDeviceControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QVideoDeviceControl, QVideoDeviceControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif // QVIDEODEVICECONTROL_H

View File

@@ -0,0 +1,190 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qvideoencodercontrol.h"
#include <QtCore/qstringlist.h>
#include <QtCore/qvariant.h>
QT_BEGIN_NAMESPACE
/*!
\class QVideoEncoderControl
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.0
\brief The QVideoEncoderControl class provides access to the settings
of a media service that performs video encoding.
If a QMediaService supports encoding video data it will implement
QVideoEncoderControl. This control provides information about the limits
of restricted video encoder options and allows the selection of a set of
video encoder settings as specified in a QVideoEncoderSettings object.
The functionality provided by this control is exposed to application code
through the QMediaRecorder class.
The interface name of QVideoEncoderControl is \c com.nokia.Qt.QVideoEncoderControl/1.0 as
defined in QVideoEncoderControl_iid.
\sa QMediaRecorder, QVideoEncoderSettings, QMediaService::requestControl()
*/
/*!
\macro QVideoEncoderControl_iid
\c com.nokia.Qt.QVideoEncoderControl/1.0
Defines the interface name of the QVideoEncoderControl class.
\relates QVideoEncoderControl
*/
/*!
Create a new video encoder control object with the given \a parent.
*/
QVideoEncoderControl::QVideoEncoderControl(QObject *parent)
:QMediaControl(parent)
{
}
/*!
Destroys a video encoder control.
*/
QVideoEncoderControl::~QVideoEncoderControl()
{
}
/*!
\fn QVideoEncoderControl::supportedVideoCodecs() const
Returns the list of supported video codecs.
\since 1.0
*/
/*!
\fn QVideoEncoderControl::videoCodecDescription(const QString &codec) const
Returns a description of a video \a codec.
\since 1.0
*/
/*!
\fn QVideoEncoderControl::supportedEncodingOptions(const QString &codec) const
Returns a list of supported encoding options for a video \a codec.
The names and types of the options in the list is system dependent.
\since 1.0
*/
/*!
\fn QVideoEncoderControl::encodingOption(const QString &codec, const QString &option) const
Returns the value of a video \a codec \a option.
\since 1.0
*/
/*!
\fn QVideoEncoderControl::setEncodingOption(const QString &codec, const QString &option, const QVariant &value)
Sets the \a value of a \a codec specific \a option.
\since 1.0
*/
/*!
\fn QVideoEncoderControl::supportedResolutions(const QVideoEncoderSettings &settings = QVideoEncoderSettings(),
bool *continuous = 0) const
Returns a list of supported resolutions.
If non null video \a settings parameter is passed,
the returned list is reduced to resolution supported with partial settings like
\l {QVideoEncoderSettings::setCodec()}{video codec} or
\l {QVideoEncoderSettings::setFrameRate()}{frame rate} applied.
If the encoder supports arbitrary resolutions within the supported resolutions range,
*\a continuous is set to true, otherwise *\a continuous is set to false.
\since 1.0
\sa QVideoEncoderSettings::resolution()
*/
/*!
\fn QVideoEncoderControl::supportedFrameRates(const QVideoEncoderSettings &settings = QVideoEncoderSettings(),
bool *continuous = 0) const
Returns a list of supported frame rates.
If non null video \a settings parameter is passed,
the returned list is reduced to frame rates supported with partial settings like
\l {QVideoEncoderSettings::setCodec()}{video codec} or
\l {QVideoEncoderSettings::setResolution()}{video resolution} applied.
If the encoder supports arbitrary frame rates within the supported range,
*\a continuous is set to true, otherwise *\a continuous is set to false.
\since 1.0
\sa QVideoEncoderSettings::frameRate()
*/
/*!
\fn QVideoEncoderControl::videoSettings() const
Returns the video encoder settings.
The returned value may be different tha passed to QVideoEncoderControl::setVideoSettings()
if the settings contains the default or undefined parameters.
In this case if the undefined parameters are already resolved, they should be returned.
\since 1.0
*/
/*!
\fn QVideoEncoderControl::setVideoSettings(const QVideoEncoderSettings &settings)
Sets the selected video encoder \a settings.
\since 1.0
*/
#include "moc_qvideoencodercontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,98 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QVIDEOENCODERCONTROL_H
#define QVIDEOENCODERCONTROL_H
#include "qmediacontrol.h"
#include "qmediarecorder.h"
#include <QtCore/qpair.h>
#include <QtCore/qsize.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class QByteArray;
class QStringList;
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
class Q_MULTIMEDIA_EXPORT QVideoEncoderControl : public QMediaControl
{
Q_OBJECT
public:
virtual ~QVideoEncoderControl();
virtual QList<QSize> supportedResolutions(const QVideoEncoderSettings &settings,
bool *continuous = 0) const = 0;
virtual QList<qreal> supportedFrameRates(const QVideoEncoderSettings &settings,
bool *continuous = 0) const = 0;
virtual QStringList supportedVideoCodecs() const = 0;
virtual QString videoCodecDescription(const QString &codecName) const = 0;
virtual QVideoEncoderSettings videoSettings() const = 0;
virtual void setVideoSettings(const QVideoEncoderSettings &settings) = 0;
virtual QStringList supportedEncodingOptions(const QString &codec) const = 0;
virtual QVariant encodingOption(const QString &codec, const QString &name) const = 0;
virtual void setEncodingOption(const QString &codec, const QString &name, const QVariant &value) = 0;
protected:
QVideoEncoderControl(QObject *parent = 0);
};
#define QVideoEncoderControl_iid "com.nokia.Qt.QVideoEncoderControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QVideoEncoderControl, QVideoEncoderControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif

View File

@@ -0,0 +1,114 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qvideorenderercontrol.h"
#include "qmediacontrol_p.h"
QT_BEGIN_NAMESPACE
/*!
\class QVideoRendererControl
\brief The QVideoRendererControl class provides a control for rendering
to a video surface.
\inmodule QtMultimedia
\ingroup multimedia-serv
\since 1.0
Using the surface() property of QVideoRendererControl a
QAbstractVideoSurface may be set as the video render target of a
QMediaService.
\snippet doc/src/snippets/multimedia-snippets/video.cpp Video renderer control
QVideoRendererControl is one of a number of possible video output controls.
The interface name of QVideoRendererControl is \c com.nokia.Qt.QVideoRendererControl/1.0 as
defined in QVideoRendererControl_iid.
\sa QMediaService::requestControl(), QVideoWidget
*/
/*!
\macro QVideoRendererControl_iid
\c com.nokia.Qt.QVideoRendererControl/1.0
Defines the interface name of the QVideoRendererControl class.
\relates QVideoRendererControl
*/
/*!
Constructs a new video renderer media end point with the given \a parent.
*/
QVideoRendererControl::QVideoRendererControl(QObject *parent)
: QMediaControl(parent)
{
}
/*!
Destroys a video renderer media end point.
*/
QVideoRendererControl::~QVideoRendererControl()
{
}
/*!
\fn QVideoRendererControl::surface() const
Returns the surface a video producer renders to.
\since 1.0
*/
/*!
\fn QVideoRendererControl::setSurface(QAbstractVideoSurface *surface)
Sets the \a surface a video producer renders to.
\since 1.0
*/
#include "moc_qvideorenderercontrol.cpp"
QT_END_NAMESPACE

View File

@@ -0,0 +1,81 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QVIDEORENDERERCONTROL_H
#define QVIDEORENDERERCONTROL_H
#include "qmediacontrol.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
class QAbstractVideoSurface;
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
class Q_MULTIMEDIA_EXPORT QVideoRendererControl : public QMediaControl
{
Q_OBJECT
public:
~QVideoRendererControl();
virtual QAbstractVideoSurface *surface() const = 0;
virtual void setSurface(QAbstractVideoSurface *surface) = 0;
protected:
QVideoRendererControl(QObject *parent = 0);
};
#define QVideoRendererControl_iid "com.nokia.Qt.QVideoRendererControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QVideoRendererControl, QVideoRendererControl_iid)
QT_END_NAMESPACE
QT_END_HEADER
#endif // QVIDEORENDERERCONTROL_H