CMMFDevVideoRecord Class Reference

class CMMFDevVideoRecord : public CBase

CMMFDevVideoRecord is the main client class of DevVideoRecord.

Inherits from

Nested Classes and Structures

Public Member Functions
~CMMFDevVideoRecord()
IMPORT_C voidCancelSupplementalInfo()
IMPORT_C HBufC8 *CodingStandardSpecificInitOutputLC()
IMPORT_C HBufC8 *CodingStandardSpecificSettingsOutputLC()
IMPORT_C voidCommitL()
IMPORT_C TAny *CustomInterface(THwDeviceId, TUid)
IMPORT_C voidFindEncodersL(const TDesC8 &, TUint32, RArray< TUid > &, TBool)
IMPORT_C voidFindPreProcessorsL(TUint32, RArray< TUid > &)
IMPORT_C voidFreeze()
IMPORT_C voidGetEncoderListL(RArray< TUid > &)
IMPORT_C voidGetFrameStabilisationOutput(THwDeviceId, TRect &)
IMPORT_C voidGetOutputBufferStatus(TUint &, TUint &)
IMPORT_C voidGetPictureCounters(TPictureCounters &)
IMPORT_C voidGetPreProcessorListL(RArray< TUid > &)
IMPORT_C HBufC8 *ImplementationSpecificInitOutputLC()
IMPORT_C HBufC8 *ImplementationSpecificSettingsOutputLC()
IMPORT_C voidInitialize()
IMPORT_C voidInputEnd()
IMPORT_C CMMFDevVideoRecord *NewL(MMMFDevVideoRecordObserver &)
IMPORT_C TVideoOutputBuffer *NextBufferL()
IMPORT_C TUintNumComplexityLevels(THwDeviceId)
IMPORT_C TUintNumDataBuffers()
IMPORT_C voidPause()
IMPORT_C voidPictureLoss()
IMPORT_C voidPictureLoss(const TArray< TPictureId > &)
IMPORT_C CPreProcessorInfo *PreProcessorInfoLC(TUid)
IMPORT_C TTimeIntervalMicroSecondsRecordingPosition()
IMPORT_C voidReferencePictureSelection(const TDesC8 &)
IMPORT_C voidReleaseFreeze()
IMPORT_C voidResume()
IMPORT_C voidReturnBuffer(TVideoOutputBuffer *)
IMPORT_C voidRevert()
IMPORT_C THwDeviceIdSelectEncoderL(TUid)
IMPORT_C THwDeviceIdSelectPreProcessorL(TUid)
IMPORT_C voidSendSupplementalInfoL(const TDesC8 &)
IMPORT_C voidSendSupplementalInfoL(const TDesC8 &, const TTimeIntervalMicroSeconds &)
IMPORT_C voidSetBufferOptionsL(const TEncoderBufferOptions &)
IMPORT_C voidSetChannelBitErrorRate(TUint, TReal, TReal)
IMPORT_C voidSetChannelPacketLossRate(TUint, TReal, TTimeIntervalMicroSeconds32)
IMPORT_C voidSetClockSource(MMMFClockSource *)
IMPORT_C voidSetCodingStandardSpecificOptionsL(const TDesC8 &)
IMPORT_C voidSetColorEnhancementOptionsL(THwDeviceId, const TColorEnhancementOptions &)
IMPORT_C voidSetComplexityLevel(THwDeviceId, TUint)
IMPORT_C voidSetCustomPreProcessOptionsL(THwDeviceId, const TDesC8 &)
IMPORT_C voidSetErrorProtectionLevelL(TUint, TUint, TUint)
IMPORT_C voidSetErrorProtectionLevelsL(TUint, TBool)
IMPORT_C voidSetErrorsExpected(TBool, TBool)
IMPORT_C voidSetFrameStabilisationOptionsL(THwDeviceId, const TSize &, TBool)
IMPORT_C voidSetGlobalReferenceOptions(TUint, TUint)
IMPORT_C voidSetImplementationSpecificEncoderOptionsL(const TDesC8 &)
IMPORT_C voidSetInLayerScalabilityL(TUint, TUint, TInLayerScalabilityType, const TArray< TUint > &, const TArray< TUint > &)
IMPORT_C voidSetInputCropOptionsL(THwDeviceId, const TRect &)
IMPORT_C voidSetInputFormatL(THwDeviceId, const TUncompressedVideoFormat &, const TSize &)
IMPORT_C voidSetLayerPromotionPointPeriod(TUint, TUint)
IMPORT_C voidSetLayerReferenceOptions(TUint, TUint, TUint)
IMPORT_C voidSetMinRandomAccessRate(TReal)
IMPORT_C voidSetNumBitrateLayersL(TUint)
IMPORT_C voidSetOutputCropOptionsL(THwDeviceId, const TRect &)
IMPORT_C voidSetOutputFormatL(THwDeviceId, const CCompressedVideoFormat &, TVideoDataUnitType, TVideoDataUnitEncapsulation, TBool)
IMPORT_C voidSetOutputFormatL(THwDeviceId, const TUncompressedVideoFormat &)
IMPORT_C voidSetOutputPadOptionsL(THwDeviceId, const TSize &, const TPoint &)
IMPORT_C voidSetOutputRectL(THwDeviceId, const TRect &)
IMPORT_C voidSetPreProcessTypesL(THwDeviceId, TUint32)
IMPORT_C voidSetRateControlOptions(TUint, const TRateControlOptions &)
IMPORT_C voidSetRgbToYuvOptionsL(THwDeviceId, TRgbRange, const TYuvFormat &)
IMPORT_C voidSetRotateOptionsL(THwDeviceId, TRotationType)
IMPORT_C voidSetScalabilityLayerTypeL(TUint, TScalabilityType)
IMPORT_C voidSetScaleOptionsL(THwDeviceId, const TSize &, TBool)
IMPORT_C voidSetSegmentTargetSize(TUint, TUint, TUint)
IMPORT_C voidSetSourceCameraL(TInt, TReal)
IMPORT_C voidSetSourceMemoryL(TReal, TBool, TBool)
IMPORT_C voidSetYuvToYuvOptionsL(THwDeviceId, const TYuvFormat &, const TYuvFormat &)
IMPORT_C voidSliceLoss(TUint, TUint, const TPictureId &)
IMPORT_C voidStart()
IMPORT_C voidStop()
IMPORT_C CVideoEncoderInfo *VideoEncoderInfoLC(TUid)
IMPORT_C voidWritePictureL(TVideoPicture *)
Private Member Functions
CMMFDevVideoRecord(MMMFDevVideoRecordObserver &)
CMMFVideoRecordHwDevice &CapturingHwDevice()
voidCheckInitializationState(TUint)
voidConnectPlugins()
CMMFVideoEncodeHwDevice *CreateEncoderL(TUid)
voidHandleEncoderInitializeComplete(TInt)
voidHandlePreProcInitializeComplete(TInt)
voidMdvrpFatalError(CMMFVideoHwDevice *, TInt)
voidMdvrpInitializeComplete(CMMFVideoHwDevice *, TInt)
voidMdvrpNewBuffer(TVideoOutputBuffer *)
voidMdvrpReturnPicture(TVideoPicture *)
voidMdvrpStreamEnd()
voidMdvrpSupplementalInfoSent()
CMMFVideoEncodeHwDevice &VideoEncodeHwDevice(THwDeviceId)
CMMFVideoEncodeHwDevice &VideoEncodeHwDevice()
CMMFVideoHwDevice &VideoHwDevice(THwDeviceId)
CMMFVideoPreProcHwDevice &VideoPreProcHwDevice(THwDeviceId)
CMMFVideoPreProcHwDevice &VideoPreProcHwDevice()
CMMFVideoRecordHwDevice &VideoRecordHwDevice(THwDeviceId)
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
enumTInitializationState { ENotInitialized = 0x01, EInitializing = 0x02, EInitialized = 0x04, EInitializationFailed = 0x08 }
Private Attributes
TUint iInitializationState
TBool iIsPreProcComplete
TUint iNumberOfMdvrpStreamEndCallbacks
TUint iNumberOfVideoOutputBuffers
MMMFDevVideoRecordObserver &iObserver
CMMFVideoEncodeHwDevice *iVideoEncodeHwDevice
TDblQue< TVideoOutputBuffer >iVideoOutputBufferQue
TDblQueIter< TVideoOutputBuffer >iVideoOutputBufferQueIter
CMMFVideoPreProcHwDevice *iVideoPreProcHwDevice

Constructor & Destructor Documentation

CMMFDevVideoRecord(MMMFDevVideoRecordObserver &)

CMMFDevVideoRecord(MMMFDevVideoRecordObserver &aObserver)[private]

Parameters

MMMFDevVideoRecordObserver & aObserver

~CMMFDevVideoRecord()

IMPORT_C~CMMFDevVideoRecord()

Destructor.

Member Functions Documentation

CancelSupplementalInfo()

IMPORT_C voidCancelSupplementalInfo()

Cancels the current supplemental information send request. The memory buffer reserved for supplemental information data can be reused or deallocated after the method returns. "This method can only be called after the API has been initialized with Initialize()."

CapturingHwDevice()

CMMFVideoRecordHwDevice &CapturingHwDevice()const [private]

CheckInitializationState(TUint)

voidCheckInitializationState(TUintaExpected)[private]

Parameters

TUint aExpected

CodingStandardSpecificInitOutputLC()

IMPORT_C HBufC8 *CodingStandardSpecificInitOutputLC()

Returns coding-standard specific initialization output from the encoder. The information can contain, for example, the MPEG-4 VOL header. This method can be called after Initialize() has been called.

"Coding-standard specific initialization output. The data format is coding-standard specific and defined separately. The buffer is pushed to the cleanup stack, and the caller is responsible for deallocating it."

leave

"The method will leave if an error occurs."

"This method can only be called after the API has been initialized with Initialize()."

CodingStandardSpecificSettingsOutputLC()

IMPORT_C HBufC8 *CodingStandardSpecificSettingsOutputLC()

Returns coding-standard specific settings output from the encoder. The information can contain, for example, some bitstream headers that can change based on settings modified while encoding is in progress.

"Coding-standard specific output. The data format is coding-standard specific and defined separately. The buffer is pushed to the cleanup stack, and the caller is responsible for deallocating it."

leave

"The method will leave if an error occurs."

"This method can only be called after the API has been initialized with Initialize()."

CommitL()

IMPORT_C voidCommitL()

Commit all configuration changes since the last CommitL(), Revert() or Initialize(). This only applies to methods that can be called both before AND after DevVideoRecord has been initialized. See the following methods for details.

SetOutputRectL

SetPreProcessTypesL

SetRotateOptionsL

SetScaleOptionsL

SetInputCropOptionsL

SetOutputCropOptionsL

SetOutputPadOptionsL

SetColorEnhancementOptionsL

SetFrameStabilisationOptionsL

SetCustomPreProcessOptionsL

SetCodingStandardSpecificOptionsL

SetImplementationSpecificEncoderOptionsL

leave

"The method will leave if an error occurs."

"This method can only be called after the API has been initialized with Initialize()."

ConnectPlugins()

voidConnectPlugins()[private]

CreateEncoderL(TUid)

CMMFVideoEncodeHwDevice *CreateEncoderL(TUidaVideoEncoder)[private]

Parameters

TUid aVideoEncoder

CustomInterface(THwDeviceId, TUid)

IMPORT_C TAny *CustomInterface(THwDeviceIdaHwDevice,
TUidaInterface
)

Retrieves a custom interface to the specified hardware device.

Parameters

THwDeviceId aHwDevice"The hardware device from which the custom interface shall be requested. The value is returned from SelectDecoderL() or SelectPostProcessorL() when the device is selected." @param "aInterface" "Interface UID, defined with the custom interface." @return "Pointer to the interface implementation, or NULL if the device does not implement the interface requested. The return value must be cast to the correct type by the user."
TUid aInterface

FindEncodersL(const TDesC8 &, TUint32, RArray< TUid > &, TBool)

IMPORT_C voidFindEncodersL(const TDesC8 &aMimeType,
TUint32aPreProcType,
RArray< TUid > &aEncoders,
TBoolaExactMatch = ETrue
)

Finds all available encoders for a given video type with support for certain pre-processing operations. The video type is specified using its MIME type, which may include parameters specifying the supported level, version, and other information. Encoder hardware devices can use wildcards when listing the supported video types in the ECom registration information, so it is possible that all the encoders returned do not support the specified submode, e.g. profile and level, unless aExactMatch is set.

The encoder capabilities can be checked with VideoEncoderInfoLC().

leave

"The method will leave if an error occurs. Typical error codes used: -KErrNotFound - No encoders were found matching the search parameters."

Parameters

const TDesC8 & aMimeType"The video type that will be encoded."
TUint32 aPreProcType"The pre-processing types that the encoder has to support, a binary OR of TPrePostProcessType values. If no pre-processing support is needed, set this value to zero." @param "aEncoders" "An array for the result encoder UIDs. The array must be created and destroyed by the caller." @param "aExactMatch" "True if exact matching should be used. In this case only encoders that support exactly the MIME-type given will be returned. Since verifying this may require loading the encoders into memory, this can be a fairly expensive operation, and if the user needs to verify their capabilities further in any case this parameter should be set to EFalse."
RArray< TUid > & aEncoders
TBool aExactMatch = ETrue

FindPreProcessorsL(TUint32, RArray< TUid > &)

IMPORT_C voidFindPreProcessorsL(TUint32aPreProcType,
RArray< TUid > &aPreProcessors
)

Finds all available pre-processors for a given set of pre-processing operations.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotFound - No pre-processors were found matching the search parameters."

Parameters

TUint32 aPreProcType"The pre-processing types that the device has to support, a binary OR of TPrePostProcessType values."
RArray< TUid > & aPreProcessors"An array for the result pre-processor UIDs. The array must be created and destroyed by the caller."

Freeze()

IMPORT_C voidFreeze()

Freezes the input picture. Freezing is similar to a pause, except that timestamps are incremented normally during a freeze. Normal encoding can be continued using ReleaseFreeze().

Freeze is typically used in video telephony applications to stop sending new pictures. In that situation the audio encoding can still continue normally, and thus the clock source timestamps are incremented normally. When the freeze is released, the encoder assumes that input picture timestamps have been incremented normally. If direct capture is used, the picture timestamps are updated as if encoding had been going on throughout the freeze. "This method can only be called after the API has been initialized with Initialize()."

GetEncoderListL(RArray< TUid > &)

IMPORT_C voidGetEncoderListL(RArray< TUid > &aEncoders)

Retrieves a list of available video encoders in the system. leave

"The method will leave if an error occurs. Not finding any encoders is not treated as an error condition: in this situation, aEncoders will be empty."

Parameters

RArray< TUid > & aEncoders"An array for the result encoder UIDs. The array must be created and destroyed by the caller."

GetFrameStabilisationOutput(THwDeviceId, TRect &)

IMPORT_C voidGetFrameStabilisationOutput(THwDeviceIdaHwDevice,
TRect &aRect
)

Reads the frame stabilisation output picture position. This information can be used for positioning the viewfinder. The position returned is the stabilisation result for the most recent input picture.

Parameters

THwDeviceId aHwDevice"The hardware device to query. The value is returned from SelectEncoderL() or SelectPreProcessorL() when the device is selected."
TRect & aRect"The position of the stabilisation output picture inside the input picture. If frame stabilisation is not used, the rectangle is set to cover the entire input picture." @pre "This method can only be called after the API has been initialized with Initialize()."

GetOutputBufferStatus(TUint &, TUint &)

IMPORT_C voidGetOutputBufferStatus(TUint &aNumFreeBuffers,
TUint &aTotalFreeBytes
)

Gets the current output buffer status. The information includes the number of free output buffers and the total size of free buffers in bytes.

"This method can only be called after the API has been initialized with Initialize()."

Parameters

TUint & aNumFreeBuffers"Target for the number of free output buffers."
TUint & aTotalFreeBytes"Target for the total free buffer size in bytes."

GetPictureCounters(TPictureCounters &)

IMPORT_C voidGetPictureCounters(TPictureCounters &aCounters)

Reads various counters related to processed video pictures. See the definition of TPictureCounters for a description of the counters. The counters are reset when Initialize() or this method is called, and thus they only include pictures processed since the last call.

"This method can only be called after the API has been initialized with Initialize()."

Parameters

TPictureCounters & aCounters"The counter structure to fill."

GetPreProcessorListL(RArray< TUid > &)

IMPORT_C voidGetPreProcessorListL(RArray< TUid > &aPreProcessors)

Retrieves a list of available video pre-processor hardware devices in the system. leave

"The method will leave if an error occurs. Not finding any pre-processors is not treated as an error condition: in this situation, aPreProcessors will be empty."

Parameters

RArray< TUid > & aPreProcessors"An array for the result pre-processor UIDs. The array must be created and destroyed by the caller."

HandleEncoderInitializeComplete(TInt)

voidHandleEncoderInitializeComplete(TIntaError)[private]

Parameters

TInt aError

HandlePreProcInitializeComplete(TInt)

voidHandlePreProcInitializeComplete(TIntaError)[private]

Parameters

TInt aError

ImplementationSpecificInitOutputLC()

IMPORT_C HBufC8 *ImplementationSpecificInitOutputLC()

Returns implementation-specific initialization output from the encoder. This method can be called after Initialize() has been called.

"Implementation-specific initialization output. The data format is specific to the encoder implementation, and defined by the encoder supplier. The buffer is pushed to the cleanup stack, and the caller is responsible for deallocating it."

leave

"The method will leave if an error occurs."

"This method can only be called after the API has been initialized with Initialize()."

ImplementationSpecificSettingsOutputLC()

IMPORT_C HBufC8 *ImplementationSpecificSettingsOutputLC()

Returns implementation-specific settings output from the encoder. The information can contain, for example, some bitstream headers that can change based on settings modified while encoding is in progress.

"Implementation-specific initialization output. The data format is implementation-specific and defined separately by the encoder supplier. The buffer is pushed to the cleanup stack, and the caller is responsible for deallocating it."

leave

"The method will leave if an error occurs."

"This method can only be called after the API has been initialized with Initialize()."

Initialize()

IMPORT_C voidInitialize()

Initializes the video devices, and reserves hardware resources. This method is asynchronous, DevVideoRecord will call MMMFDevVideoRecordObserver::MdvroInitializeComplete() after initialization has completed. If direct capture is used, this method also prepares the camera API for capture by calling PrepareVideoCaptureL(). No DevVideoRecord method may be called while initialization is in progress, the initialization process can only be cancelled by destroying the DevVideoRecord object.

After initialization has successfully been completed, video capturing and encoding can be started with Start() with a relatively low delay since the hardware has already been set up.

If Initialize() fails, the DevVideoRecord object must be destroyed, and set up from scratch.

Error handling: Errors are reported using the MdvroInitializeComplete() callback method. Typical error codes used:
  • KErrHardwareNotAvailable - Not enough free video processing hardware resources

  • KErrNotSupported - The current configuration is not supported.

"This method can only be called before the API has been initialized."

InputEnd()

IMPORT_C voidInputEnd()

Notifies the system that the end of input data has been reached. No more input data can be written through the API. The encoder and pre-processor can use this signal to ensure that the remaining data gets processed, without waiting for new data. After the remaining data has been processed, the client gets notified by the MdvroStreamEnd() callback.

This method is mainly useful for file-to-file conversions and other non-realtime processing. For real-time recording all pictures are processed or discarded according to their timestamps. "This method can only be called after the API has been initialized with Initialize()."

MdvrpFatalError(CMMFVideoHwDevice *, TInt)

voidMdvrpFatalError(CMMFVideoHwDevice *aDevice,
TIntaError
)[private, virtual]

Parameters

CMMFVideoHwDevice * aDevice
TInt aError

MdvrpInitializeComplete(CMMFVideoHwDevice *, TInt)

voidMdvrpInitializeComplete(CMMFVideoHwDevice *aDevice,
TIntaError
)[private, virtual]

Parameters

CMMFVideoHwDevice * aDevice
TInt aError

MdvrpNewBuffer(TVideoOutputBuffer *)

voidMdvrpNewBuffer(TVideoOutputBuffer *aBuffer)[private, virtual]

Parameters

TVideoOutputBuffer * aBuffer

MdvrpReturnPicture(TVideoPicture *)

voidMdvrpReturnPicture(TVideoPicture *aPicture)[private, virtual]

Parameters

TVideoPicture * aPicture

MdvrpStreamEnd()

voidMdvrpStreamEnd()[private, virtual]

MdvrpSupplementalInfoSent()

voidMdvrpSupplementalInfoSent()[private, virtual]

NewL(MMMFDevVideoRecordObserver &)

IMPORT_C CMMFDevVideoRecord *NewL(MMMFDevVideoRecordObserver &aObserver)[static]

Creates a new CMMFDevVideoRecord object. "A new CMMFDevVideoRecord object.

leave

"The method will leave if an error occurs. Typical error codes used:
  • KErrHardwareNotAvailable - Not enough free video processing hardware resources

  • KErrNoMemory - Not enough free memory available"

Parameters

MMMFDevVideoRecordObserver & aObserver"The observer object to use. The observer callbacks are used to return input buffers back to the client."

NextBufferL()

IMPORT_C TVideoOutputBuffer *NextBufferL()

Retrieves the next output buffer, in coding order. The buffer must be returned using ReturnBuffer() when it is no longer used. The maximum amount of buffers that the caller can keep in its use is controlled by the iMinNumOutputBuffers and iMinTotalOutputBufferSize fields in the TEncoderBufferOptions settings.

"The next output buffer, in coding order. If no new buffers are available, the return value is NULL."

leave

"The method will leave if an error occurs."

"This method can only be called after the API has been initialized with Initialize()."

NumComplexityLevels(THwDeviceId)

IMPORT_C TUintNumComplexityLevels(THwDeviceIdaHwDevice)

Retrieves the number of complexity control levels available for a hardware device. Devices can support processing the same input data with different computational complexity levels. The complexity level can affect, for example, the motion vector search range used in an encoder.

"The number of complexity control levels available, one if multiple levels are not supported."

"This method can only be called after the API has been initialized with Initialize()."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectEncoderL() or SelectPreProcessorL() when the device is selected."

NumDataBuffers()

IMPORT_C TUintNumDataBuffers()

Returns the number of output buffers currently containing valid output data.

"The number of output buffers with valid output data."

"This method can only be called after the API has been initialized with Initialize()."

Pause()

IMPORT_C voidPause()

Pauses video recording. Recording can be resumed using Resume().

While video is paused, new pictures are not captured, and input pictures written using WritePictureL() are discarded. Timestamps are not incremented - the encoder assumes that the clock source is paused as well, and input picture timestamps are adjusted accordingly. Pause is typically used in video recording applications to pause recording, conversational applications should use Freeze() instead.

Note: The client has to ensure that the clock source is paused properly. If the paused picture should be shown longer than normal, the client should either adjust input picture timestamps, or start recording (when using direct capture) some time after restarting the clock source. "This method can only be called after the API has been initialized with Initialize()."

PictureLoss()

IMPORT_C voidPictureLoss()

Indicates a picture loss to the encoder, without specifying the lost picture. The encoder can react to this by transmitting an intra-picture. "This method can only be called after the API has been initialized with Initialize()."

PictureLoss(const TArray< TPictureId > &)

IMPORT_C voidPictureLoss(const TArray< TPictureId > &aPictures)

Indicates to the encoder the pictures that have been lost. The encoder can react to this by transmitting an intra-picture.

"This method can only be called after the API has been initialized with Initialize()."

Parameters

const TArray< TPictureId > & aPictures"Picture identifiers for the lost pictures. See [6] for a definition of TPictureId."

PreProcessorInfoLC(TUid)

IMPORT_C CPreProcessorInfo *PreProcessorInfoLC(TUidaPreProcessor)

Retrieves information about the pre-processing capabilities of an installed pre-processor or encoder hardware device. Note that this method will need to load the device into memory, and can thus be relatively expensive. "Pre-processor information as a CPreProcessorInfo object. The object is pushed to the cleanupstack, and must be deallocated by the caller."

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotFound - No pre-processor was found with the given UID"

Parameters

TUid aPreProcessor"The device to query."

RecordingPosition()

IMPORT_C TTimeIntervalMicroSecondsRecordingPosition()

Returns the current recording position. The position is the capture timestamp from the latest input picture, or the capture timestamp for the latest picture captured from the camera when direct capture is used.

"The current recording position."

"This method can only be called after the API has been initialized with Initialize()."

ReferencePictureSelection(const TDesC8 &)

IMPORT_C voidReferencePictureSelection(const TDesC8 &aSelectionData)

Sends a reference picture selection request to the encoder. The request is delivered as a coding-standard specific binary message. Reference picture selection can be used to select a previous correctly transmitted picture to use as a reference in case later pictures have been lost.

"This method can only be called after the API has been initialized with Initialize()."

Parameters

const TDesC8 & aSelectionData"The reference picture selection request message. The message format is coding-standard specific, and defined separately."

ReleaseFreeze()

IMPORT_C voidReleaseFreeze()

Releases a frozen input picture. Video capturing and encoding continues normally. "This method can only be called after the API has been initialized with Initialize()."

Resume()

IMPORT_C voidResume()

Resumes video recording after a pause. "This method can only be called after the API has been initialized with Initialize()."

ReturnBuffer(TVideoOutputBuffer *)

IMPORT_C voidReturnBuffer(TVideoOutputBuffer *aBuffer)

Returns a used output buffer back to the encoder. The buffer can no longer be used by the client.

"This method can only be called after the API has been initialized with Initialize()."

Parameters

TVideoOutputBuffer * aBuffer"The buffer to return."

Revert()

IMPORT_C voidRevert()

Revert any configuration changes that have not yet been committed using CommitL(). This only applies to methods that can be called both before AND after DevVideoRecord has been initialized. See the following methods for details.

SetOutputRectL

SetPreProcessTypesL

SetRotateOptionsL

SetScaleOptionsL

SetInputCropOptionsL

SetOutputCropOptionsL

SetOutputPadOptionsL

SetColorEnhancementOptionsL

SetFrameStabilisationOptionsL

SetCustomPreProcessOptionsL

SetCodingStandardSpecificOptionsL

SetImplementationSpecificEncoderOptionsL

"This method can only be called after the API has been initialized with Initialize()."

SelectEncoderL(TUid)

IMPORT_C THwDeviceIdSelectEncoderL(TUidaEncoder)

Selects the video encoder to be used. This method must be called before any other video encoder related methods are used. The encoder can be changed by calling this method again before the system has been initialized with Initialize().

All video encoder settings are reset to their default values. By default no pre-processing is performed.

"Hardware device ID, used in other methods for configuring the encoder."

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotFound - No encoder was found with the given UID"

"This method can only be called before the API has been initialized with Initialize()."

Parameters

TUid aEncoder"The video encoder to use."

SelectPreProcessorL(TUid)

IMPORT_C THwDeviceIdSelectPreProcessorL(TUidaPreProcessor)

Selects the video pre-processor to be used. This method must be called before any other pre-processor related methods are used. The pre-processor to use can be changed by calling this method again before the API has been initialized with Initialize().

All pre-processor settings are reset to their default values. By default no pre-processing is performed.

"Hardware device ID, used in other methods for configuring the pre-processor."

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotFound - No pre-processor was found with the given UID"

"This method can only be called before the API has been initialized with Initialize()."

Parameters

TUid aPreProcessor"The pre-processor to use."

SendSupplementalInfoL(const TDesC8 &)

IMPORT_C voidSendSupplementalInfoL(const TDesC8 &aData)

Requests the encoder to sends supplemental information in the bitstream. The information data format is coding-standard dependent. Only one supplemental information send request can be active at a time. This variant encodes the information to the next possible picture.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - Supplemental information is not supported"

"This method can only be called after the API has been initialized with Initialize()."

Parameters

const TDesC8 & aData"Supplemental information data to send. The buffer can be reused immediately after the method returns."

SendSupplementalInfoL(const TDesC8 &, const TTimeIntervalMicroSeconds &)

IMPORT_C voidSendSupplementalInfoL(const TDesC8 &aData,
const TTimeIntervalMicroSeconds &aTimestamp
)

Requests the encoder to send supplemental information in the bitstream. The information data format is coding-standard dependent. Only one supplemental information send request can be active at a time. This variant encodes the information to the picture whose presentation timestamp is equal to or greater than and closest to the value of aTimestamp.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - Supplemental information is not supported"

"This method can only be called after the API has been initialized with Initialize()."

Parameters

const TDesC8 & aData"Supplemental information data to send. The buffer can be reused immediately after the method returns."
const TTimeIntervalMicroSeconds & aTimestamp"Timestamp for the picture in which the supplemental information should be included. If the timestamp is in the past, the supplemental information will not be sent."

SetBufferOptionsL(const TEncoderBufferOptions &)

IMPORT_C voidSetBufferOptionsL(const TEncoderBufferOptions &aOptions)

Sets encoder buffering options.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The specified settings are not supported."

"This method can only be called before the API has been initialized with Initialize()."

Parameters

const TEncoderBufferOptions & aOptions"The buffering options."

SetChannelBitErrorRate(TUint, TReal, TReal)

IMPORT_C voidSetChannelBitErrorRate(TUintaLevel,
TRealaErrorRate,
TRealaStdDeviation
)

Sets the expected or prevailing channel conditions for an unequal error protection level, in terms of expected bit error rate. The video encoder can use this information to optimize the generated bitstream.

"This method can only be called after the API has been initialized with Initialize()."

Parameters

TUint aLevel"Error protection level number. This argument is ignored if unequal error protection is not in use."
TReal aErrorRate"Expected bit error rate, as a fraction of the total bits transmitted. Set to 0.0 if bit errors are not expected."
TReal aStdDeviation"Expected bit error rate standard deviation."

SetChannelPacketLossRate(TUint, TReal, TTimeIntervalMicroSeconds32)

IMPORT_C voidSetChannelPacketLossRate(TUintaLevel,
TRealaLossRate,
TTimeIntervalMicroSeconds32aLossBurstLength
)

Sets the expected or prevailing channel conditions for an unequal error protection level, in terms of expected packet loss rate. The video encoder can use this information to optimize the generated bitstream.

"This method can only be called after the API has been initialized with Initialize()."

Parameters

TUint aLevel"Error protection level number. This argument is ignored if unequal error protection is not in use."
TReal aLossRate"Packet loss rate, in number of packets lost per second. Set to 0.0 if packet losses are not expected."
TTimeIntervalMicroSeconds32 aLossBurstLength"Expected average packet loss burst length. Set to zero if the information is not available."

SetClockSource(MMMFClockSource *)

IMPORT_C voidSetClockSource(MMMFClockSource *aClock)

Sets the clock source to use for video timing. When video recording is synchronized with audio, the clock source is implemented by the audio playback subsystem, otherwise the clock source should get the time from the system clock. This method can be called after all hardware devices have been selected, but before calling Initialize().

If no clock source is set, video recording will not be synchronized, but will proceed as fast as possible, depending on input data and output buffer availability. If direct capturing is used without a clock source, the timestamps in the output data may not be valid. All encoders must support synchronization with an external clock source, as well as unsynchronized non-realtime operation.

"This method can only be called before the API has been initialized with Initialize()."

Parameters

MMMFClockSource * aClock"The clock source to use."

SetCodingStandardSpecificOptionsL(const TDesC8 &)

IMPORT_C voidSetCodingStandardSpecificOptionsL(const TDesC8 &aOptions)

Sets coding-standard specific encoder options.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The specified settings are not supported."

"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

const TDesC8 & aOptions"The options to use. The data format for the options is coding-standard specific, and defined seperately."

SetColorEnhancementOptionsL(THwDeviceId, const TColorEnhancementOptions &)

IMPORT_C voidSetColorEnhancementOptionsL(THwDeviceIdaHwDevice,
const TColorEnhancementOptions &aOptions
)

Sets color enhancement pre-processing options.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The specified settings are not supported."

"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectEncoderL() or SelectPreProcessorL() when the device is selected."
const TColorEnhancementOptions & aOptions"Color enchancement options."

SetComplexityLevel(THwDeviceId, TUint)

IMPORT_C voidSetComplexityLevel(THwDeviceIdaHwDevice,
TUintaLevel
)

Sets the complexity level to use for video processing in a hardware device. The level can be changed at any time.

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectEncoderL() or SelectPreProcessorL() when the device is selected."
TUint aLevel"The computational complexity level to use. Level zero (0) is the most complex one, with the highest quality. Higher level numbers require less processing and may have lower quality." @pre "This method can only be called after the API has been initialized with Initialize()."

SetCustomPreProcessOptionsL(THwDeviceId, const TDesC8 &)

IMPORT_C voidSetCustomPreProcessOptionsL(THwDeviceIdaHwDevice,
const TDesC8 &aOptions
)

Sets custom implementation-specific pre-processing options.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The options are not supported."

"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectEncoderL() or SelectPreProcessorL() when the device is selected."
const TDesC8 & aOptions"Post-processing options. The data format is implementation-specific."

SetErrorProtectionLevelL(TUint, TUint, TUint)

IMPORT_C voidSetErrorProtectionLevelL(TUintaLevel,
TUintaBitrate,
TUintaStrength
)

Sets up an unequal error protection level. If unequal error protection is not used, this method can be used to control settings for the whole encoded bitstream.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The specified bit-rate cannot be supported. "

"This method can only be called after the API has been initialized with Initialize()."

Parameters

TUint aLevel"Error protection level number. This argument is ignored if unequal error protection is not in use."
TUint aBitrate"Target bit-rate for this error protection level."
TUint aStrength"Forward error control strength for this error protection level. The strength can be specified using values from TErrorControlStrength (EFecStrengthNone, EFecStrengthLow, EFecStrengthNormal, EFecStrengthHigh), or with intermediate values between those constants."

SetErrorProtectionLevelsL(TUint, TBool)

IMPORT_C voidSetErrorProtectionLevelsL(TUintaNumLevels,
TBoolaSeparateBuffers
)

Sets the number of unequal error protection levels. By default unequal error protection is not used.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - Unequal error protection is not supported."

"This method can only be called after the API has been initialized with Initialize()."

Parameters

TUint aNumLevels"The number of unequal error protection levels. To disable unequal error protection, set this value to one. When unequal error protection is used, the encoder should code pictures so that they can be divided into number of unequal error protection levels having an ascending order of importance in the quality of decoded pictures, with level zero indicating the least important level. The encoder should map the requested bit-rate scalability layers and in-layer bit-rate scalability steps to the unequal error protection levels. In addition, the encoder may use coded sub-pictures to divide coded pictures to different regions of interest or data partitions to divide coded segments into pieces of different importance." @param "aSeparateBuffers" "True if each unequal error protection level of a coded data unit shall be encapsulated in its own output buffer. Ignored if unequal error protection is not used. If each unequal error protection level (e.g. a data partition) of coded data unit is encapsulated in its own output buffer, the caller can transmit the output buffers in different logical channels or can apply a different amount of application-level forward error coding for different output buffers. If all unequal error protection levels (e.g. data partitions) of coded data unit are encapsulated in the same output buffer, the caller can apply a forward error control mechanism that protects the beginning of the output buffer better than the remaining of the output buffer."
TBool aSeparateBuffers

SetErrorsExpected(TBool, TBool)

IMPORT_C voidSetErrorsExpected(TBoolaBitErrors,
TBoolaPacketLosses
)

Sets whether bit errors or packets losses can be expected in the video transmission channel. The video encoder can use this information to optimize the bitstream.

"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

TBool aBitErrors"True if bit errors can be expected."
TBool aPacketLosses"True if packet losses can be expected."

SetFrameStabilisationOptionsL(THwDeviceId, const TSize &, TBool)

IMPORT_C voidSetFrameStabilisationOptionsL(THwDeviceIdaHwDevice,
const TSize &aOutputSize,
TBoolaFrameStabilisation
)

Sets frame stabilisation options.

Frame stabilisation is performed as the first pre-processing operation in the hardware device. The stabilisation process gets the complete hardware device input picture as its input, and it produces a smaller stabilised output picture. The rest of the processing in the hardware device is done using the stabilisation output picture.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The specified settings are not supported."

"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectEncoderL() or SelectPreProcessorL() when the device is selected."
const TSize & aOutputSize"Output picture size. The output picture must size must be smaller than or equal to the hardware device input picture size."
TBool aFrameStabilisation"True if frame stabilisation should be used. By default stabilisation is not used."

SetGlobalReferenceOptions(TUint, TUint)

IMPORT_C voidSetGlobalReferenceOptions(TUintaMaxReferencePictures,
TUintaMaxPictureOrderDelay
)

Sets the reference picture options to be used for all scalability layers. The settings can be overridden for an individual scalability layer by using SetLayerReferenceOptions().

Parameters

TUint aMaxReferencePictures"The maximum number of reference pictures to be used. More than one reference frame can be used in the H.264 | MPEG-4 AVC and in some advanced profiles of MPEG-4 Part 2 and H.263. The minimum value is one." @param "aMaxPictureOrderDelay" "The maximum picture order delay, in number of pictures. This specifies the maximum number of pictures that precede any picture in the sequence in decoding order and follow the picture in presentation order. Pictures may be coded/decoded in different order from their capture/display order. Thus, decoded pictures have to be buffered to order them in correct display order. For example, if one conventional B picture is coded between P pictures, a one-picture display ordering delay has to be applied in the decoder. The minimum value is zero, which indicates that pictures must be coded in capture/display order." @pre "This method can only be called before the API has been initialized with Initialize()."
TUint aMaxPictureOrderDelay

SetImplementationSpecificEncoderOptionsL(const TDesC8 &)

IMPORT_C voidSetImplementationSpecificEncoderOptionsL(const TDesC8 &aOptions)

Sets implementation-specific encoder options.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The specified settings are not supported."

"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

const TDesC8 & aOptions"The options to use. The data format for the options is specific to the encoder implementation, and defined separately by the encoder implementor."

SetInLayerScalabilityL(TUint, TUint, TInLayerScalabilityType, const TArray< TUint > &, const TArray< TUint > &)

IMPORT_C voidSetInLayerScalabilityL(TUintaLayer,
TUintaNumSteps,
TInLayerScalabilityTypeaScalabilityType,
const TArray< TUint > &aBitrateShare,
const TArray< TUint > &aPictureShare
)

Sets in-layer scalability options for a layer. In-layer bit-rate scalability refers to techniques where a specific part of a single-layer coded stream can be decoded correctly without decoding the leftover part. For example, B-pictures can be used for this. By default in-layer scalability is not used.

leave

"The method will leave if an error occurs. Typical error codes used:
  • KErrNotSupported - In-layer scalability is not supported.

  • KErrArgument - Some of the arguments are out of range. For example, it is not possible to use the specified in-layer scalability setup due to other constraints (such as the maximum picture order delay)." @pre "This method can only be called after the API has been initialized with Initialize()."

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 aNumSteps"The number of in-layer scalability steps to use. Set to one to disable in-layer scalability."
TInLayerScalabilityType aScalabilityType"The scalability type to use. See the definition of TInLayerScalabilityType for more information."
const TArray< TUint > & aBitrateShare"Bit-rate share for each scalability step. The bit-rate shares are defined as fractions of total layer bit-rate, with the share for one layer being aBitrateShare[i]/sum(aBitrateShare). For example, to use 2/3 of the total bitrate for the first layer and the remaining 1/3 for the second, the array contents would be {2,1}." @param "aPictureShare" "Picture rate share for each scalability step. The picture rate shares are defined similarly to the bit-rate shares. For example, a client wishing to use two B-pictures between each pair of reference pictures should set the array contents to {1,2}."
const TArray< TUint > & aPictureShare

SetInputCropOptionsL(THwDeviceId, const TRect &)

IMPORT_C voidSetInputCropOptionsL(THwDeviceIdaHwDevice,
const TRect &aRect
)

Sets pre-processing options for input cropping. Input cropping is typically used for digital zooming.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The specified cropping rectangle is not supported."

"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectEncoderL() or SelectPreProcessorL() when the device is selected."
const TRect & aRect"The input cropping rectangle specifying the area of the picture to use. The rectangle must fit completely inside the input picture."

SetInputFormatL(THwDeviceId, const TUncompressedVideoFormat &, const TSize &)

IMPORT_C voidSetInputFormatL(THwDeviceIdaHwDevice,
const TUncompressedVideoFormat &aFormat,
const TSize &aPictureSize
)

Sets the input format for a hardware device. If both a pre-processor and an encoder are used, the pre-processor output format and the encoder input format must be the same. The input format for the first device in the system is the input format for video input data.

The method has to be called for both direct capture as well as memory buffer input. The camera API must be initialized by the device using it for capture, since there is no way to query the current format from the camera API.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The input format specified is not supported."

"This method can only be called before the API has been initialized with Initialize()."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectEncoderL() or SelectPreProcessorL() when the device is selected."
const TUncompressedVideoFormat & aFormat"The input format to use."
const TSize & aPictureSize"The input picture size in pixels."

SetLayerPromotionPointPeriod(TUint, TUint)

IMPORT_C voidSetLayerPromotionPointPeriod(TUintaLayer,
TUintaPeriod
)

Sets the period for layer promotions points for a scalability layer. A layer promotion point is a picture where it is possible to start encoding this enhancement layer if only the lower layers were encoded earlier.

Parameters

TUint aLayer"Layer number."
TUint aPeriod"Layer promotion point period. A value of one signals that each picture should be a layer promotion point, value two that there is one picture between each promotion point etc." @pre "This method can only be called after the API has been initialized with Initialize()."

SetLayerReferenceOptions(TUint, TUint, TUint)

IMPORT_C voidSetLayerReferenceOptions(TUintaLayer,
TUintaMaxReferencePictures,
TUintaMaxPictureOrderDelay
)

Sets the reference picture options to be used for a single scalability layer. These settings override those set with SetGlobalReferenceOptions().

"This method can only be called before the API has been initialized with Initialize()."

Parameters

TUint aLayer"Layer number."
TUint aMaxReferencePictures"The maximum number of reference pictures to be used."
TUint aMaxPictureOrderDelay"The maximum picture order delay, in number of pictures."

SetMinRandomAccessRate(TReal)

IMPORT_C voidSetMinRandomAccessRate(TRealaRate)

Sets the minimum frequency (in time) for instantaneous random access points in the bitstream. An instantaneous random access point is such where the encoder can achieve a full output picture immediately by encoding data starting from the random access point. The random access point frequency may be higher than signalled, if the sequence contains scene cuts which typically cause a coding of a random access point.

"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

TReal aRate"Random access point rate, in pictures per second. For example, to request a random access point every ten seconds, set the value to 0.1."

SetNumBitrateLayersL(TUint)

IMPORT_C voidSetNumBitrateLayersL(TUintaNumLayers)

Sets the number of bit-rate scalability layers to use. Set to 1 to disable layered scalability.

Bit-rate scalability refers to the ability of a coded stream to be decoded at different bit-rates. Scalable video is typically ordered into hierarchical layers of data. A base layer contains an individual representation of a video stream and enhancement layers contain refinement data in addition to the base layer. The quality of the encoded video stream progressively improves as enhancement layers are added to the base layer.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The scalability layers are not supported or too many layers specified."

"This method can only be called before the API has been initialized with Initialize()."

Parameters

TUint aNumLayers"The number of bit-rate scalability layers to use, set to 1 to disable scalability."

SetOutputCropOptionsL(THwDeviceId, const TRect &)

IMPORT_C voidSetOutputCropOptionsL(THwDeviceIdaHwDevice,
const TRect &aRect
)

Sets pre-processing options for output cropping. Output cropping is performed after other pre-processing operations but before output padding. Output cropping and padding can be used in combination to prepare the picture size to suit the encoder, typically video encoders only support picture sizes that are multiples of 16 pixels.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The specified cropping rectangle is not supported."

"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectEncoderL() or SelectPreProcessorL() when the device is selected."
const TRect & aRect"The output cropping rectangle specifying the area of the picture to use. The rectangle must fit completely inside the picture."

SetOutputFormatL(THwDeviceId, const CCompressedVideoFormat &, TVideoDataUnitType, TVideoDataUnitEncapsulation, TBool)

IMPORT_C voidSetOutputFormatL(THwDeviceIdaHwDevice,
const CCompressedVideoFormat &aFormat,
TVideoDataUnitTypeaDataUnitType,
TVideoDataUnitEncapsulationaDataEncapsulation,
TBoolaSegmentationAllowed = EFalse
)

Sets the output format for a hardware device to a compressed video format. Only applicable for encoder devices. The picture size depends on the input data format and possible scaling performed.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The format specified is not supported."

"This method can only be called before the API has been initialized with Initialize()."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectEncoderL()when the device is selected."
const CCompressedVideoFormat & aFormat"The video format to use."
TVideoDataUnitType aDataUnitType"The type of output coded data units."
TVideoDataUnitEncapsulation aDataEncapsulation"Data encapsulation type for output encoded data units."
TBool aSegmentationAllowed = EFalse"True if a coded data unit can be segmented into multiple output buffers if a single buffer is not large enough."

SetOutputFormatL(THwDeviceId, const TUncompressedVideoFormat &)

IMPORT_C voidSetOutputFormatL(THwDeviceIdaHwDevice,
const TUncompressedVideoFormat &aFormat
)

Sets the output format for a hardware device to an uncompressed video format. Only applicable for pre-processor devices. The picture size depends on the input data format and possible scaling performed.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The format specified is not supported."

"This method can only be called before the API has been initialized with Initialize()."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectPreProcessorL() when the device is selected."
const TUncompressedVideoFormat & aFormat"The video format to use."

SetOutputPadOptionsL(THwDeviceId, const TSize &, const TPoint &)

IMPORT_C voidSetOutputPadOptionsL(THwDeviceIdaHwDevice,
const TSize &aOutputSize,
const TPoint &aPicturePos
)

Sets pre-processing options for output padding. Output padding is performed as the last pre-processing operation, and typically used to prepare the picture size to suit the encoder. The image is padded with black pixels.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The specified padding settings are not supported."

"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectEncoderL() or SelectPreProcessorL() when the device is selected."
const TSize & aOutputSize"The padded output picture size. The output size must be large enough for the picture in its new position."
const TPoint & aPicturePos"The position for the original picture in the new padded picture. The original picture in its new position must fit completely inside the new picture."

SetOutputRectL(THwDeviceId, const TRect &)

IMPORT_C voidSetOutputRectL(THwDeviceIdaHwDevice,
const TRect &aRect
)

Sets the encoder output rectangle for encoded video output. This rectangle specifies the part of the input and output pictures which is displayed after encoding. Many video codecs process data in 16x16 pixel units but enable specifying and coding the decoder output rectangle for image sizes that are not multiple of 16 pixels (e.g 160x120).

leave

"The method will leave if an error occurs."

"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectEncoderL() when the device is selected."
const TRect & aRect"The encoder output rectangle."

SetPreProcessTypesL(THwDeviceId, TUint32)

IMPORT_C voidSetPreProcessTypesL(THwDeviceIdaHwDevice,
TUint32aPreProcessTypes
)

Sets the pre-processing types to be used in a hardware device. [1 #191] If separate encoder and pre-processor devices are used, both can be configured to perform different pre-processing operations.

Pre-processing operations are carried out in the following order:

1. Frame stabilisation 2. Input cropping 3. Mirroring 4. Rotating 5. Scaling 6. Output cropping 7. Output padding

Color space conversion and color enhancement can be performed at any point in the pre-processing flow.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The pre-processing combination is not supported"

"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectEncoderL() or SelectPreProcessorL() when the device is selected."
TUint32 aPreProcessTypes"The pre-processing steps to perform, a bitwise OR of values from TPrePostProcessType."

SetRateControlOptions(TUint, const TRateControlOptions &)

IMPORT_C voidSetRateControlOptions(TUintaLayer,
const TRateControlOptions &aOptions
)

Sets the bit-rate control options for a layer. If layered bit-rate scalability is not used, the options are set for the whole bitstream.

"This method can only be called after the API has been initialized with Initialize()."

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."
const TRateControlOptions & aOptions"Bit-rate control options."

SetRgbToYuvOptionsL(THwDeviceId, TRgbRange, const TYuvFormat &)

IMPORT_C voidSetRgbToYuvOptionsL(THwDeviceIdaHwDevice,
TRgbRangeaRgbRange,
const TYuvFormat &aOutputFormat
)

Sets pre-processing options for RGB to YUV color space conversion. By default, input RGB data is assumed to use the full value range ([0 255]), and the output YUV format is the hardware device output format, so typically calling this method is not necessary.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The formats specified are not supported"

"This method can only be called before the API has been initialized with Initialize()."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectEncoderL() or SelectPreProcessorL() when the device is selected."
TRgbRange aRgbRange"Input RGB data range"
const TYuvFormat & aOutputFormat"Conversion output YUV format."

SetRotateOptionsL(THwDeviceId, TRotationType)

IMPORT_C voidSetRotateOptionsL(THwDeviceIdaHwDevice,
TRotationTypeaRotationType
)

Sets pre-processing options for rotation.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The rotation type is not supported."

"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectEncoderL() or SelectPreProcessorL() when the device is selected."
TRotationType aRotationType"The rotation to perform."

SetScalabilityLayerTypeL(TUint, TScalabilityType)

IMPORT_C voidSetScalabilityLayerTypeL(TUintaLayer,
TScalabilityTypeaScalabilityType
)

Sets the scalability type for a bit-rate scalability layer.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The scalability layers or the specified scalability type are not supported."

"This method can only be called before the API has been initialized with Initialize()."

Parameters

TUint aLayer"Layer number. Layers are numbered [0 n-1], where n is the number of layers available. The first layer is the base layer, it can be decoded independently from the other layers, and it has the lowest total bitrate." @param "aScalabilityType" "Layer scalability type."
TScalabilityType aScalabilityType

SetScaleOptionsL(THwDeviceId, const TSize &, TBool)

IMPORT_C voidSetScaleOptionsL(THwDeviceIdaHwDevice,
const TSize &aTargetSize,
TBoolaAntiAliasFiltering
)

Sets pre-processing options for scaling.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The specified target size is not supported."

"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectEncoderL() or SelectPreProcessorL() when the device is selected."
const TSize & aTargetSize"Target picture size. If a fixed scale factor size is used, the new dimensions must be set to: width=floor(factor*width), height=floor(factor*height). For example, scaling a QCIF (176x144) picture up by a factor of 4/3 yields a size of 234x192." @param "aAntiAliasFiltering" "True if anti-aliasing filtering should be used. If the pre-processor does not support anti-aliased scaling, or supports anti-aliased scaling only, this argument is ignored."
TBool aAntiAliasFiltering

SetSegmentTargetSize(TUint, TUint, TUint)

IMPORT_C voidSetSegmentTargetSize(TUintaLayer,
TUintaSizeBytes,
TUintaSizeMacroblocks
)

Sets the target size of each coded video segment. The segment target size can be specified in terms of number of bytes per segment, number of macroblocks per segment, or both.

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." @pre "This method can only be called after the API has been initialized with Initialize()."
TUint aSizeMacroblocks

SetSourceCameraL(TInt, TReal)

IMPORT_C voidSetSourceCameraL(TIntaCameraHandle,
TRealaPictureRate
)

Sets the data source to be a camera, and sets the system to use direct capture for input. The first hardware device (pre-processor if both encoder and pre-processor are used, encoder otherwise) must support direct capture.

leave

"The method will leave if an error occurs. Typical error codes used:
  • KErrNotSupported - Direct capture is not supported or the picture rate specified is not supported." @pre "This method can only be called before the API has been initialized with Initialize()."

Parameters

TInt aCameraHandle"A camera handle for the camera to use. The handle is passed to CCamera::NewDuplicateL() in the camera API."
TReal aPictureRate"Video capture picture rate."

SetSourceMemoryL(TReal, TBool, TBool)

IMPORT_C voidSetSourceMemoryL(TRealaMaxPictureRate,
TBoolaConstantPictureRate,
TBoolaProcessRealtime
)

Sets the data source to be memory buffers.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The picture rate specified is not supported."

"This method can only be called before the API has been initialized with Initialize()."

Parameters

TReal aMaxPictureRate"The maximum picture rate for input pictures."
TBool aConstantPictureRate"True if the input picture rate is constant. In that case, aMaxPictureRate specifies the picture rate. If pictures may be skipped in the input data due to performance reasons, this flag cannot be set." @param "aProcessRealtime" "True if real-time processing is needed, false if not. Real-time processing is typically needed for video recording applications, while video conversion and off-line processing applications do not require it."
TBool aProcessRealtime

SetYuvToYuvOptionsL(THwDeviceId, const TYuvFormat &, const TYuvFormat &)

IMPORT_C voidSetYuvToYuvOptionsL(THwDeviceIdaHwDevice,
const TYuvFormat &aInputFormat,
const TYuvFormat &aOutputFormat
)

Sets pre-processing options for YUV to YUV data format conversion. By default, the hardware device input and output data formats are used. For encoder devices, the device input format and the closest matching format supported by the encoding process are used. Typically calling this method is not necessary.

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotSupported - The formats specified are not supported"

"This method can only be called before the API has been initialized with Initialize()."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectEncoderL() or SelectPreProcessorL() when the device is selected."
const TYuvFormat & aInputFormat"Conversion input format."
const TYuvFormat & aOutputFormat"Conversion output format."

SliceLoss(TUint, TUint, const TPictureId &)

IMPORT_C voidSliceLoss(TUintaFirstMacroblock,
TUintaNumMacroblocks,
const TPictureId &aPicture
)

Indicates a loss of consecutive macroblocks in raster scan order to the encoder.

Parameters

TUint aFirstMacroblock"The first lost macroblock. The macroblocks are numbered such that the macroblock in the upper left corner of the picture is considered macroblock number 1 and the number for each macroblock increases from left to right and then from top to bottom in raster-scan order." @param "aNumMacroblocks" "The number of lost macroblocks that are consecutive in raster scan order." @param "aPicture" "The picture number for the picture where the macroblocks were lost. If the picture is not known, aPicture.iIdType is set to ENone." @pre "This method can only be called after the API has been initialized with Initialize()."
TUint aNumMacroblocks
const TPictureId & aPicture

Start()

IMPORT_C voidStart()

Starts recording video. This includes capturing pictures from the camera (if direct capture is used), pre-processing and encoding. Recording will proceed until it is stopped or paused. Initally recording is stopped. "This method can only be called after the API has been initialized with Initialize()."

Stop()

IMPORT_C voidStop()

Stops recording video. No new pictures will be captured, pre-processed, or encoded. If input pictures are written while recording is stopped, they will be returned immediately. "This method can only be called after the API has been initialized with Initialize()."

VideoEncodeHwDevice(THwDeviceId)

CMMFVideoEncodeHwDevice &VideoEncodeHwDevice(THwDeviceIdaHwDevice)const [private]

Parameters

THwDeviceId aHwDevice

VideoEncodeHwDevice()

CMMFVideoEncodeHwDevice &VideoEncodeHwDevice()const [private]

VideoEncoderInfoLC(TUid)

IMPORT_C CVideoEncoderInfo *VideoEncoderInfoLC(TUidaVideoEncoder)

Retrieves information about an installed video encoder. Note that this method will need to load the encoder hardware device into memory, and can thus be relatively expensive. "Encoder information as a CVideoEncoderInfo object. The object is pushed to the cleanup stack, and must be deallocated by the caller."

leave

"The method will leave if an error occurs. Typical error codes used: - KErrNotFound - No encoder was found with the given UID"

Parameters

TUid aVideoEncoder"The video encoder device to query."

VideoHwDevice(THwDeviceId)

CMMFVideoHwDevice &VideoHwDevice(THwDeviceIdaHwDevice)const [private]

Parameters

THwDeviceId aHwDevice

VideoPreProcHwDevice(THwDeviceId)

CMMFVideoPreProcHwDevice &VideoPreProcHwDevice(THwDeviceIdaHwDevice)const [private]

Parameters

THwDeviceId aHwDevice

VideoPreProcHwDevice()

CMMFVideoPreProcHwDevice &VideoPreProcHwDevice()const [private]

VideoRecordHwDevice(THwDeviceId)

CMMFVideoRecordHwDevice &VideoRecordHwDevice(THwDeviceIdaHwDevice)const [private]

Parameters

THwDeviceId aHwDevice

WritePictureL(TVideoPicture *)

IMPORT_C voidWritePictureL(TVideoPicture *aPicture)

Writes an uncompressed input picture. The picture must remain valid and unmodified until it is returned with the MdvroReturnPicture() callback. This method must not be called if direct capture is used.

leave

"The method will leave if an error occurs."

"This method can only be called after the API has been initialized with Initialize()."

Parameters

TVideoPicture * aPicture"The picture to write."

Member Enumerations Documentation

Enum TInitializationState

Enumerators

ENotInitialized = 0x01
EInitializing = 0x02
EInitialized = 0x04
EInitializationFailed = 0x08

Member Data Documentation

TUint iInitializationState

TUint iInitializationState[private]

TBool iIsPreProcComplete

TBool iIsPreProcComplete[private]

TUint iNumberOfMdvrpStreamEndCallbacks

TUint iNumberOfMdvrpStreamEndCallbacks[private]

TUint iNumberOfVideoOutputBuffers

TUint iNumberOfVideoOutputBuffers[private]

MMMFDevVideoRecordObserver & iObserver

MMMFDevVideoRecordObserver &iObserver[private]

CMMFVideoEncodeHwDevice * iVideoEncodeHwDevice

CMMFVideoEncodeHwDevice *iVideoEncodeHwDevice[private]

TDblQue< TVideoOutputBuffer > iVideoOutputBufferQue

TDblQue< TVideoOutputBuffer >iVideoOutputBufferQue[private]

TDblQueIter< TVideoOutputBuffer > iVideoOutputBufferQueIter

TDblQueIter< TVideoOutputBuffer >iVideoOutputBufferQueIter[private]

CMMFVideoPreProcHwDevice * iVideoPreProcHwDevice

CMMFVideoPreProcHwDevice *iVideoPreProcHwDevice[private]