CCMRMediaRecorder Class Reference

class CCMRMediaRecorder : public CBase

Abstract Media recorder interface

CAMCMEDIARECORDER.LIB
Since
2.1

Inherits from

Public Member Functions
TInt AudioBitRateL ()
TBool AudioEnabledL ()
TInt GainL ()
void GetAudioCodecL ( TFourCC &)
void GetSupportedAudioCodecsL ( RArray < TFourCC > &)
void GetSupportedVideoCodecsL ( CDesC8Array &)
void GetVideoCodecL ( TDes8 &)
void GetVideoFrameSizeL ( TSize &)
void GetVideoRateControlOptionsL ( TRateControlOptions &)
TInt MaxGainL ()
TInt MaxTotalBitRateL ()
IMPORT_C CCMRMediaRecorder * NewL ()
void OpenL ( MCMRMediaRecorderObserver *, MDataSource *, MCMRMediaSink *, TInt , const TDesC8 &, TFourCC )
void PauseL ()
void PrepareL ()
void RecordL ()
void ResumeL ()
void SetAudioBitRateL ( TInt )
void SetAudioCodecL (const TFourCC &)
void SetAudioEnabledL ( TBool )
void SetAudioPriorityL (const TMMFPrioritySettings &)
void SetGainL ( TInt )
void SetMaxTotalBitRateL ( TInt )
void SetPreferredVideoEncapsulationL ( TVideoDataUnitEncapsulation )
void SetPreferredVideoEncoderL ( TUid &)
void SetSegmentTargetSizeL ( TUint , TUint , TUint )
void SetVideoBitRateL ( TInt )
void SetVideoCodecL (const TDesC8 &)
void SetVideoCodingOptionsL (const TCCMRVideoCodingOptions &)
void SetVideoFrameRateL ( TReal32 )
void SetVideoFrameSizeL (const TSize &)
void SetVideoRateControlOptionsL (const TRateControlOptions &)
TRecorderState State ()
void StopL ()
TInt VideoBitRateL ()
TReal32 VideoFrameRateL ()
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()
Public Member Enumerations
enum TRecorderState {
EStateNone  = 0, EStateOpen , EStatePreparing , EStateReadyToRecord , EStateRecording , EStatePaused , EStateStopping , EStatePausing
}

Member Functions Documentation

AudioBitRateL()

TInt AudioBitRateL ( ) [pure virtual]
Gets the current target audio bitrate
Since
2.1

AudioEnabledL()

TBool AudioEnabledL ( ) const [pure virtual]
Query whether audio recording is enabled
Since
2.1

GainL()

TInt GainL ( ) const [pure virtual]
Get current audio recording gain
Since
2.1

GetAudioCodecL(TFourCC &)

void GetAudioCodecL ( TFourCC & aAudioType ) [pure virtual]
Get the currently used audio codec
Since
2.1

Parameters

TFourCC & aAudioType Used codec as FourCC

GetSupportedAudioCodecsL(RArray< TFourCC > &)

void GetSupportedAudioCodecsL ( RArray < TFourCC > & aAudioTypes ) [pure virtual]
Get supported & installed audio codecs
Since
2.1

Parameters

RArray < TFourCC > & aAudioTypes List of supported & installed audio codecs

GetSupportedVideoCodecsL(CDesC8Array &)

void GetSupportedVideoCodecsL ( CDesC8Array & aVideoMimeTypes ) [pure virtual]
Get supported & installed video codecs This can be called also when the recorder is not open
Since
2.1

Parameters

CDesC8Array & aVideoMimeTypes List of supported & installed video codecs as mime type

GetVideoCodecL(TDes8 &)

void GetVideoCodecL ( TDes8 & aVideoMimeType ) [pure virtual]
Get the currently used video codec
Since
2.1

Parameters

TDes8 & aVideoMimeType Used codec as mime type

GetVideoFrameSizeL(TSize &)

void GetVideoFrameSizeL ( TSize & aSize ) const [pure virtual]
Get current video frame size
Since
2.1

Parameters

TSize & aSize Current size (Output)

GetVideoRateControlOptionsL(TRateControlOptions &)

void GetVideoRateControlOptionsL ( TRateControlOptions & aOptions ) [pure virtual]

Gets current video bit-rate control options for a whole bitstream. This method can only be called after the media recorder has been prepared or during recording.

Since
3.2

Parameters

TRateControlOptions & aOptions "Current bitrate control options."

MaxGainL()

TInt MaxGainL ( ) const [pure virtual]
Get maximum audio recording gain
Since
2.1

MaxTotalBitRateL()

TInt MaxTotalBitRateL ( ) const [pure virtual]
Get current maximum total (audio+video) bitrate
Since
2.1

NewL()

IMPORT_C CCMRMediaRecorder * NewL ( ) [static]

Two-phased constructor.

OpenL(MCMRMediaRecorderObserver *, MDataSource *, MCMRMediaSink *, TInt, const TDesC8 &, TFourCC)

void OpenL ( MCMRMediaRecorderObserver * aObserver,
MDataSource * aAudioSource,
MCMRMediaSink * aSink,
TInt aCameraHandle,
const TDesC8 & aVideoMimeType =  KNullDesC8 ,
TFourCC aAudioType =  KFourCCNULL
) [pure virtual]
Open the recorder: Creates A/V recorders & other needed components
Since
2.1

Parameters

MCMRMediaRecorderObserver * aObserver Mediarecorder observer
MDataSource * aAudioSource MMF audio source
MCMRMediaSink * aSink MCMRMediaSink for data output
TInt aCameraHandle Camera handle
const TDesC8 & aVideoMimeType =  KNullDesC8 Video codec MIME-type (default: KNullDesC8 => use default codec)
TFourCC aAudioType =  KFourCCNULL Audio coded FourCC (default: KFourCCNULL => use default codec)

PauseL()

void PauseL ( ) [pure virtual]
Pauses recording
Since
2.1

PrepareL()

void PrepareL ( ) [pure virtual]
Prepares the recorder, for minimising latency in starting
Since
2.1

RecordL()

void RecordL ( ) [pure virtual]
Starts recording audio and video
Since
2.1

ResumeL()

void ResumeL ( ) [pure virtual]
Resumes recording from Pause
Since
2.1

SetAudioBitRateL(TInt)

void SetAudioBitRateL ( TInt aBitRate ) [pure virtual]
Set bitrate for audio codec. If we use AMR-NB, the given bitrate is interpreted proprietarily: bitrates that are not exactly AMR bitrates mean that voice activity detection is used and the actual AMR bitrate is the given bitrate rounded upwards to the next AMR bitrate. E.g. aBitRate = 5500 means the AMR bit-rate is 5900 and VAD is enabled
Since
2.1

Parameters

TInt aBitRate New bitrate

SetAudioCodecL(const TFourCC &)

void SetAudioCodecL ( const TFourCC & aAudioType ) [pure virtual]
Set audio codec to be used (overrides the one given in OpenL)
Since
2.1

Parameters

const TFourCC & aAudioType Audio codec as FourCC

SetAudioEnabledL(TBool)

void SetAudioEnabledL ( TBool aEnabled ) [pure virtual]
Toggles audio recording on/off NOTE: This cannot be used during recording!
Since
2.1

Parameters

TBool aEnabled If ETrue, audio will be recorded

SetAudioPriorityL(const TMMFPrioritySettings &)

void SetAudioPriorityL ( const TMMFPrioritySettings & aPrioritySettings ) [pure virtual]
Set audio priority settings
Since
2.1

Parameters

const TMMFPrioritySettings & aPrioritySettings audio priority settings

SetGainL(TInt)

void SetGainL ( TInt aGain ) [pure virtual]
Set new audio recording input gain
Since
2.1

Parameters

TInt aGain New gain

SetMaxTotalBitRateL(TInt)

void SetMaxTotalBitRateL ( TInt aBitRate ) [pure virtual]
Set new maximum total (audio+video) bitrate
Since
2.1

Parameters

TInt aBitRate New bitrate

SetPreferredVideoEncapsulationL(TVideoDataUnitEncapsulation)

void SetPreferredVideoEncapsulationL ( TVideoDataUnitEncapsulation aCapsulation ) [pure virtual]

Set video encoder output format encapsulation for H.264 / AVC. Usage optional. This overrides Media Recorder internal default preferences for TVideoDataUnitEncapsulation if used encoder supports multiple encapsulations.

Default for H.264 / AVC is: EDuGenericPayload

Since
3.2.3

Parameters

TVideoDataUnitEncapsulation aCapsulation "Encapsulation for coded video data units."

SetPreferredVideoEncoderL(TUid &)

void SetPreferredVideoEncoderL ( TUid & aEncoder ) [pure virtual]

Set video encoder using its UID. Usage optional. This overrides Media Recorder internal search for encoder based on set video mime type ( SetVideoCodecL() ).

Since
3.2.3

Parameters

TUid & aEncoder "Video encoder UID."

SetSegmentTargetSizeL(TUint, TUint, TUint)

void SetSegmentTargetSizeL ( TUint aLayer,
TUint aSizeBytes,
TUint aSizeMacroblocks
) [pure virtual]
Set video encoder target segment size. Usage optional. Exposes CMMFDevVideoRecord::SetSegmentTargetSize (devvideorecord.h) to MediaRecorder clients. Typically used in video sharing use case instead of local video recording.
Since
5.2

Parameters

TUint aLayer "Layer number. Layers are numbered [0 n-1], where n is the number of layers available. Use zero if layered bit-rate scalability is not used."
TUint aSizeBytes "Segment target size in bytes. Set to zero to use unlimited segment size. The segment size in bytes should include all data that is typically stored or transmitted for each segment in the format currently in use. This includes all related headers." @param "aSizeMacroblocks" "Segment target size in number of macroblocks per segment. Set to zero to use unlimited segment size."
TUint aSizeMacroblocks

SetVideoBitRateL(TInt)

void SetVideoBitRateL ( TInt aBitRate ) [pure virtual]
Set new target video bitrate. Possible to change also when recording.
Since
2.1

Parameters

TInt aBitRate Target bitrate in bps, or KMMFVariableVideoBitRate

SetVideoCodecL(const TDesC8 &)

void SetVideoCodecL ( const TDesC8 & aVideoMimeType ) [pure virtual]
Set video codec to be used (overrides the one given in OpenL)
Since
2.1

Parameters

const TDesC8 & aVideoMimeType video mime type

SetVideoCodingOptionsL(const TCCMRVideoCodingOptions &)

void SetVideoCodingOptionsL ( const TCCMRVideoCodingOptions & aOptions ) [pure virtual]
Set misc video coding options
Since
2.1

Parameters

const TCCMRVideoCodingOptions & aOptions video coding options

SetVideoFrameRateL(TReal32)

void SetVideoFrameRateL ( TReal32 aFrameRate ) [pure virtual]
Set new video frame rate (encoding and capturing). Possible to change also when recording but then affects only to encoding rate and cannot increase higher than capturing rate set in the initialization.
Since
2.1

Parameters

TReal32 aFrameRate New frame rate

SetVideoFrameSizeL(const TSize &)

void SetVideoFrameSizeL ( const TSize & aSize ) [pure virtual]
Set new video frame size. Possible only when not recording
Since
2.1

Parameters

const TSize & aSize New size

SetVideoRateControlOptionsL(const TRateControlOptions &)

void SetVideoRateControlOptionsL ( const TRateControlOptions & aOptions ) [pure virtual]

Sets the video bitrate control options for a whole bitstream. This method can only be called after the media recorder has been prepared or during recording.

Since
3.2

Parameters

const TRateControlOptions & aOptions "Bitrate control options."

State()

TRecorderState State ( ) [pure virtual]
Returns the current state of the recorder
Since
2.1

StopL()

void StopL ( ) [pure virtual]
Stops recording audio and video
Since
2.1

VideoBitRateL()

TInt VideoBitRateL ( ) [pure virtual]
Get current target video bitrate
Since
2.1

VideoFrameRateL()

TReal32 VideoFrameRateL ( ) [pure virtual]
Get current video frame rate
Since
2.1

Member Enumerations Documentation

Enum TRecorderState

Enumerators

EStateNone = 0
EStateOpen
EStatePreparing
EStateReadyToRecord
EStateRecording
EStatePaused
EStateStopping
EStatePausing