CopperSpice API  1.9.1
QMediaRecorderControl Class Referenceabstract

Provides access to the recording functionality of a QMediaService. More...

Inheritance diagram for QMediaRecorderControl:
QMediaControl QObject

Public Signals

void actualLocationChanged (const QUrl &location)
 
void durationChanged (qint64 duration)
 
void error (int error, const QString &errorString)
 
void mutedChanged (bool muted)
 
void stateChanged (QMediaRecorder::State state)
 
void statusChanged (QMediaRecorder::Status status)
 
void volumeChanged (qreal volume)
 
- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 

Public Slots

virtual void setMuted (bool muted)
 
virtual void setState (QMediaRecorder::State state)
 
virtual void setVolume (qreal volume)
 
- Public Slots inherited from QObject
void deleteLater ()
 

Public Methods

virtual ~QMediaRecorderControl ()
 
virtual void applySettings () = 0
 
virtual qint64 duration () const = 0
 
virtual bool isMuted () const = 0
 
virtual QUrl outputLocation () const = 0
 
virtual bool setOutputLocation (const QUrl &location) = 0
 
virtual QMediaRecorder::State state () const = 0
 
virtual QMediaRecorder::Status status () const = 0
 
virtual qreal volume () const = 0
 
- Public Methods inherited from QMediaControl
 ~QMediaControl ()
 
- Public Methods inherited from QObject
 QObject (QObject *parent=nullptr)
 
 ~QObject ()
 
bool blockSignals (bool block)
 
const QList< QObject * > & children () const
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool disconnect (const QObject *receiver, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod, const QString &location, const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod=QString (), const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QStringdynamicPropertyNames () const
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
template<typename T >
findChild (const QString &childName=QString ()) const
 
template<class T >
QList< T > findChildren (const QRegularExpression &regExp, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<class T >
QList< T > findChildren (const QString &childName=QString (), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
bool inherits (const QString &className) const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const
 
bool isWindowType () const
 
void killTimer (int id)
 
const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const
 
QObject * parent () const
 
template<class T = QVariant>
property (const QString &name) const
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const QString &name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
QThreadthread () const
 

Protected Methods

 QMediaRecorderControl (QObject *parent=nullptr)
 
- Protected Methods inherited from QMediaControl
 QMediaControl (QObject *parent=nullptr)
 
- Protected Methods inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signalMethod) const
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signalMethod) const
 
bool isSignalConnected (const QMetaMethod &signalMethod) const
 
int receivers (const QString &signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Additional Inherited Members

- Static Public Methods inherited from QObject
static bool connect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection, const QString &location=QString ())
 
static bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...), Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotLambda, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, std::nullptr_t, const QObject *receiver, std::nullptr_t)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...))
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, std::nullptr_t slotMethod=nullptr)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotMethod)
 
static QMetaObjectstaticMetaObject ()
 
static QString tr (const char *text, const char *comment=nullptr, std::optional< int > numArg=std::optional< int >())
 
- Properties inherited from QObject
 objectName
 

Detailed Description

Generally you will use the QMediaRecorder class in application code - this class is mostly used when implementing a new QMediaService or if there is access to specific low level functionality not otherwise present in QMediaRecorder.

If a QMediaService can record media it will implement QMediaRecorderControl. This control provides a means to set the outputLocation(), and record, pause and stop recording via the setState() method. It also provides feedback on the duration() of the recording.

The interface name of QMediaRecorderControl is "com.copperspice.CS.mediaRecorderControl/1.0" as defined in QMediaRecorderControl_iid.

See also
QMediaService::requestControl(), QMediaRecorder

Constructor & Destructor Documentation

QMediaRecorderControl::~QMediaRecorderControl ( )
virtual

Destroys a media recorder control.

QMediaRecorderControl::QMediaRecorderControl ( QObject parent = nullptr)
explicitprotected

Constructs a media recorder control with the given parent.

Method Documentation

void QMediaRecorderControl::actualLocationChanged ( const QUrl location)
signal

Signals the actual media location has changed. This signal should be emitted at start of recording.

void QMediaRecorderControl::applySettings ( )
pure virtual

Commits the encoder settings and performs pre-initialization to reduce delays when recording is started.

qint64 QMediaRecorderControl::duration ( ) const
pure virtual

Return the current duration in milliseconds.

void QMediaRecorderControl::durationChanged ( qint64  duration)
signal

Signals that the 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.

void QMediaRecorderControl::error ( int  error,
const QString errorString 
)
signal

Signals that an error has occurred. The errorString describes the error.

bool QMediaRecorderControl::isMuted ( ) const
pure virtual

Returns true if the recorder is muted and false if it is not.

void QMediaRecorderControl::mutedChanged ( bool  muted)
signal

Signals that the muted state of a media recorder has changed.

QUrl QMediaRecorderControl::outputLocation ( ) const
pure virtual

Returns the current output location being used.

void QMediaRecorderControl::setMuted ( bool  muted)
slot

Sets the muted state of a media recorder.

bool QMediaRecorderControl::setOutputLocation ( const QUrl location)
pure virtual

Sets the output location and returns true if this operation is successful. If a file at the output location already exists it will be overwritten. If the location is relative or empty, the service should use the system specific place and file naming scheme.

After recording has started the backend should report the actual file location by emitting the actualLocationChanged() signal.

void QMediaRecorderControl::setState ( QMediaRecorder::State  state)
slot

Set the media recorder to the given state.

void QMediaRecorderControl::setVolume ( qreal  volume)
slot

Sets the linear audio volume of a media recorder.

QMediaRecorder::State QMediaRecorderControl::state ( ) const
pure virtual

Return the current recording state.

void QMediaRecorderControl::stateChanged ( QMediaRecorder::State  state)
signal

Signals that the state of a media recorder has changed.

QMediaRecorder::Status QMediaRecorderControl::status ( ) const
pure virtual

Return the current recording status.

void QMediaRecorderControl::statusChanged ( QMediaRecorder::Status  status)
signal

Signals that the status of a media recorder has changed.

qreal QMediaRecorderControl::volume ( ) const
pure virtual

Returns the linear audio gain of media recorder.

void QMediaRecorderControl::volumeChanged ( qreal  volume)
signal

Signals the audio volume value has changed.