summaryrefslogtreecommitdiffstats
path: root/src/multimedia/recording
diff options
context:
space:
mode:
authorDmytro Poplavskiy <dmytro.poplavskiy@nokia.com>2012-01-18 14:46:58 +1000
committerQt by Nokia <qt-info@nokia.com>2012-01-19 03:56:45 +0100
commit69cef0c24c1f6500d6047ae9c093fda26cf203a6 (patch)
tree364a7e22759f574ef502bed240b7764b261edd56 /src/multimedia/recording
parent8c74e5e7e7a5654f1af670b6d40f98e736d1f7d9 (diff)
Replaced QAudioCaptureSource with QAudioRecorder.
QAudioCaptureSource name is confusing, it's essentially an audio recording service but it's not evident from API. QAudioRecorder replaces QAudioCaptureSource+QMediaRecorder combination. Change-Id: I0082d766fc0d1b8d5ecbfc527f13e715add730c8 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Diffstat (limited to 'src/multimedia/recording')
-rw-r--r--src/multimedia/recording/qaudiocapturesource.cpp264
-rw-r--r--src/multimedia/recording/qaudiorecorder.cpp231
-rw-r--r--src/multimedia/recording/qaudiorecorder.h (renamed from src/multimedia/recording/qaudiocapturesource.h)57
-rw-r--r--src/multimedia/recording/qmediarecorder.cpp60
-rw-r--r--src/multimedia/recording/qmediarecorder.h3
-rw-r--r--src/multimedia/recording/qmediarecorder_p.h91
-rw-r--r--src/multimedia/recording/recording.pri7
7 files changed, 379 insertions, 334 deletions
diff --git a/src/multimedia/recording/qaudiocapturesource.cpp b/src/multimedia/recording/qaudiocapturesource.cpp
deleted file mode 100644
index 0f23f9310..000000000
--- a/src/multimedia/recording/qaudiocapturesource.cpp
+++ /dev/null
@@ -1,264 +0,0 @@
-/****************************************************************************
-**
-** 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 "qmediaobject_p.h"
-#include <qaudiocapturesource.h>
-#include "qaudioendpointselector.h"
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QAudioCaptureSource
- \brief The QAudioCaptureSource class provides an interface to query and select an audio input endpoint.
- \inmodule QtMultimedia
- \ingroup multimedia
- \ingroup multimedia_recording
-
- QAudioCaptureSource provides access to the audio inputs available on your system.
-
- You can query these inputs and select one to use.
-
- A typical implementation example:
- \snippet doc/src/snippets/multimedia-snippets/media.cpp Audio capture source
-
- The audiocapturesource interface is then used to:
-
- - Get and Set the audio input to use.
-
- The capture interface is then used to:
-
- - Set the destination using setOutputLocation()
-
- - Set the format parameters using setAudioCodec(),
-
- - Control the recording using record(),stop()
-
- \sa QMediaRecorder
-*/
-
-class QAudioCaptureSourcePrivate : public QMediaObjectPrivate
-{
-public:
- Q_DECLARE_PUBLIC(QAudioCaptureSource)
-
- void initControls()
- {
- Q_Q(QAudioCaptureSource);
-
- if (service != 0)
- audioEndpointSelector = qobject_cast<QAudioEndpointSelector*>(service->requestControl(QAudioEndpointSelector_iid));
-
- if (audioEndpointSelector) {
- q->connect(audioEndpointSelector, SIGNAL(activeEndpointChanged(const QString&)),
- SIGNAL(activeAudioInputChanged(const QString&)));
- q->connect(audioEndpointSelector, SIGNAL(availableEndpointsChanged()),
- SIGNAL(availableAudioInputsChanged()));
- q->connect(audioEndpointSelector, SIGNAL(availableEndpointsChanged()),
- SLOT(statusChanged()));
- errorState = QtMultimedia::NoError;
- }
- }
-
- QAudioCaptureSourcePrivate():provider(0), audioEndpointSelector(0), errorState(QtMultimedia::ServiceMissingError) {}
- QMediaServiceProvider *provider;
- QAudioEndpointSelector *audioEndpointSelector;
- QtMultimedia::AvailabilityError errorState;
-};
-
-/*!
- Construct a QAudioCaptureSource using the QMediaService from \a provider, with \a parent.
-*/
-
-QAudioCaptureSource::QAudioCaptureSource(QObject *parent, QMediaServiceProvider *provider):
- QMediaObject(*new QAudioCaptureSourcePrivate, parent, provider->requestService(Q_MEDIASERVICE_AUDIOSOURCE))
-{
- Q_D(QAudioCaptureSource);
-
- d->provider = provider;
- d->initControls();
-}
-
-/*!
- Destroys the audiocapturesource object.
-*/
-
-QAudioCaptureSource::~QAudioCaptureSource()
-{
- Q_D(QAudioCaptureSource);
-
- if (d->service && d->audioEndpointSelector)
- d->service->releaseControl(d->audioEndpointSelector);
-
- if (d->provider)
- d->provider->releaseService(d->service);
-}
-
-/*!
- Returns the error state of the audio capture service.
-*/
-
-QtMultimedia::AvailabilityError QAudioCaptureSource::availabilityError() const
-{
- Q_D(const QAudioCaptureSource);
-
- return d->errorState;
-}
-
-/*!
- Returns true if the audio capture service is available, otherwise returns false.
-*/
-bool QAudioCaptureSource::isAvailable() const
-{
- Q_D(const QAudioCaptureSource);
-
- if (d->service != NULL) {
- if (d->audioEndpointSelector && d->audioEndpointSelector->availableEndpoints().size() > 0)
- return true;
- }
- return false;
-}
-
-
-/*!
- Returns a list of available audio inputs
-*/
-
-QList<QString> QAudioCaptureSource::audioInputs() const
-{
- Q_D(const QAudioCaptureSource);
-
- QList<QString> list;
- if (d && d->audioEndpointSelector)
- list <<d->audioEndpointSelector->availableEndpoints();
-
- return list;
-}
-
-/*!
- Returns the description of the audio input device with \a name.
-*/
-
-QString QAudioCaptureSource::audioDescription(const QString& name) const
-{
- Q_D(const QAudioCaptureSource);
-
- if(d->audioEndpointSelector)
- return d->audioEndpointSelector->endpointDescription(name);
- else
- return QString();
-}
-
-/*!
- Returns the default audio input name.
-*/
-
-QString QAudioCaptureSource::defaultAudioInput() const
-{
- Q_D(const QAudioCaptureSource);
-
- if(d->audioEndpointSelector)
- return d->audioEndpointSelector->defaultEndpoint();
- else
- return QString();
-}
-
-/*!
- Returns the active audio input name.
-*/
-
-QString QAudioCaptureSource::activeAudioInput() const
-{
- Q_D(const QAudioCaptureSource);
-
- if(d->audioEndpointSelector)
- return d->audioEndpointSelector->activeEndpoint();
- else
- return QString();
-}
-
-/*!
- Set the active audio input to \a name.
-*/
-
-void QAudioCaptureSource::setAudioInput(const QString& name)
-{
- Q_D(const QAudioCaptureSource);
-
- if(d->audioEndpointSelector)
- return d->audioEndpointSelector->setActiveEndpoint(name);
-}
-
-/*!
- \fn QAudioCaptureSource::activeAudioInputChanged(const QString& name)
-
- Signal emitted when active audio input changes to \a name.
-*/
-
-/*!
- \fn QAudioCaptureSource::availableAudioInputsChanged()
-
- Signal is emitted when the available audio inputs change.
-*/
-
-/*!
- \internal
-*/
-void QAudioCaptureSource::statusChanged()
-{
- Q_D(QAudioCaptureSource);
-
- if (d->audioEndpointSelector) {
- if (d->audioEndpointSelector->availableEndpoints().size() > 0) {
- d->errorState = QtMultimedia::NoError;
- emit availabilityChanged(true);
- } else {
- d->errorState = QtMultimedia::BusyError;
- emit availabilityChanged(false);
- }
- } else {
- d->errorState = QtMultimedia::ServiceMissingError;
- emit availabilityChanged(false);
- }
-}
-
-#include "moc_qaudiocapturesource.cpp"
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/recording/qaudiorecorder.cpp b/src/multimedia/recording/qaudiorecorder.cpp
new file mode 100644
index 000000000..40e4ea41c
--- /dev/null
+++ b/src/multimedia/recording/qaudiorecorder.cpp
@@ -0,0 +1,231 @@
+/****************************************************************************
+**
+** 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 "qaudiorecorder.h"
+#include "qaudioendpointselector.h"
+#include "qmediaobject_p.h"
+#include "qmediarecorder_p.h"
+#include <qmediaservice.h>
+#include <qmediaserviceprovider.h>
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qurl.h>
+#include <QtCore/qstringlist.h>
+#include <QtCore/qmetaobject.h>
+
+#include <qaudioformat.h>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QAudioRecorder
+ \inmodule QtMultimedia
+ \ingroup multimedia
+ \ingroup multimedia_recording
+
+ \brief The QAudioRecorder class is used for the recording of media content.
+
+ The QAudioRecorder class is a high level media recording class.
+*/
+
+class QAudioRecorderObject : public QMediaObject
+{
+public:
+ QAudioRecorderObject(QObject *parent, QMediaService *service)
+ :QMediaObject(parent, service)
+ {
+ }
+
+ ~QAudioRecorderObject()
+ {
+ }
+};
+
+class QAudioRecorderPrivate : public QMediaRecorderPrivate
+{
+ Q_DECLARE_NON_CONST_PUBLIC(QAudioRecorder)
+
+public:
+ void initControls()
+ {
+ Q_Q(QAudioRecorder);
+ audioEndpointSelector = 0;
+
+ QMediaService *service = mediaObject ? mediaObject->service() : 0;
+
+ if (service != 0)
+ audioEndpointSelector = qobject_cast<QAudioEndpointSelector*>(service->requestControl(QAudioEndpointSelector_iid));
+
+ if (audioEndpointSelector) {
+ q->connect(audioEndpointSelector, SIGNAL(activeEndpointChanged(QString)),
+ SIGNAL(audioInputChanged(QString)));
+ q->connect(audioEndpointSelector, SIGNAL(availableEndpointsChanged()),
+ SIGNAL(availableAudioInputsChanged()));
+ }
+ }
+
+ QAudioRecorderPrivate():
+ QMediaRecorderPrivate(),
+ provider(0),
+ audioEndpointSelector(0) {}
+
+ QMediaServiceProvider *provider;
+ QAudioEndpointSelector *audioEndpointSelector;
+};
+
+
+
+/*!
+ Constructs an audio recorder.
+ The \a parent is passed to QMediaObject.
+*/
+
+QAudioRecorder::QAudioRecorder(QObject *parent, QMediaServiceProvider *serviceProvider):
+ QMediaRecorder(*new QAudioRecorderPrivate, 0, parent)
+{
+ Q_D(QAudioRecorder);
+ d->provider = serviceProvider;
+
+ QMediaService *service = d->provider->requestService(Q_MEDIASERVICE_AUDIOSOURCE);
+ setMediaObject(new QAudioRecorderObject(this, service));
+ d->initControls();
+}
+
+/*!
+ Destroys an audio recorder object.
+*/
+
+QAudioRecorder::~QAudioRecorder()
+{
+ Q_D(QAudioRecorder);
+ QMediaService *service = d->mediaObject ? d->mediaObject->service() : 0;
+ QMediaObject *mediaObject = d->mediaObject;
+ setMediaObject(0);
+
+ if (service && d->audioEndpointSelector)
+ service->releaseControl(d->audioEndpointSelector);
+
+ if (d->provider && service)
+ d->provider->releaseService(service);
+
+ delete mediaObject;
+}
+
+/*!
+ Returns a list of available audio inputs
+*/
+
+QStringList QAudioRecorder::audioInputs() const
+{
+ return d_func()->audioEndpointSelector->availableEndpoints();
+}
+
+/*!
+ Returns the readable translated description of the audio input device with \a name.
+*/
+
+QString QAudioRecorder::audioInputDescription(const QString& name) const
+{
+ Q_D(const QAudioRecorder);
+
+ if (d->audioEndpointSelector)
+ return d->audioEndpointSelector->endpointDescription(name);
+ else
+ return QString();
+}
+
+/*!
+ Returns the default audio input name.
+*/
+
+QString QAudioRecorder::defaultAudioInput() const
+{
+ Q_D(const QAudioRecorder);
+
+ if (d->audioEndpointSelector)
+ return d->audioEndpointSelector->defaultEndpoint();
+ else
+ return QString();
+}
+
+/*!
+ Returns the active audio input name.
+*/
+
+QString QAudioRecorder::audioInput() const
+{
+ Q_D(const QAudioRecorder);
+
+ if (d->audioEndpointSelector)
+ return d->audioEndpointSelector->activeEndpoint();
+ else
+ return QString();
+}
+
+/*!
+ Set the active audio input to \a name.
+*/
+
+void QAudioRecorder::setAudioInput(const QString& name)
+{
+ Q_D(const QAudioRecorder);
+
+ if (d->audioEndpointSelector)
+ return d->audioEndpointSelector->setActiveEndpoint(name);
+}
+
+/*!
+ \fn QAudioRecorder::activeAudioInputChanged(const QString& name)
+
+ Signal emitted when active audio input changes to \a name.
+*/
+
+/*!
+ \fn QAudioRecorder::availableAudioInputsChanged()
+
+ Signal is emitted when the available audio inputs change.
+*/
+
+
+
+#include "moc_qaudiorecorder.cpp"
+QT_END_NAMESPACE
+
diff --git a/src/multimedia/recording/qaudiocapturesource.h b/src/multimedia/recording/qaudiorecorder.h
index 3999f1d15..4e7db7ae3 100644
--- a/src/multimedia/recording/qaudiocapturesource.h
+++ b/src/multimedia/recording/qaudiorecorder.h
@@ -39,21 +39,15 @@
**
****************************************************************************/
-#ifndef QAUDIOCAPTURESOURCE_H
-#define QAUDIOCAPTURESOURCE_H
+#ifndef QAUDIORECORDER_H
+#define QAUDIORECORDER_H
-#include <QtCore/qstringlist.h>
-#include <QtCore/qpair.h>
-#include <QtCore/qsize.h>
-
-#include <qaudioformat.h>
-
-#include "qmediarecorder.h"
-#include "qmediacontrol.h"
-#include "qmediaobject.h"
-#include "qmediaservice.h"
+#include <qmediarecorder.h>
+#include <qmediaobject.h>
+#include <qmediaencodersettings.h>
+#include <qmediaenumdebug.h>
-#include "qmediaserviceprovider.h"
+#include <QtCore/qpair.h>
QT_BEGIN_HEADER
@@ -61,43 +55,42 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
+class QString;
+class QSize;
+class QAudioFormat;
+QT_END_NAMESPACE
-class QAudioCaptureSourcePrivate;
+QT_BEGIN_NAMESPACE
-class Q_MULTIMEDIA_EXPORT QAudioCaptureSource : public QMediaObject
+class QAudioRecorderPrivate;
+class Q_MULTIMEDIA_EXPORT QAudioRecorder : public QMediaRecorder
{
Q_OBJECT
-
+ Q_PROPERTY(QString audioInput READ audioInput WRITE setAudioInput NOTIFY audioInputChanged)
public:
- QAudioCaptureSource(QObject *parent = 0, QMediaServiceProvider *service = QMediaServiceProvider::defaultServiceProvider());
- ~QAudioCaptureSource();
-
- bool isAvailable() const;
- QtMultimedia::AvailabilityError availabilityError() const;
-
- QList<QString> audioInputs() const;
+ QAudioRecorder(QObject *parent = 0, QMediaServiceProvider *serviceProvider = QMediaServiceProvider::defaultServiceProvider());
+ ~QAudioRecorder();
- QString audioDescription(const QString& name) const;
+ QStringList audioInputs() const;
QString defaultAudioInput() const;
- QString activeAudioInput() const;
+ QString audioInputDescription(const QString& name) const;
+
+ QString audioInput() const;
public Q_SLOTS:
void setAudioInput(const QString& name);
Q_SIGNALS:
- void activeAudioInputChanged(const QString& name);
+ void audioInputChanged(const QString& name);
void availableAudioInputsChanged();
-private Q_SLOTS:
- void statusChanged();
-
private:
- Q_DECLARE_PRIVATE(QAudioCaptureSource)
+ Q_DISABLE_COPY(QAudioRecorder)
+ Q_DECLARE_PRIVATE(QAudioRecorder)
};
QT_END_NAMESPACE
QT_END_HEADER
-
-#endif // QAUDIOCAPTURESOURCE_H
+#endif // QAUDIORECORDER_H
diff --git a/src/multimedia/recording/qmediarecorder.cpp b/src/multimedia/recording/qmediarecorder.cpp
index 8eb91dd03..46a4aabea 100644
--- a/src/multimedia/recording/qmediarecorder.cpp
+++ b/src/multimedia/recording/qmediarecorder.cpp
@@ -40,6 +40,7 @@
****************************************************************************/
#include "qmediarecorder.h"
+#include "qmediarecorder_p.h"
#include <qmediarecordercontrol.h>
#include "qmediaobject_p.h"
@@ -71,11 +72,11 @@ QT_BEGIN_NAMESPACE
The QMediaRecorder class is a high level media recording class. It's not
intended to be used alone but for accessing the media recording functions
- of other media objects, like QRadioTuner, or QAudioCaptureSource.
+ of other media objects, like QRadioTuner, or QCamera.
\snippet doc/src/snippets/multimedia-snippets/media.cpp Media recorder
- \sa QAudioCaptureSource
+ \sa QAudioRecorder
*/
namespace
@@ -91,37 +92,6 @@ public:
} _registerRecorderMetaTypes;
}
-
-class QMediaRecorderPrivate
-{
- Q_DECLARE_NON_CONST_PUBLIC(QMediaRecorder)
-
-public:
- QMediaRecorderPrivate();
-
- QMediaObject *mediaObject;
-
- QMediaRecorderControl *control;
- QMediaContainerControl *formatControl;
- QAudioEncoderControl *audioControl;
- QVideoEncoderControl *videoControl;
- QMetaDataWriterControl *metaDataControl;
-
- QTimer* notifyTimer;
-
- QMediaRecorder::State state;
- QMediaRecorder::Error error;
- QString errorString;
-
- void _q_stateChanged(QMediaRecorder::State state);
- void _q_error(int error, const QString &errorString);
- void _q_serviceDestroyed();
- void _q_notify();
- void _q_updateNotifyInterval(int ms);
-
- QMediaRecorder *q_ptr;
-};
-
QMediaRecorderPrivate::QMediaRecorderPrivate():
mediaObject(0),
control(0),
@@ -198,12 +168,27 @@ QMediaRecorder::QMediaRecorder(QMediaObject *mediaObject, QObject *parent):
{
Q_D(QMediaRecorder);
d->q_ptr = this;
+
+ d->notifyTimer = new QTimer(this);
+ connect(d->notifyTimer, SIGNAL(timeout()), SLOT(_q_notify()));
+
setMediaObject(mediaObject);
+}
+
+/*!
+ \internal
+*/
+QMediaRecorder::QMediaRecorder(QMediaRecorderPrivate &dd, QMediaObject *mediaObject, QObject *parent):
+ QObject(parent),
+ d_ptr(&dd)
+{
+ Q_D(QMediaRecorder);
+ d->q_ptr = this;
d->notifyTimer = new QTimer(this);
- d->notifyTimer->setInterval(mediaObject->notifyInterval());
connect(d->notifyTimer, SIGNAL(timeout()), SLOT(_q_notify()));
- connect(mediaObject, SIGNAL(notifyIntervalChanged(int)), SLOT(_q_updateNotifyInterval(int)));
+
+ setMediaObject(mediaObject);
}
/*!
@@ -248,6 +233,8 @@ bool QMediaRecorder::setMediaObject(QMediaObject *object)
this, SLOT(_q_error(int,QString)));
}
+ disconnect(d->mediaObject, SIGNAL(notifyIntervalChanged(int)), this, SLOT(_q_updateNotifyInterval(int)));
+
QMediaService *service = d->mediaObject->service();
if (service) {
@@ -285,6 +272,9 @@ bool QMediaRecorder::setMediaObject(QMediaObject *object)
if (d->mediaObject) {
QMediaService *service = d->mediaObject->service();
+ d->notifyTimer->setInterval(d->mediaObject->notifyInterval());
+ connect(d->mediaObject, SIGNAL(notifyIntervalChanged(int)), SLOT(_q_updateNotifyInterval(int)));
+
if (service) {
d->control = qobject_cast<QMediaRecorderControl*>(service->requestControl(QMediaRecorderControl_iid));
diff --git a/src/multimedia/recording/qmediarecorder.h b/src/multimedia/recording/qmediarecorder.h
index 694124197..f82d7b485 100644
--- a/src/multimedia/recording/qmediarecorder.h
+++ b/src/multimedia/recording/qmediarecorder.h
@@ -171,10 +171,11 @@ Q_SIGNALS:
void metaDataChanged();
protected:
+ QMediaRecorder(QMediaRecorderPrivate &dd, QMediaObject *mediaObject, QObject *parent = 0);
bool setMediaObject(QMediaObject *object);
-private:
QMediaRecorderPrivate *d_ptr;
+private:
Q_DISABLE_COPY(QMediaRecorder)
Q_DECLARE_PRIVATE(QMediaRecorder)
Q_PRIVATE_SLOT(d_func(), void _q_stateChanged(QMediaRecorder::State))
diff --git a/src/multimedia/recording/qmediarecorder_p.h b/src/multimedia/recording/qmediarecorder_p.h
new file mode 100644
index 000000000..26eff9847
--- /dev/null
+++ b/src/multimedia/recording/qmediarecorder_p.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** 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 QMEDIARECORDER_P_H
+#define QMEDIARECORDER_P_H
+
+#include "qmediarecorder.h"
+#include "qmediaobject_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QMediaRecorderControl;
+class QMediaContainerControl;
+class QAudioEncoderControl;
+class QVideoEncoderControl;
+class QMetaDataWriterControl;
+class QTimer;
+
+class QMediaRecorderPrivate
+{
+ Q_DECLARE_NON_CONST_PUBLIC(QMediaRecorder)
+
+public:
+ QMediaRecorderPrivate();
+ virtual ~QMediaRecorderPrivate() {}
+
+ QMediaObject *mediaObject;
+
+ QMediaRecorderControl *control;
+ QMediaContainerControl *formatControl;
+ QAudioEncoderControl *audioControl;
+ QVideoEncoderControl *videoControl;
+ QMetaDataWriterControl *metaDataControl;
+
+ QTimer* notifyTimer;
+
+ QMediaRecorder::State state;
+ QMediaRecorder::Error error;
+ QString errorString;
+
+ void _q_stateChanged(QMediaRecorder::State state);
+ void _q_error(int error, const QString &errorString);
+ void _q_serviceDestroyed();
+ void _q_notify();
+ void _q_updateNotifyInterval(int ms);
+
+ QMediaRecorder *q_ptr;
+};
+
+QT_END_NAMESPACE
+
+#endif
+
diff --git a/src/multimedia/recording/recording.pri b/src/multimedia/recording/recording.pri
index b55999a02..20ed99e04 100644
--- a/src/multimedia/recording/recording.pri
+++ b/src/multimedia/recording/recording.pri
@@ -1,11 +1,14 @@
INCLUDEPATH += recording
PUBLIC_HEADERS += \
- recording/qaudiocapturesource.h \
+ recording/qaudiorecorder.h \
recording/qmediaencodersettings.h \
recording/qmediarecorder.h \
+PRIVATE_HEADERS += \
+ recording/qmediarecorder_p.h \
+
SOURCES += \
- recording/qaudiocapturesource.cpp \
+ recording/qaudiorecorder.cpp \
recording/qmediaencodersettings.cpp \
recording/qmediarecorder.cpp