MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

QAudioCaptureSource Class Reference

The QAudioCaptureSource class provides an interface to query and select an audio input endpoint. More...

 #include <QAudioCaptureSource>

Inherits: QMediaObject.

This class was introduced in Qt Mobility 1.0.

Public Functions

QAudioCaptureSource ( QObject * parent = 0, QMediaServiceProvider * provider = QMediaServiceProvider::defaultServiceProvider() )
~QAudioCaptureSource ()
QString activeAudioInput () const
QString audioDescription ( const QString & name ) const
QList<QString> audioInputs () const
QString defaultAudioInput () const

Reimplemented Public Functions

virtual QtMultimediaKit::AvailabilityError availabilityError () const
virtual bool isAvailable () const

Public Slots

void setAudioInput ( const QString & name )
  • 1 public slot inherited from QObject

Signals

void activeAudioInputChanged ( const QString & name )
void availableAudioInputsChanged ()

Additional Inherited Members

  • 1 property inherited from QMediaObject
  • 1 property inherited from QObject
  • 1 public variable inherited from QObject
  • 4 static public members inherited from QObject
  • 2 protected functions inherited from QMediaObject
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QAudioCaptureSource class provides an interface to query and select an audio input endpoint.

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:

 QAudioCaptureSource* audioSource = new QAudioCaptureSource;
 QMediaRecorder* recorder = new QMediaRecorder(audioSource);

 recorder->setOutputLocation(QUrl("test.raw"));

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()

See also QMediaRecorder.

Member Function Documentation

QAudioCaptureSource::QAudioCaptureSource ( QObject * parent = 0, QMediaServiceProvider * provider = QMediaServiceProvider::defaultServiceProvider() )

Construct a QAudioCaptureSource using the QMediaService from provider, with parent.

This function was introduced in Qt Mobility 1.0.

QAudioCaptureSource::~QAudioCaptureSource ()

Destroys the audiocapturesource object.

QString QAudioCaptureSource::activeAudioInput () const

Returns the active audio input name.

This function was introduced in Qt Mobility 1.0.

void QAudioCaptureSource::activeAudioInputChanged ( const QString & name ) [signal]

Signal emitted when active audio input changes to name.

This function was introduced in Qt Mobility 1.0.

QString QAudioCaptureSource::audioDescription ( const QString & name ) const

Returns the description of the audio input device with name.

This function was introduced in Qt Mobility 1.0.

QList<QString> QAudioCaptureSource::audioInputs () const

Returns a list of available audio inputs

This function was introduced in Qt Mobility 1.0.

QtMultimediaKit::AvailabilityError QAudioCaptureSource::availabilityError () const [virtual]

Reimplemented from QMediaObject::availabilityError().

Returns the error state of the audio capture service.

This function was introduced in Qt Mobility 1.0.

void QAudioCaptureSource::availableAudioInputsChanged () [signal]

Signal is emitted when the available audio inputs change.

This function was introduced in Qt Mobility 1.0.

QString QAudioCaptureSource::defaultAudioInput () const

Returns the default audio input name.

This function was introduced in Qt Mobility 1.0.

bool QAudioCaptureSource::isAvailable () const [virtual]

Reimplemented from QMediaObject::isAvailable().

Returns true if the audio capture service is available, otherwise returns false.

This function was introduced in Qt Mobility 1.0.

void QAudioCaptureSource::setAudioInput ( const QString & name ) [slot]

Set the active audio input to name.

This function was introduced in Qt Mobility 1.0.