CVideoRecorderUtility Class Reference

class CVideoRecorderUtility : public CBase

Records video data.

The class offers a simple interface to record and set meta data and control information for a video clip and save the result to a file, descriptor or URL.

Note: Some video formats also allow the storing of audio data. To accommodate this, this class contains audio functions that can manipulate such data.

While this class is abstract, NewL() constructs, initialises and returns pointers to instances of concrete classes derived from this abstract class. This concrete class is part of the MMF implementation and is private.

Since
7.0s

Inherits from

  • CVideoRecorderUtility
Public Member Functions
~CVideoRecorderUtility()
IMPORT_C voidAddMetaDataEntryL(const CMMFMetaDataEntry &)
IMPORT_C TIntAudioBitRateL()
IMPORT_C TUintAudioChannelsL()
IMPORT_C TBoolAudioEnabledL()
IMPORT_C TUintAudioSampleRateL()
IMPORT_C TFourCCAudioTypeL()
IMPORT_C voidClose()
IMPORT_C const CMMFControllerImplementationInformation &ControllerImplementationInformationL()
IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus &)
IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TRequestStatus &)
IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &)
IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &)
IMPORT_C TTimeIntervalMicroSecondsDurationL()
IMPORT_C TIntGainL()
IMPORT_C voidGetPixelAspectRatioL(TVideoAspectRatio &)
IMPORT_C voidGetPriorityL(TInt &, TMdaPriorityPreference &)
IMPORT_C voidGetSupportedAudioChannelsL(RArray< TUint > &)
IMPORT_C voidGetSupportedAudioSampleRatesL(RArray< TUint > &)
IMPORT_C voidGetSupportedAudioTypesL(RArray< TFourCC > &)
IMPORT_C voidGetSupportedPixelAspectRatiosL(RArray< TVideoAspectRatio > &)
IMPORT_C voidGetSupportedVideoTypesL(CDesC8Array &)
IMPORT_C voidGetVideoFrameSizeL(TSize &)
IMPORT_C TIntMaxGainL()
IMPORT_C CMMFMetaDataEntry *MetaDataEntryL(TInt)
IMPORT_C CVideoRecorderUtility *NewL(MVideoRecorderUtilityObserver &, TInt, TInt)
IMPORT_C TIntNumberOfMetaDataEntriesL()
IMPORT_C voidOpenDesL(TDes8 &, TInt, TUid, TUid, const TDesC8 &, TFourCC)
IMPORT_C voidOpenFileL(const TDesC &, TInt, TUid, TUid, const TDesC8 &, TFourCC)
IMPORT_C voidOpenFileL(const RFile &, TInt, TUid, TUid, const TDesC8 &, TFourCC)
IMPORT_C voidOpenUrlL(const TDesC &, TInt, TInt, TUid, TUid, const TDesC8 &, TFourCC)
IMPORT_C voidPauseL()
IMPORT_C voidPrepare()
IMPORT_C voidRecord()
IMPORT_C TTimeIntervalMicroSecondsRecordTimeAvailable()
IMPORT_C voidRemoveMetaDataEntryL(TInt)
IMPORT_C voidReplaceMetaDataEntryL(TInt, const CMMFMetaDataEntry &)
IMPORT_C voidSetAudioBitRateL(TInt)
IMPORT_C voidSetAudioChannelsL(const TUint)
IMPORT_C voidSetAudioEnabledL(TBool)
IMPORT_C voidSetAudioSampleRateL(const TUint)
IMPORT_C voidSetAudioTypeL(TFourCC)
IMPORT_C voidSetGainL(TInt)
IMPORT_C voidSetMaxClipSizeL(TInt)
IMPORT_C voidSetPixelAspectRatioL(const TVideoAspectRatio &)
IMPORT_C voidSetPriorityL(TInt, TInt)
IMPORT_C voidSetVideoBitRateL(TInt)
IMPORT_C voidSetVideoEnabledL(TBool)
IMPORT_C voidSetVideoFrameRateFixedL(TBool)
IMPORT_C voidSetVideoFrameRateL(TReal32)
IMPORT_C voidSetVideoFrameSizeL(const TSize &)
IMPORT_C voidSetVideoQualityL(TInt)
IMPORT_C voidSetVideoTypeL(const TDesC8 &)
IMPORT_C TIntStop()
IMPORT_C TIntVideoBitRateL()
IMPORT_C TBoolVideoEnabledL()
IMPORT_C const TDesC8 &VideoFormatMimeType()
IMPORT_C TBoolVideoFrameRateFixedL()
IMPORT_C TReal32VideoFrameRateL()
IMPORT_C TIntVideoQualityL()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Member Enumerations
enumTMMFVideoRecorderState { EStopped, EOpening, EPaused, ERecording }
Private Attributes
CBody *iBody

Constructor & Destructor Documentation

~CVideoRecorderUtility()

~CVideoRecorderUtility()

Destructor. Closes the current clip, if one is open, and frees resources.

Since
7.0s

Member Functions Documentation

AddMetaDataEntryL(const CMMFMetaDataEntry &)

IMPORT_C voidAddMetaDataEntryL(const CMMFMetaDataEntry &aNewEntry)

Adds a new meta data entry to the video clip.

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

Parameters

const CMMFMetaDataEntry & aNewEntryThe meta data entry to add.

AudioBitRateL()

IMPORT_C TIntAudioBitRateL()const

Gets the audio bit rate.

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

AudioChannelsL()

IMPORT_C TUintAudioChannelsL()const

Returns the current number of audio channels to record (1 for mono, 2 for stereo).

If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below. This method can be called after the destination has been opened.

Pre-condition
The destination file, descriptor, or URL has been opened.
leave
KErrNotSupported The controller does not support controlling the number of audio channels.
leave
KErrNotReady Invalid state: This method can be called after the destination has been opened.

AudioEnabledL()

IMPORT_C TBoolAudioEnabledL()const

Returns the status of audio support for the video clip currently being recorded.

Since
7.0s

AudioSampleRateL()

IMPORT_C TUintAudioSampleRateL()const

Returns the current audio sample rate.

If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below. This method can be called after the destination has been opened.

Pre-condition
The destination file, descriptor, or URL has been opened.
leave
KErrNotSupported The controller does not support controlling the audio sample rate.
leave
KErrNotReady Invalid state: This method can be called after the destination has been opened.

AudioTypeL()

IMPORT_C TFourCCAudioTypeL()const

Returns the audio type. This represents the encoding of audio data within the current format.

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

Close()

IMPORT_C voidClose()

Closes a video clip.

Since
7.0s

ControllerImplementationInformationL()

IMPORT_C const CMMFControllerImplementationInformation &ControllerImplementationInformationL()

Returns the controller implementation information associated with the current controller.

Since
7.0s

CustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus &)

IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2,
TDes8 &aDataFrom,
TRequestStatus &aStatus
)

Sends an asynchronous custom command to the controller.

Note: This method will return immediately. The RunL of the active object owning the aStatus parameter will be called when the command is completed by the controller framework.

Since
7.0s

Parameters

const TMMFMessageDestinationPckg & aDestinationThe destination of the message, consisting of the UID of the interface of this message.
TInt aFunctionThe function number to indicate which function is to be called on the interface defined in the aDestination parameter.
const TDesC8 & aDataTo1A reference to the first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
const TDesC8 & aDataTo2A reference to the second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
TDes8 & aDataFromA reference to an area of memory to which the controller framework will write any data to be passed back to the client. Can't be KNullDesC8.
TRequestStatus & aStatusThe TRequestStatus of an active object. This will contain the result of the request on completion. The exact range of result values is dependent on the interface.

CustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TRequestStatus &)

IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2,
TRequestStatus &aStatus
)

Sends an asynchronous custom command to the controller.

Note: This method will return immediately. The RunL of the active object owning the aStatus parameter will be called when the command is completed by the controller framework.

Since
7.0s

Parameters

const TMMFMessageDestinationPckg & aDestinationThe destination of the message, consisting of the UID of the interface of this message.
TInt aFunctionThe function number to indicate which function is to be called on the interface defined in the aDestination parameter.
const TDesC8 & aDataTo1A reference to the first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
const TDesC8 & aDataTo2A reference to the second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
TRequestStatus & aStatusThe TRequestStatus of an active object. This will contain the result of the request on completion. The exact range of result values are dependent on the interface.

CustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &)

IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2,
TDes8 &aDataFrom
)

Sends a synchronous custom command to the controller.

Since
7.0s

Parameters

const TMMFMessageDestinationPckg & aDestinationThe destination of the message, consisting of the UID of the interface of this message.
TInt aFunctionThe function number to indicate which function is to be called on the interface defined in the aDestination parameter.
const TDesC8 & aDataTo1A reference to the first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
const TDesC8 & aDataTo2A reference to the second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
TDes8 & aDataFromA reference to an area of memory to which the controller framework will write any data to be passed back to the client. Can't be KNullDesC8.

CustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &)

IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2
)

Sends a synchronous custom command to the controller.

Since
7.0s

Parameters

const TMMFMessageDestinationPckg & aDestinationThe destination of the message, consisting of the UID of the interface of this message.
TInt aFunctionThe function number to indicate which function is to be called on the interface defined in the aDestination parameter.
const TDesC8 & aDataTo1A reference to the first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
const TDesC8 & aDataTo2A reference to the second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.

DurationL()

IMPORT_C TTimeIntervalMicroSecondsDurationL()const

Returns the length of the video clip.

Since
7.0s

GainL()

IMPORT_C TIntGainL()const

Returns the current recording gain.

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

GetPixelAspectRatioL(TVideoAspectRatio &)

IMPORT_C voidGetPixelAspectRatioL(TVideoAspectRatio &aAspectRatio)const

Gets the current pixel aspect ratio.

If an error occurs, this function leaves with one of the system wide error codes. This method can be called after the destination has been opened.

Pre-condition
The destination file, descriptor, or URL has been opened.
leave
KErrNotSupported The controller does not support the pixel aspect ratio extension.
leave
KErrNotReady Invalid state: This method can be called after the destination has been opened.

Parameters

TVideoAspectRatio & aAspectRatioThe current video pixel aspect ratio.

GetPriorityL(TInt &, TMdaPriorityPreference &)

IMPORT_C voidGetPriorityL(TInt &aPriority,
TMdaPriorityPreference &aPref
)const

Gets the current recording priority. This is used to arbitrate between simultaneous accesses of the sound hardware.

Since
7.0s

Parameters

TInt & aPriorityA priority between EMdaPriorityMin and EMdaPriorityMax. EMdaPriorityMin means the client can be interrupted by any other client, EMdaPriorityNormal means the client can only be interrupted by a client with a higher priority or EMdaPriorityMax means the client cannot be interrupted by other clients.
TMdaPriorityPreference & aPrefPriority preference

GetSupportedAudioChannelsL(RArray< TUint > &)

IMPORT_C voidGetSupportedAudioChannelsL(RArray< TUint > &aChannels)const

Gets the list of the supported numbers of audio channels. One channel represents mono, two channels stereo and so on. This method can only be called after the audio codec has been selected, otherwise the list may be incorrect.

If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below.

Pre-condition
The audio codec has been selected.
leave
KErrNotSupported The controller does not support controlling the number of audio channels.
leave
KErrNotReady Invalid state: This method can be called after the audio codec has been selected.

Parameters

RArray< TUint > & aChannelsOn return contains an array of supported numbers of audio channels.

GetSupportedAudioSampleRatesL(RArray< TUint > &)

IMPORT_C voidGetSupportedAudioSampleRatesL(RArray< TUint > &aSampleRates)const

Gets the list of the supported audio sample rates. The client must select the audio codec before calling this method, since the supported sample rates depend on the codec. If the codec has not been set, the returned list may not be correct.

If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below.

Pre-condition
The audio codec has been selected.
leave
KErrNotSupported The controller does not support controlling the audio sample rate.
leave
KErrNotReady Invalid state: This method can be called after the audio codec has been selected.

Parameters

RArray< TUint > & aSampleRatesOn return contains an array of supported sample rates.

GetSupportedAudioTypesL(RArray< TFourCC > &)

IMPORT_C voidGetSupportedAudioTypesL(RArray< TFourCC > &aAudioTypes)const

Gets a list of the audio types that are supported for recording to.

Since
7.0s

Parameters

RArray< TFourCC > & aAudioTypesAn array of Four Character Codes representing the audio types supported.

GetSupportedPixelAspectRatiosL(RArray< TVideoAspectRatio > &)

IMPORT_C voidGetSupportedPixelAspectRatiosL(RArray< TVideoAspectRatio > &aAspectRatios)const

Gets a list of supported pixel aspect ratios. The client must select the video codec and set the picture size (SetVideoFrameSizeL()) before calling this method, since the supported aspect ratios may depend on the codec and picture size. If the codec or picture size is not set, the returned list may not be correct.

If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below.

Pre-condition
The video codec has been selected.
leave
KErrNotSupported The controller does not support the pixel aspect ratio extension.
leave
KErrNotReady Invalid state: This method can be called after the destination has been opened and the video codec selected.

Parameters

RArray< TVideoAspectRatio > & aAspectRatiosOn return contains an array of supported pixel aspect ratios.

GetSupportedVideoTypesL(CDesC8Array &)

IMPORT_C voidGetSupportedVideoTypesL(CDesC8Array &aVideoTypes)const

Gets a list of the video types that are supported for recording to.

Since
7.0s

Parameters

CDesC8Array & aVideoTypesAn array of Four Character Codes representing the video types supported.

GetVideoFrameSizeL(TSize &)

IMPORT_C voidGetVideoFrameSizeL(TSize &aSize)const

Gets the video frame size.

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

Parameters

TSize & aSizeThe video frame size, in pixels.

MaxGainL()

IMPORT_C TIntMaxGainL()const

Returns the maximum possible setting for the recording gain.

Since
7.0s

MetaDataEntryL(TInt)

IMPORT_C CMMFMetaDataEntry *MetaDataEntryL(TIntaIndex)const

Returns a meta data entry from the current clip.

If an error occurs, this function leaves with one of the system wide error codes.

leave
KErrArgument If the index is out of range, or with one of the other system-wide error codes.
Since
7.0s

Parameters

TInt aIndexThe index of the entry to retrieve. The index is between 0 and NumberOfMetaDataEntriesL()-1.

NewL(MVideoRecorderUtilityObserver &, TInt, TInt)

IMPORT_C CVideoRecorderUtility *NewL(MVideoRecorderUtilityObserver &aObserver,
TIntaPriority = EMdaPriorityNormal,
TIntaPref = EMdaPriorityPreferenceTimeAndQuality
)[static]

Constructs and initialises a new instance of the video recorder utility.

The function leaves if the video recorder utility object cannot be created.

Since
7.0s
Note: The Priority Value and Priority Preference are used primarily when deciding what to do when several audio clients attempt to play or record simultaneously. In addition to the Priority Value and Preference, the adaptation may consider other parameters such as the SecureId and Capabilities of the client process. Whatever, the decision as to what to do in such situations is up to the audio adaptation, and may vary between different phones. Portable applications are advised not to assume any specific behaviour.

Parameters

MVideoRecorderUtilityObserver & aObserverAn object to receive video recorder notifications.
TInt aPriority = EMdaPriorityNormalThe Priority Value - this client's relative priority. This is a value between EMdaPriorityMin and EMdaPriorityMax and represents a relative priority. A higher value indicates a more important request.
TInt aPref = EMdaPriorityPreferenceTimeAndQualityThe Priority Preference - an additional audio policy parameter. The suggested default is EMdaPriorityPreferenceNone. Further values are given by TMdaPriorityPreference, and additional values may be supported by given phones and/or platforms, but should not be depended upon by portable code.

NumberOfMetaDataEntriesL()

IMPORT_C TIntNumberOfMetaDataEntriesL()const

Returns the number of meta data entries associated with this video clip.

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

OpenDesL(TDes8 &, TInt, TUid, TUid, const TDesC8 &, TFourCC)

IMPORT_C voidOpenDesL(TDes8 &aDescriptor,
TIntaCameraHandle,
TUidaControllerUid,
TUidaVideoFormat,
const TDesC8 &aVideoType =  KNullDesC8 ,
TFourCCaAudioType =  KMMFFourCCCodeNULL
)

Specifies a descriptor that can be used to store a recorded video clip.

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

Parameters

TDes8 & aDescriptorThe descriptor used to store the recorded video clip.
TInt aCameraHandleThe handle of the camera to record from.
TUid aControllerUidThe UID of the controller to use for recording.
TUid aVideoFormatThe UID of the video format to record to.
const TDesC8 & aVideoType =  KNullDesC8 The descriptor containing the video MIME type.
TFourCC aAudioType =  KMMFFourCCCodeNULL A four character code representing the encoding to be used for audio data.

OpenFileL(const TDesC &, TInt, TUid, TUid, const TDesC8 &, TFourCC)

IMPORT_C voidOpenFileL(const TDesC &aFileName,
TIntaCameraHandle,
TUidaControllerUid,
TUidaVideoFormat,
const TDesC8 &aVideoType =  KNullDesC8 ,
TFourCCaAudioType =  KMMFFourCCCodeNULL
)

Opens a file that can be used to store a recorded video clip.

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

Parameters

const TDesC & aFileNameA full path name of the file to save the video clip to.
TInt aCameraHandleA handle to the camera to use for recording.
TUid aControllerUidThe UID of the controller to use for recording.
TUid aVideoFormatThe UID of the video format to record to.
const TDesC8 & aVideoType =  KNullDesC8 The descriptor containing the video MIME type.
TFourCC aAudioType =  KMMFFourCCCodeNULL A four character code representing the encoding to be used for audio data.

OpenFileL(const RFile &, TInt, TUid, TUid, const TDesC8 &, TFourCC)

IMPORT_C voidOpenFileL(const RFile &aFile,
TIntaCameraHandle,
TUidaControllerUid,
TUidaVideoFormat,
const TDesC8 &aVideoType =  KNullDesC8 ,
TFourCCaAudioType =  KMMFFourCCCodeNULL
)

Opens a file that can be used to store a recorded video clip.

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

Parameters

const RFile & aFileFile handle of file to use for video clip
TInt aCameraHandleA handle to the camera to use for recording.
TUid aControllerUidThe UID of the controller to use for recording.
TUid aVideoFormatThe UID of the video format to record to.
const TDesC8 & aVideoType =  KNullDesC8 The descriptor containing the video MIME type.
TFourCC aAudioType =  KMMFFourCCCodeNULL A four character code representing the encoding to be used for audio data.

OpenUrlL(const TDesC &, TInt, TInt, TUid, TUid, const TDesC8 &, TFourCC)

IMPORT_C voidOpenUrlL(const TDesC &aUrl,
TIntaIapId,
TIntaCameraHandle,
TUidaControllerUid,
TUidaVideoFormat,
const TDesC8 &aVideoType =  KNullDesC8 ,
TFourCCaAudioType =  KMMFFourCCCodeNULL
)

Specifies a URL that can be used to store a recorded video clip.

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

Parameters

const TDesC & aUrlThe URL used to store the recorded video clip.
TInt aIapIdThe Id of the internet access point to use.
TInt aCameraHandleThe handle of the camera to record from.
TUid aControllerUidThe UID of the controller to use for recording.
TUid aVideoFormatThe UID of the video format to record to.
const TDesC8 & aVideoType =  KNullDesC8 The descriptor containing the video MIME type.
TFourCC aAudioType =  KMMFFourCCCodeNULL A four character code representing the encoding to be used for audio data.

PauseL()

IMPORT_C voidPauseL()

Pauses the recording of video data to the specified file, descriptor or URL.

If the video format supports audio tracks and audio is enabled, this function also pauses the recording of the audio data.

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

Prepare()

IMPORT_C voidPrepare()

Prepares the recorder for recording.

This should be called before the first call to record. The client will receive a MvruoPrepareComplete when the prepare operation is complete.

Record()

IMPORT_C voidRecord()

Starts the recording of video data to the specified file, descriptor or URL.

If the video format also supports the use of an audio track, recording of the audio track can be enabled using SetAudioEnabledL().

The client will receive a MvruoRecordComplete on completion of recording, unless it explicitly ends recording with Stop. Prepare() should be called before the first call to Record().

This function must not be called until a MVideoRecorderUtilityObserver::MvruoPrepareComplete() has been received with an aError equal to KErrNone.

Since
7.0s

RecordTimeAvailable()

IMPORT_C TTimeIntervalMicroSecondsRecordTimeAvailable()const

Returns the (possibly estimated) record time left in the clip.

Since
7.0s

RemoveMetaDataEntryL(TInt)

IMPORT_C voidRemoveMetaDataEntryL(TIntaIndex)

Removes a meta data entry.

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

Parameters

TInt aIndexThe index of the meta data entry to remove.

ReplaceMetaDataEntryL(TInt, const CMMFMetaDataEntry &)

IMPORT_C voidReplaceMetaDataEntryL(TIntaIndex,
const CMMFMetaDataEntry &aNewEntry
)

Replaces a meta data entry.

The meta data entry specified by aIndex is replaced by the new data specified in aNewEntry. The index must be a value between 0 and NumberOfMetaDataEntriesL()-1.

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

Parameters

TInt aIndexThe index of the meta data entry to replace.
const CMMFMetaDataEntry & aNewEntryThe meta data entry to replace the specified entry.

SetAudioBitRateL(TInt)

IMPORT_C voidSetAudioBitRateL(TIntaBitRate)

Sets the audio bit rate.

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

Parameters

TInt aBitRateThe audio bit rate in bits/second.

SetAudioChannelsL(const TUint)

IMPORT_C voidSetAudioChannelsL(const TUintaNumChannels)

Sets the number of audio channels to record (1 for mono, 2 for stereo). The client must select the audio codec before calling this method, since not all codecs support stereo or multi-channel recording. If the codec has not been set, this method may accept or reject configurations incorrectly.

If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below. This method can be called after the destination has been opened, but only before calling Prepare().

Pre-condition
The audio codec has been selected.
leave
KErrNotSupported The specified number of channels is not supported or the controller does not support controlling the number of audio channels.
leave
KErrNotReady Invalid state: This method can be called after the destination has been opened, but only before calling Prepare().

Parameters

const TUint aNumChannelsNumber of audio channels to use -- 1 for mono, 2 for stereo.

SetAudioEnabledL(TBool)

IMPORT_C voidSetAudioEnabledL(TBoolaEnabled)

Sets whether the current clip has an audio stream.

Since
7.0s

Parameters

TBool aEnabledA boolean indicating if the audio stream is enabled. ETrue to enable audio, EFalse to disable it.

SetAudioSampleRateL(const TUint)

IMPORT_C voidSetAudioSampleRateL(const TUintaSampleRate)

Sets the sample rate for audio recording. The client must select the audio codec before calling this method, since the supported sample rates depend on the codec. If the codec has not been set, this method may accept or reject configurations incorrectly.

If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below.

Pre-condition
The audio codec has been selected.
leave
KErrNotSupported The specified sample rate is not supported or the controller does not support controlling the audio sample rate.
leave
KErrNotReady Invalid state: This method can be called after the destination has been opened and the audio codec selected, but only before calling Prepare().

Parameters

const TUint aSampleRateSample rate for audio recording.

SetAudioTypeL(TFourCC)

IMPORT_C voidSetAudioTypeL(TFourCCaType)

Sets the audio type. This represents the encoding of the audio data within the current format.

To retrieve a list of available audio codecs, use GetSupportedAudioTypesL().

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

Parameters

TFourCC aTypeThe Four Character Code representing the Audio Type.

SetGainL(TInt)

IMPORT_C voidSetGainL(TIntaGain)

Sets the audio recording gain.

If you want to disable audio, rather than setting the recording gain to 0, use SetAudioEnabledL().

If an error occurs, this function leaves with one of the system wide error codes

Since
7.0s

Parameters

TInt aGainThe recording gain, between 0 and MaxGain().

SetMaxClipSizeL(TInt)

IMPORT_C voidSetMaxClipSizeL(TIntaClipSizeInBytes)

Sets the maximum recording size for a video clip in bytes.

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

Parameters

TInt aClipSizeInBytesThe maximum file size of a video clip. This can be called with the parameter KMMFNoMaxClipSize which signifies no maximum clip size.

SetPixelAspectRatioL(const TVideoAspectRatio &)

IMPORT_C voidSetPixelAspectRatioL(const TVideoAspectRatio &aAspectRatio)

Sets recorded video pixel aspect ratio. The client must select the video codec and set the picture size (SetVideoFrameSizeL()) before calling this method, since the supported aspect ratios may depend on the codec and picture size. If the codec or picture size is not set, the controller may accept or reject pixel aspect ratios incorrectly.

If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below. This method can be called after the destination has been opened, but only before calling Prepare().

Pre-condition
The video codec has been selected.
leave
KErrNotSupported The specified pixel aspect ratio is not supported or the controller does not support the pixel aspect ratio extension.
leave
KErrNotReady Invalid state: This method can be called after the destination has been opened but only before calling Prepare().

Parameters

const TVideoAspectRatio & aAspectRatioVideo pixel aspect ratio. The default aspect ratio is 1:1 (square pixels).

SetPriorityL(TInt, TInt)

IMPORT_C voidSetPriorityL(TIntaPriority,
TIntaPref
)

Sets the recording priority. This is used to arbitrate between simultaneous accesses of the sound hardware.

Parameters

TInt aPriorityThe Priority Value.
TInt aPrefThe Priority Preference.

SetVideoBitRateL(TInt)

IMPORT_C voidSetVideoBitRateL(TIntaBitRate)

Sets the video bit rate.

Since
7.0s

Parameters

TInt aBitRateThe video bit rate in bits/second. This can be called with the parameter KMMFVariableVideoBitRate which specifies a variable bit rate.

SetVideoEnabledL(TBool)

IMPORT_C voidSetVideoEnabledL(TBoolaEnabled)

Enables or disables video recording without affecting audio recording. This API can be used to record audio only clips. Video recording is enabled by default. This can only be called before starting to record.

If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below.

Pre-condition
Recorder is created opened, prepare is not yet called. This API can not be called after prepare.
leave
KErrNotReady Open is not yet called or This API is being called after Prepare().
leave
KErrNotSupported This method is not supported -- video recording is always enabled

Parameters

TBool aEnabledETrue to enable video recording, EFalse to disable it

SetVideoFrameRateFixedL(TBool)

IMPORT_C voidSetVideoFrameRateFixedL(TBoolaFixedFrameRate)

Controls whether video recording framerate set using the API the SetVideoFrameRateL should be fixed or variable. When fixed framerate is requested, the video encoder will try to maintain a constant framerate, even at the expense of picture quality. This will result in a reduced picture quality at lower bitrates, but a smoother framerate.

The fixed framerate setting is not an absolute requirement -- encoders may still skip frames even though a fixed framerate is required, but they should do it less often. Additionally, many encoders will operate at a fixed framerate at higher bitrates regardless of this setting.

By default the framerate is not fixed.

If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below.

Pre-condition
Recorder is created opened, prepare is not yet called. This API can not be called after prepare.
leave
KErrNotReady Open is not yet called or This API is being called after Prepare().
leave
KErrNotSupported This method is not supported.

Parameters

TBool aFixedFrameRateETrue to request a fixed framerate, EFalse to request a variable framerate.

SetVideoFrameRateL(TReal32)

IMPORT_C voidSetVideoFrameRateL(TReal32aFrameRate)

Sets the video frame rate.

Since
7.0s

Parameters

TReal32 aFrameRateThe video frame rate, in frames/second.

SetVideoFrameSizeL(const TSize &)

IMPORT_C voidSetVideoFrameSizeL(const TSize &aSize)

Sets the video frame size in pixels.

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

Parameters

const TSize & aSizeThe video frame size, in pixels

SetVideoQualityL(TInt)

IMPORT_C voidSetVideoQualityL(TIntaQuality)

Controls video recording quality. Setting the video quality using this method will override other bitrate setting, but will not affect picture size, and framerate if VideoFrameRateFixed is set. Changing the bitrate or framerate would override the quality settings. The return value from VideoQualityL() will not reflect the quality accurately after this.

Pre-condition
Recorder is created opened, prepare is not yet called. This API can not be called after Prepare().
leave
KErrNotReady Open is not yet called or This API is being called after Prepare().
leave
KErrNotSupported This method is not supported.
TVideoQuality

Parameters

TInt aQualityVideo quality, in the range of 0 to 100, inclusive. 0 refers to lowest, 25 refers to low, 50 refers to normal, 75 refers to high, and 100 refers to lossless quality as is supported by the codec. Standard set of values defined by enum TVideoQuality.

SetVideoTypeL(const TDesC8 &)

IMPORT_C voidSetVideoTypeL(const TDesC8 &aType)

Sets the codec to use for the video component of the video clip.

This represents the encoding of the video data within the current format. To retrieve a list of available video codecs, use GetSupportedVideoTypesL().

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

Parameters

const TDesC8 & aTypeThe descriptor containing the video MIME type.

Stop()

IMPORT_C TIntStop()

Stops the recording of video data to the specified file, descriptor or URL.

If the video format supports audio tracks and audio is enabled, this function also stops the recording of the audio data.

Recording is stopped without sending the MvruoRecordComplete message to the client.

Since
7.0s

VideoBitRateL()

IMPORT_C TIntVideoBitRateL()

Returns the video bit rate.

Since
7.0s

VideoEnabledL()

IMPORT_C TBoolVideoEnabledL()const

Queries whether video recording is currently enabled or not. If video recording is disabled it will record audio only clip. Video recording is enabled by default.

If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below.

CVideoRecorderUtility::SetVideoEnabledL()

VideoFormatMimeType()

IMPORT_C const TDesC8 &VideoFormatMimeType()const

Returns the video format's MIME type.

Since
7.0s

VideoFrameRateFixedL()

IMPORT_C TBoolVideoFrameRateFixedL()const

Queries the current fixed/variable framerate setting.

If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below.

leave
KErrNotReady Open is not yet called or This API is being called after Prepare().
CVideoRecorderUtility::SetVideoFrameRateFixedL()

VideoFrameRateL()

IMPORT_C TReal32VideoFrameRateL()const

Returns the video frame rate.

If an error occurs, this function leaves with one of the system wide error codes.

Since
7.0s

VideoQualityL()

IMPORT_C TIntVideoQualityL()const

Queries the current video quality setting. The return value may not reflect bitrate and framerate settings made through SetVideoBitRateL() and SetVideoFrameRateL(). Value returned indicate just the quality level set using SetVideoQualityL(). Default value for Quality is EVideoQualityNormal (value 50).

If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below.

leave
KErrNotReady Open is not yet called.
CVideoRecorderUtility::SetVideoQualityL()

Member Enumerations Documentation

Enum TMMFVideoRecorderState

Enumerators

EStopped
EOpening
EPaused
ERecording

Member Data Documentation

CBody * iBody

CBody *iBody[private]