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

Public Member Functions
~CVideoRecorderUtility ()
IMPORT_C void AddMetaDataEntryL (const CMMFMetaDataEntry &)
IMPORT_C TInt AudioBitRateL ()
IMPORT_C TUint AudioChannelsL ()
IMPORT_C TBool AudioEnabledL ()
IMPORT_C TUint AudioSampleRateL ()
IMPORT_C TFourCC AudioTypeL ()
IMPORT_C void Close ()
IMPORT_C const CMMFControllerImplementationInformation & ControllerImplementationInformationL ()
IMPORT_C void CustomCommandAsync (const TMMFMessageDestinationPckg &, TInt , const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus &)
IMPORT_C void CustomCommandAsync (const TMMFMessageDestinationPckg &, TInt , const TDesC8 &, const TDesC8 &, TRequestStatus &)
IMPORT_C TInt CustomCommandSync (const TMMFMessageDestinationPckg &, TInt , const TDesC8 &, const TDesC8 &, TDes8 &)
IMPORT_C TInt CustomCommandSync (const TMMFMessageDestinationPckg &, TInt , const TDesC8 &, const TDesC8 &)
IMPORT_C TTimeIntervalMicroSeconds DurationL ()
IMPORT_C TInt GainL ()
IMPORT_C void GetPixelAspectRatioL ( TVideoAspectRatio &)
IMPORT_C void GetPriorityL ( TInt &, TMdaPriorityPreference &)
IMPORT_C void GetSupportedAudioChannelsL ( RArray < TUint > &)
IMPORT_C void GetSupportedAudioSampleRatesL ( RArray < TUint > &)
IMPORT_C void GetSupportedAudioTypesL ( RArray < TFourCC > &)
IMPORT_C void GetSupportedPixelAspectRatiosL ( RArray < TVideoAspectRatio > &)
IMPORT_C void GetSupportedVideoTypesL (CDesC8Array &)
IMPORT_C void GetVideoFrameSizeL ( TSize &)
IMPORT_C TInt MaxGainL ()
IMPORT_C CMMFMetaDataEntry * MetaDataEntryL ( TInt )
IMPORT_C CVideoRecorderUtility * NewL ( MVideoRecorderUtilityObserver &, TInt , TInt )
IMPORT_C TInt NumberOfMetaDataEntriesL ()
IMPORT_C void OpenDesL ( TDes8 &, TInt , TUid , TUid , const TDesC8 &, TFourCC )
IMPORT_C void OpenFileL (const TDesC &, TInt , TUid , TUid , const TDesC8 &, TFourCC )
IMPORT_C void OpenFileL (const RFile &, TInt , TUid , TUid , const TDesC8 &, TFourCC )
IMPORT_C void OpenUrlL (const TDesC &, TInt , TInt , TUid , TUid , const TDesC8 &, TFourCC )
IMPORT_C void PauseL ()
IMPORT_C void Prepare ()
IMPORT_C void Record ()
IMPORT_C TTimeIntervalMicroSeconds RecordTimeAvailable ()
IMPORT_C void RemoveMetaDataEntryL ( TInt )
IMPORT_C void ReplaceMetaDataEntryL ( TInt , const CMMFMetaDataEntry &)
IMPORT_C void SetAudioBitRateL ( TInt )
IMPORT_C void SetAudioChannelsL (const TUint )
IMPORT_C void SetAudioEnabledL ( TBool )
IMPORT_C void SetAudioSampleRateL (const TUint )
IMPORT_C void SetAudioTypeL ( TFourCC )
IMPORT_C void SetGainL ( TInt )
IMPORT_C void SetMaxClipSizeL ( TInt )
IMPORT_C void SetPixelAspectRatioL (const TVideoAspectRatio &)
IMPORT_C void SetPriorityL ( TInt , TInt )
IMPORT_C void SetVideoBitRateL ( TInt )
IMPORT_C void SetVideoEnabledL ( TBool )
IMPORT_C void SetVideoFrameRateFixedL ( TBool )
IMPORT_C void SetVideoFrameRateL ( TReal32 )
IMPORT_C void SetVideoFrameSizeL (const TSize &)
IMPORT_C void SetVideoQualityL ( TInt )
IMPORT_C void SetVideoTypeL (const TDesC8 &)
IMPORT_C TInt Stop ()
IMPORT_C TInt VideoBitRateL ()
IMPORT_C TBool VideoEnabledL ()
IMPORT_C const TDesC8 & VideoFormatMimeType ()
IMPORT_C TBool VideoFrameRateFixedL ()
IMPORT_C TReal32 VideoFrameRateL ()
IMPORT_C TInt VideoQualityL ()
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
enum TMMFVideoRecorderState { 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 void AddMetaDataEntryL ( 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 & aNewEntry The meta data entry to add.

AudioBitRateL()

IMPORT_C TInt AudioBitRateL ( ) 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 TUint AudioChannelsL ( ) 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 TBool AudioEnabledL ( ) const

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

Since
7.0s

AudioSampleRateL()

IMPORT_C TUint AudioSampleRateL ( ) 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 TFourCC AudioTypeL ( ) 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 void Close ( )

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 void CustomCommandAsync ( const TMMFMessageDestinationPckg & aDestination,
TInt aFunction,
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 & aDestination The destination of the message, consisting of the UID of the interface of this message.
TInt aFunction The function number to indicate which function is to be called on the interface defined in the aDestination parameter.
const TDesC8 & aDataTo1 A 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 & aDataTo2 A 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 & aDataFrom A 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 & aStatus The 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 void CustomCommandAsync ( const TMMFMessageDestinationPckg & aDestination,
TInt aFunction,
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 & aDestination The destination of the message, consisting of the UID of the interface of this message.
TInt aFunction The function number to indicate which function is to be called on the interface defined in the aDestination parameter.
const TDesC8 & aDataTo1 A 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 & aDataTo2 A 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 & aStatus The 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 TInt CustomCommandSync ( const TMMFMessageDestinationPckg & aDestination,
TInt aFunction,
const TDesC8 & aDataTo1,
const TDesC8 & aDataTo2,
TDes8 & aDataFrom
)

Sends a synchronous custom command to the controller.

Since
7.0s

Parameters

const TMMFMessageDestinationPckg & aDestination The destination of the message, consisting of the UID of the interface of this message.
TInt aFunction The function number to indicate which function is to be called on the interface defined in the aDestination parameter.
const TDesC8 & aDataTo1 A 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 & aDataTo2 A 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 & aDataFrom A 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 TInt CustomCommandSync ( const TMMFMessageDestinationPckg & aDestination,
TInt aFunction,
const TDesC8 & aDataTo1,
const TDesC8 & aDataTo2
)

Sends a synchronous custom command to the controller.

Since
7.0s

Parameters

const TMMFMessageDestinationPckg & aDestination The destination of the message, consisting of the UID of the interface of this message.
TInt aFunction The function number to indicate which function is to be called on the interface defined in the aDestination parameter.
const TDesC8 & aDataTo1 A 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 & aDataTo2 A 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 TTimeIntervalMicroSeconds DurationL ( ) const

Returns the length of the video clip.

Since
7.0s

GainL()

IMPORT_C TInt GainL ( ) 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 void GetPixelAspectRatioL ( 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 & aAspectRatio The current video pixel aspect ratio.

GetPriorityL(TInt &, TMdaPriorityPreference &)

IMPORT_C void GetPriorityL ( 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 & aPriority A 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 & aPref Priority preference

GetSupportedAudioChannelsL(RArray< TUint > &)

IMPORT_C void GetSupportedAudioChannelsL ( 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 > & aChannels On return contains an array of supported numbers of audio channels.

GetSupportedAudioSampleRatesL(RArray< TUint > &)

IMPORT_C void GetSupportedAudioSampleRatesL ( 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 > & aSampleRates On return contains an array of supported sample rates.

GetSupportedAudioTypesL(RArray< TFourCC > &)

IMPORT_C void GetSupportedAudioTypesL ( RArray < TFourCC > & aAudioTypes ) const

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

Since
7.0s

Parameters

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

GetSupportedPixelAspectRatiosL(RArray< TVideoAspectRatio > &)

IMPORT_C void GetSupportedPixelAspectRatiosL ( 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 > & aAspectRatios On return contains an array of supported pixel aspect ratios.

GetSupportedVideoTypesL(CDesC8Array &)

IMPORT_C void GetSupportedVideoTypesL ( CDesC8Array & aVideoTypes ) const

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

Since
7.0s

Parameters

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

GetVideoFrameSizeL(TSize &)

IMPORT_C void GetVideoFrameSizeL ( 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 & aSize The video frame size, in pixels.

MaxGainL()

IMPORT_C TInt MaxGainL ( ) const

Returns the maximum possible setting for the recording gain.

Since
7.0s

MetaDataEntryL(TInt)

IMPORT_C CMMFMetaDataEntry * MetaDataEntryL ( TInt aIndex ) 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 aIndex The index of the entry to retrieve. The index is between 0 and NumberOfMetaDataEntriesL()-1.

NewL(MVideoRecorderUtilityObserver &, TInt, TInt)

IMPORT_C CVideoRecorderUtility * NewL ( MVideoRecorderUtilityObserver & aObserver,
TInt aPriority = EMdaPriorityNormal,
TInt aPref = 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 & aObserver An object to receive video recorder notifications.
TInt aPriority = EMdaPriorityNormal The 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 = EMdaPriorityPreferenceTimeAndQuality The 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 TInt NumberOfMetaDataEntriesL ( ) 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 void OpenDesL ( TDes8 & aDescriptor,
TInt aCameraHandle,
TUid aControllerUid,
TUid aVideoFormat,
const TDesC8 & aVideoType =  KNullDesC8 ,
TFourCC aAudioType =  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 & aDescriptor The descriptor used to store the recorded video clip.
TInt aCameraHandle The handle of the camera to record from.
TUid aControllerUid The UID of the controller to use for recording.
TUid aVideoFormat The 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 void OpenFileL ( const TDesC & aFileName,
TInt aCameraHandle,
TUid aControllerUid,
TUid aVideoFormat,
const TDesC8 & aVideoType =  KNullDesC8 ,
TFourCC aAudioType =  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 & aFileName A full path name of the file to save the video clip to.
TInt aCameraHandle A handle to the camera to use for recording.
TUid aControllerUid The UID of the controller to use for recording.
TUid aVideoFormat The 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 void OpenFileL ( const RFile & aFile,
TInt aCameraHandle,
TUid aControllerUid,
TUid aVideoFormat,
const TDesC8 & aVideoType =  KNullDesC8 ,
TFourCC aAudioType =  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 & aFile File handle of file to use for video clip
TInt aCameraHandle A handle to the camera to use for recording.
TUid aControllerUid The UID of the controller to use for recording.
TUid aVideoFormat The 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 void OpenUrlL ( const TDesC & aUrl,
TInt aIapId,
TInt aCameraHandle,
TUid aControllerUid,
TUid aVideoFormat,
const TDesC8 & aVideoType =  KNullDesC8 ,
TFourCC aAudioType =  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 & aUrl The URL used to store the recorded video clip.
TInt aIapId The Id of the internet access point to use.
TInt aCameraHandle The handle of the camera to record from.
TUid aControllerUid The UID of the controller to use for recording.
TUid aVideoFormat The 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 void PauseL ( )

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

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

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 TTimeIntervalMicroSeconds RecordTimeAvailable ( ) const

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

Since
7.0s

RemoveMetaDataEntryL(TInt)

IMPORT_C void RemoveMetaDataEntryL ( TInt aIndex )

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 aIndex The index of the meta data entry to remove.

ReplaceMetaDataEntryL(TInt, const CMMFMetaDataEntry &)

IMPORT_C void ReplaceMetaDataEntryL ( TInt aIndex,
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 aIndex The index of the meta data entry to replace.
const CMMFMetaDataEntry & aNewEntry The meta data entry to replace the specified entry.

SetAudioBitRateL(TInt)

IMPORT_C void SetAudioBitRateL ( TInt aBitRate )

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 aBitRate The audio bit rate in bits/second.

SetAudioChannelsL(const TUint)

IMPORT_C void SetAudioChannelsL ( const TUint aNumChannels )

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 aNumChannels Number of audio channels to use -- 1 for mono, 2 for stereo.

SetAudioEnabledL(TBool)

IMPORT_C void SetAudioEnabledL ( TBool aEnabled )

Sets whether the current clip has an audio stream.

Since
7.0s

Parameters

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

SetAudioSampleRateL(const TUint)

IMPORT_C void SetAudioSampleRateL ( const TUint aSampleRate )

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 aSampleRate Sample rate for audio recording.

SetAudioTypeL(TFourCC)

IMPORT_C void SetAudioTypeL ( TFourCC aType )

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 aType The Four Character Code representing the Audio Type.

SetGainL(TInt)

IMPORT_C void SetGainL ( TInt aGain )

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 aGain The recording gain, between 0 and MaxGain().

SetMaxClipSizeL(TInt)

IMPORT_C void SetMaxClipSizeL ( TInt aClipSizeInBytes )

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 aClipSizeInBytes The 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 void SetPixelAspectRatioL ( 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 & aAspectRatio Video pixel aspect ratio. The default aspect ratio is 1:1 (square pixels).

SetPriorityL(TInt, TInt)

IMPORT_C void SetPriorityL ( TInt aPriority,
TInt aPref
)

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

Parameters

TInt aPriority The Priority Value.
TInt aPref The Priority Preference.

SetVideoBitRateL(TInt)

IMPORT_C void SetVideoBitRateL ( TInt aBitRate )

Sets the video bit rate.

Since
7.0s

Parameters

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

SetVideoEnabledL(TBool)

IMPORT_C void SetVideoEnabledL ( TBool aEnabled )

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 aEnabled ETrue to enable video recording, EFalse to disable it

SetVideoFrameRateFixedL(TBool)

IMPORT_C void SetVideoFrameRateFixedL ( TBool aFixedFrameRate )

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 aFixedFrameRate ETrue to request a fixed framerate, EFalse to request a variable framerate.

SetVideoFrameRateL(TReal32)

IMPORT_C void SetVideoFrameRateL ( TReal32 aFrameRate )

Sets the video frame rate.

Since
7.0s

Parameters

TReal32 aFrameRate The video frame rate, in frames/second.

SetVideoFrameSizeL(const TSize &)

IMPORT_C void SetVideoFrameSizeL ( 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 & aSize The video frame size, in pixels

SetVideoQualityL(TInt)

IMPORT_C void SetVideoQualityL ( TInt aQuality )

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 aQuality Video 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 void SetVideoTypeL ( 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 & aType The descriptor containing the video MIME type.

Stop()

IMPORT_C TInt Stop ( )

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

Returns the video bit rate.

Since
7.0s

VideoEnabledL()

IMPORT_C TBool VideoEnabledL ( ) 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 TBool VideoFrameRateFixedL ( ) 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 TReal32 VideoFrameRateL ( ) 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 TInt VideoQualityL ( ) 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]