|
||
class CMMFDevVideoRecord : public CBase, private MMMFDevVideoRecordProxy;
CMMFDevVideoRecord is the main client class of DevVideoRecord.
MMMFDevVideoRecordProxy
- MMMFDevVideoRecordProxy is the interface the CDevVideoRecord implementation prov...
CBase
-
Base class for all classes to be instantiated on the heap.
CMMFDevVideoRecord
- CMMFDevVideoRecord is the main client class of DevVideoRecord.
Defined in CMMFDevVideoRecord
:
CancelSupplementalInfo()
Cancels the current supplemental information send request. The memory buffer res...CodingStandardSpecificInitOutputLC()
Returns coding-standard specific initialization output from the encoder. The inf...CodingStandardSpecificSettingsOutputLC()
Returns coding-standard specific settings output from the encoder. The informati...CommitL()
Commit all configuration changes since the last CMMFDevVideoRecord::CommitL(), C...CustomInterface(THwDeviceId,TUid)
Retrieves a custom interface to the specified hardware device. FindEncodersL(const TDesC8 &,TUint32,RArray< TUid > &,TBool)
Finds all available encoders for a given video type with support for certain pre...FindPreProcessorsL(TUint32,RArray< TUid > &)
Finds all available pre-processors for a given set of pre-processing operations.Freeze()
Freezes the input picture. Freezing is similar to a pause, except that timestamp...GetEncoderListL(RArray< TUid > &)
Retrieves a list of available video encoders in the system. GetFrameStabilisationOutput(THwDeviceId,TRect &)
Reads the frame stabilisation output picture position. This information can be u...GetOutputBufferStatus(TUint &,TUint &)
Gets the current output buffer status. The information includes the number of fr...GetPictureCounters(TPictureCounters &)
Reads various counters related to processed video pictures. See the definition o...GetPreProcessorListL(RArray< TUid > &)
Retrieves a list of available video pre-processor hardware devices in the system...ImplementationSpecificInitOutputLC()
Returns implementation-specific initialization output from the encoder. This met...ImplementationSpecificSettingsOutputLC()
Returns implementation-specific settings output from the encoder. The informatio...Initialize()
Initializes the video devices, and reserves hardware resources. This method is a...InputEnd()
Notifies the system that the end of input data has been reached. No more input d...MdvrpFatalError(CMMFVideoHwDevice *,TInt)
Reports a fatal error to the client. The device must automatically stop processi...MdvrpInitializeComplete(CMMFVideoHwDevice *,TInt)
Reports that an asynchronous CMMFDevVideoRecord::Initialize() method has complet...MdvrpNewBuffer(TVideoOutputBuffer *)
Delivers a new coded data unit to the client. The CDevVideoRecord implementation...MdvrpReturnPicture(TVideoPicture *)
Returns a used input picture back to the client. Called by the encoder hardware ...MdvrpStreamEnd()
Reports that the input video data end has been reached and all pictures have bee...MdvrpSupplementalInfoSent()
Sends a notification to the client that the current supplemental info send reque...NewL(MMMFDevVideoRecordObserver &)
Creates a new CMMFDevVideoRecord object. NextBufferL()
Retrieves the next output buffer, in coding order. The buffer must be returned u...NumComplexityLevels(THwDeviceId)
Retrieves the number of complexity control levels available for a hardware devic...NumDataBuffers()
Returns the number of output buffers currently containing valid output data.Pause()
Pauses video recording. Recording can be resumed using CMMFDevVideoRecord::Resum...PictureLoss()
Indicates a picture loss to the encoder, without specifying the lost picture. Th...PictureLoss(const TArray< TPictureId > &)
Indicates to the encoder the pictures that have been lost. The encoder can react...PreProcessorInfoLC(TUid)
Retrieves information about the pre-processing capabilities of an installed pre-...RecordingPosition()
Returns the current recording position. The position is the capture timestamp fr...ReferencePictureSelection(const TDesC8 &)
Sends a reference picture selection request to the encoder. The request is deliv...ReleaseFreeze()
Releases a frozen input picture. Video capturing and encoding continues normally...Resume()
Resumes video recording after a pause. ReturnBuffer(TVideoOutputBuffer *)
Returns a used output buffer back to the encoder. The buffer can no longer be us...Revert()
Revert any configuration changes that have not yet been committed using CMMFDevV...SelectEncoderL(TUid)
Selects the video encoder to be used. This method must be called before any othe...SelectPreProcessorL(TUid)
Selects the video pre-processor to be used. This method must be called before an...SendSupplementalInfoL(const TDesC8 &)
Requests the encoder to sends supplemental information in the bitstream. The inf...SendSupplementalInfoL(const TDesC8 &,const TTimeIntervalMicroSeconds &)
Requests the encoder to send supplemental information in the bitstream. The info...SetBufferOptionsL(const TEncoderBufferOptions &)
Sets encoder buffering options.SetChannelBitErrorRate(TUint,TReal,TReal)
Sets the expected or prevailing channel conditions for an unequal error protecti...SetChannelPacketLossRate(TUint,TReal,TTimeIntervalMicroSeconds32)
Sets the expected or prevailing channel conditions for an unequal error protecti...SetClockSource(MMMFClockSource *)
Sets the clock source to use for video timing. When video recording is synchroni...SetCodingStandardSpecificOptionsL(const TDesC8 &)
Sets coding-standard specific encoder options.SetColorEnhancementOptionsL(THwDeviceId,const TColorEnhancementOptions &)
Sets color enhancement pre-processing options.SetComplexityLevel(THwDeviceId,TUint)
Sets the complexity level to use for video processing in a hardware device. The ...SetCustomPreProcessOptionsL(THwDeviceId,const TDesC8 &)
Sets custom implementation-specific pre-processing options.SetErrorProtectionLevelL(TUint,TUint,TUint)
Sets up an unequal error protection level. If unequal error protection is not us...SetErrorProtectionLevelsL(TUint,TBool)
Sets the number of unequal error protection levels. By default unequal error pro...SetErrorsExpected(TBool,TBool)
Sets whether bit errors or packets losses can be expected in the video transmiss...SetFrameStabilisationOptionsL(THwDeviceId,const TSize &,TBool)
Sets frame stabilisation options.SetGlobalReferenceOptions(TUint,TUint)
Sets the reference picture options to be used for all scalability layers. The se...SetImplementationSpecificEncoderOptionsL(const TDesC8 &)
Sets implementation-specific encoder options.SetInLayerScalabilityL(TUint,TUint,TInLayerScalabilityType,const TArray< TUint > &,const TArray< TUint > &)
Sets in-layer scalability options for a layer. In-layer bit-rate scalability ref...SetInputCropOptionsL(THwDeviceId,const TRect &)
Sets pre-processing options for input cropping. Input cropping is typically used...SetInputFormatL(THwDeviceId,const TUncompressedVideoFormat &,const TSize &)
Sets the input format for a hardware device. If both a pre-processor and an enco...SetLayerPromotionPointPeriod(TUint,TUint)
Sets the period for layer promotions points for a scalability layer. A layer pro...SetLayerReferenceOptions(TUint,TUint,TUint)
Sets the reference picture options to be used for a single scalability layer. Th...SetMinRandomAccessRate(TReal)
Sets the minimum frequency (in time) for instantaneous random access points in t...SetNumBitrateLayersL(TUint)
Sets the number of bit-rate scalability layers to use. Set to 1 to disable layer...SetOutputCropOptionsL(THwDeviceId,const TRect &)
Sets pre-processing options for output cropping. Output cropping is performed af...SetOutputFormatL(THwDeviceId,const CCompressedVideoFormat &,TVideoDataUnitType,TVideoDataUnitEncapsulation,TBool)
Sets the output format for a hardware device to a compressed video format. Only ...SetOutputFormatL(THwDeviceId,const TUncompressedVideoFormat &)
Sets the output format for a hardware device to an uncompressed video format. On...SetOutputPadOptionsL(THwDeviceId,const TSize &,const TPoint &)
Sets pre-processing options for output padding. Output padding is performed as t...SetOutputRectL(THwDeviceId,const TRect &)
Sets the encoder output rectangle for encoded video output. This rectangle speci...SetPreProcessTypesL(THwDeviceId,TUint32)
Sets the pre-processing types to be used in a hardware device. [1 #191] If separ...SetRateControlOptions(TUint,const TRateControlOptions &)
Sets the bit-rate control options for a layer. If layered bit-rate scalability i...SetRgbToYuvOptionsL(THwDeviceId,TRgbRange,const TYuvFormat &)
Sets pre-processing options for RGB to YUV color space conversion. By default, i...SetRotateOptionsL(THwDeviceId,TRotationType)
Sets pre-processing options for rotation.SetScalabilityLayerTypeL(TUint,TScalabilityType)
Sets the scalability type for a bit-rate scalability layer.SetScaleOptionsL(THwDeviceId,const TSize &,TBool)
Sets pre-processing options for scaling.SetSegmentTargetSize(TUint,TUint,TUint)
Sets the target size of each coded video segment. The segment target size can be...SetSourceCameraL(TInt,TReal)
Sets the data source to be a camera, and sets the system to use direct capture f...SetSourceMemoryL(TReal,TBool,TBool)
Sets the data source to be memory buffers.SetYuvToYuvOptionsL(THwDeviceId,const TYuvFormat &,const TYuvFormat &)
Sets pre-processing options for YUV to YUV data format conversion. By default, t...SliceLoss(TUint,TUint,const TPictureId &)
Indicates a loss of consecutive macroblocks in raster scan order to the encoder.Start()
Starts recording video. This includes capturing pictures from the camera (if dir...Stop()
Stops recording video. No new pictures will be captured, pre-processed, or encod...TPictureCounters
Class to define the picture counters available through GetPictureCounters. VideoEncoderInfoLC(TUid)
Retrieves information about an installed video encoder. Note that this method wi...WritePictureL(TVideoPicture *)
Writes an uncompressed input picture. The picture must remain valid and unmodifi...~CMMFDevVideoRecord()
Destructor.Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...IMPORT_C static CMMFDevVideoRecord* NewL(MMMFDevVideoRecordObserver &aObserver);
Creates a new CMMFDevVideoRecord object.
|
|
|
IMPORT_C void FindEncodersL(const TDesC8 &aMimeType, TUint32 aPreProcType, RArray< TUid > &aEncoders, TBool aExactMatch=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 CMMFDevVideoRecord::VideoEncoderInfoLC(TUid)
.
|
|
IMPORT_C void FindPreProcessorsL(TUint32 aPreProcType, RArray< TUid > &aPreProcessors);
Finds all available pre-processors for a given set of pre-processing operations.
|
|
IMPORT_C void GetEncoderListL(RArray< TUid > &aEncoders);
Retrieves a list of available video encoders in the system.
|
|
IMPORT_C void GetPreProcessorListL(RArray< TUid > &aPreProcessors);
Retrieves a list of available video pre-processor hardware devices in the system.
|
|
IMPORT_C CVideoEncoderInfo* VideoEncoderInfoLC(TUid aVideoEncoder);
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.
|
|
|
IMPORT_C CPreProcessorInfo* PreProcessorInfoLC(TUid aPreProcessor);
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.
|
|
|
IMPORT_C THwDeviceId SelectEncoderL(TUid aEncoder);
"This method can only be called before the API has been initialized with Initialize()."
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 CMMFDevVideoRecord::Initialize()
.
All video encoder settings are reset to their default values. By default no pre-processing is performed.
|
|
|
IMPORT_C THwDeviceId SelectPreProcessorL(TUid aPreProcessor);
"This method can only be called before the API has been initialized with Initialize()."
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 CMMFDevVideoRecord::Initialize()
.
All pre-processor settings are reset to their default values. By default no pre-processing is performed.
|
|
|
IMPORT_C void SetInputFormatL(THwDeviceId aHwDevice, const TUncompressedVideoFormat &aFormat, const TSize &aPictureSize);
"This method can only be called before the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void SetSourceCameraL(TInt aCameraHandle, TReal aPictureRate);
"This method can only be called before the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void SetSourceMemoryL(TReal aMaxPictureRate, TBool aConstantPictureRate, TBool aProcessRealtime);
"This method can only be called before the API has been initialized with Initialize()."
Sets the data source to be memory buffers.
|
|
SetOutputFormatL(THwDeviceId,const CCompressedVideoFormat &,TVideoDataUnitType,TVideoDataUnitEncapsulation,TBool)
IMPORT_C void SetOutputFormatL(THwDeviceId aHwDevice, const CCompressedVideoFormat &aFormat, TVideoDataUnitType aDataUnitType,
TVideoDataUnitEncapsulation aDataEncapsulation, TBool aSegmentationAllowed=EFalse);
"This method can only be called before the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void SetOutputFormatL(THwDeviceId aHwDevice, const TUncompressedVideoFormat &aFormat);
"This method can only be called before the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void SetClockSource(MMMFClockSource *aClock);
"This method can only be called before the API has been initialized with Initialize()."
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 CMMFDevVideoRecord::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.
|
IMPORT_C void SetRgbToYuvOptionsL(THwDeviceId aHwDevice, TRgbRange aRgbRange, const TYuvFormat &aOutputFormat);
"This method can only be called before the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void SetYuvToYuvOptionsL(THwDeviceId aHwDevice, const TYuvFormat &aInputFormat, const TYuvFormat &aOutputFormat);
"This method can only be called before the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void SetNumBitrateLayersL(TUint aNumLayers);
"This method can only be called before the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void SetScalabilityLayerTypeL(TUint aLayer, TScalabilityType aScalabilityType);
"This method can only be called before the API has been initialized with Initialize()."
Sets the scalability type for a bit-rate scalability layer.
|
|
IMPORT_C void SetGlobalReferenceOptions(TUint aMaxReferencePictures, TUint aMaxPictureOrderDelay);
"This method can only be called before the API has been initialized with Initialize()."
Sets the reference picture options to be used for all scalability layers. The settings can be overridden for an individual
scalability layer by using CMMFDevVideoRecord::SetLayerReferenceOptions(TUint,TUint,TUint)
.
|
IMPORT_C void SetLayerReferenceOptions(TUint aLayer, TUint aMaxReferencePictures, TUint aMaxPictureOrderDelay);
"This method can only be called before the API has been initialized with Initialize()."
Sets the reference picture options to be used for a single scalability layer. These settings override those set with CMMFDevVideoRecord::SetGlobalReferenceOptions(TUint,TUint)
.
|
IMPORT_C void SetBufferOptionsL(const TEncoderBufferOptions &aOptions);
"This method can only be called before the API has been initialized with Initialize()."
Sets encoder buffering options.
|
|
IMPORT_C void SetOutputRectL(THwDeviceId aHwDevice, const TRect &aRect);
"This method can be called either before or after the API has been initialized with CMMFDevVideoRecord::Initialize()
. If called after initialization, the change will only be committed once CMMFDevVideoRecord::CommitL()
is called."
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).
|
|
IMPORT_C void SetPreProcessTypesL(THwDeviceId aHwDevice, TUint32 aPreProcessTypes);
"This method can be called either before or after the API has been initialized with CMMFDevVideoRecord::Initialize()
. If called after initialization, the change will only be committed once CMMFDevVideoRecord::CommitL()
is called."
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.
|
|
IMPORT_C void SetRotateOptionsL(THwDeviceId aHwDevice, TRotationType aRotationType);
"This method can be called either before or after the API has been initialized with CMMFDevVideoRecord::Initialize()
. If called after initialization, the change will only be committed once CMMFDevVideoRecord::CommitL()
is called."
Sets pre-processing options for rotation.
|
|
IMPORT_C void SetScaleOptionsL(THwDeviceId aHwDevice, const TSize &aTargetSize, TBool aAntiAliasFiltering);
"This method can be called either before or after the API has been initialized with CMMFDevVideoRecord::Initialize()
. If called after initialization, the change will only be committed once CMMFDevVideoRecord::CommitL()
is called."
Sets pre-processing options for scaling.
|
|
IMPORT_C void SetInputCropOptionsL(THwDeviceId aHwDevice, const TRect &aRect);
"This method can be called either before or after the API has been initialized with CMMFDevVideoRecord::Initialize()
. If called after initialization, the change will only be committed once CMMFDevVideoRecord::CommitL()
is called."
Sets pre-processing options for input cropping. Input cropping is typically used for digital zooming.
|
|
IMPORT_C void SetOutputCropOptionsL(THwDeviceId aHwDevice, const TRect &aRect);
"This method can be called either before or after the API has been initialized with CMMFDevVideoRecord::Initialize()
. If called after initialization, the change will only be committed once CMMFDevVideoRecord::CommitL()
is called."
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.
|
|
IMPORT_C void SetOutputPadOptionsL(THwDeviceId aHwDevice, const TSize &aOutputSize, const TPoint &aPicturePos);
"This method can be called either before or after the API has been initialized with CMMFDevVideoRecord::Initialize()
. If called after initialization, the change will only be committed once CMMFDevVideoRecord::CommitL()
is called."
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.
|
|
IMPORT_C void SetColorEnhancementOptionsL(THwDeviceId aHwDevice, const TColorEnhancementOptions &aOptions);
"This method can be called either before or after the API has been initialized with CMMFDevVideoRecord::Initialize()
. If called after initialization, the change will only be committed once CMMFDevVideoRecord::CommitL()
is called."
Sets color enhancement pre-processing options.
|
|
IMPORT_C void SetFrameStabilisationOptionsL(THwDeviceId aHwDevice, const TSize &aOutputSize, TBool aFrameStabilisation);
"This method can be called either before or after the API has been initialized with CMMFDevVideoRecord::Initialize()
. If called after initialization, the change will only be committed once CMMFDevVideoRecord::CommitL()
is called."
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.
|
|
IMPORT_C void SetCustomPreProcessOptionsL(THwDeviceId aHwDevice, const TDesC8 &aOptions);
"This method can be called either before or after the API has been initialized with CMMFDevVideoRecord::Initialize()
. If called after initialization, the change will only be committed once CMMFDevVideoRecord::CommitL()
is called."
Sets custom implementation-specific pre-processing options.
|
|
IMPORT_C void SetErrorsExpected(TBool aBitErrors, TBool aPacketLosses);
"This method can be called either before or after the API has been initialized with CMMFDevVideoRecord::Initialize()
. If called after initialization, the change will only be committed once CMMFDevVideoRecord::CommitL()
is called."
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.
|
IMPORT_C void SetMinRandomAccessRate(TReal aRate);
"This method can be called either before or after the API has been initialized with CMMFDevVideoRecord::Initialize()
. If called after initialization, the change will only be committed once CMMFDevVideoRecord::CommitL()
is called."
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.
|
IMPORT_C void SetCodingStandardSpecificOptionsL(const TDesC8 &aOptions);
"This method can be called either before or after the API has been initialized with CMMFDevVideoRecord::Initialize()
. If called after initialization, the change will only be committed once CMMFDevVideoRecord::CommitL()
is called."
Sets coding-standard specific encoder options.
|
|
IMPORT_C void SetImplementationSpecificEncoderOptionsL(const TDesC8 &aOptions);
"This method can be called either before or after the API has been initialized with CMMFDevVideoRecord::Initialize()
. If called after initialization, the change will only be committed once CMMFDevVideoRecord::CommitL()
is called."
Sets implementation-specific encoder options.
|
|
IMPORT_C void Initialize();
"This method can only be called before the API has been initialized."
Initializes the video devices, and reserves hardware resources. This method is asynchronous, DevVideoRecord will call MMMFDevVideoRecordObserver::MdvroInitializeComplete(TInt)
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 CMMFDevVideoRecord::Start()
with a relatively low delay since the hardware has already been set up.
If CMMFDevVideoRecord::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.
IMPORT_C void CommitL();
"This method can only be called after the API has been initialized with Initialize()."
Commit all configuration changes since the last CMMFDevVideoRecord::CommitL()
, CMMFDevVideoRecord::Revert()
or CMMFDevVideoRecord::Initialize()
. This only applies to methods that can be called both before AND after DevVideoRecord has been initialized. See the following
methods for details.
|
CMMFDevVideoRecord::SetOutputRectL(THwDeviceId,const TRect &)
Sets the encoder output rectangle for encoded video output. This rectangle speci...CMMFDevVideoRecord::SetPreProcessTypesL(THwDeviceId,TUint32)
Sets the pre-processing types to be used in a hardware device. [1 #191] If separ...CMMFDevVideoRecord::SetRotateOptionsL(THwDeviceId,TRotationType)
Sets pre-processing options for rotation.CMMFDevVideoRecord::SetScaleOptionsL(THwDeviceId,const TSize &,TBool)
Sets pre-processing options for scaling.CMMFDevVideoRecord::SetInputCropOptionsL(THwDeviceId,const TRect &)
Sets pre-processing options for input cropping. Input cropping is typically used...CMMFDevVideoRecord::SetOutputCropOptionsL(THwDeviceId,const TRect &)
Sets pre-processing options for output cropping. Output cropping is performed af...CMMFDevVideoRecord::SetOutputPadOptionsL(THwDeviceId,const TSize &,const TPoint &)
Sets pre-processing options for output padding. Output padding is performed as t...CMMFDevVideoRecord::SetColorEnhancementOptionsL(THwDeviceId,const TColorEnhancementOptions &)
Sets color enhancement pre-processing options.CMMFDevVideoRecord::SetFrameStabilisationOptionsL(THwDeviceId,const TSize &,TBool)
Sets frame stabilisation options.CMMFDevVideoRecord::SetCustomPreProcessOptionsL(THwDeviceId,const TDesC8 &)
Sets custom implementation-specific pre-processing options.CMMFDevVideoRecord::SetCodingStandardSpecificOptionsL(const TDesC8 &)
Sets coding-standard specific encoder options.CMMFDevVideoRecord::SetImplementationSpecificEncoderOptionsL(const TDesC8 &)
Sets implementation-specific encoder options.IMPORT_C void Revert();
"This method can only be called after the API has been initialized with Initialize()."
Revert any configuration changes that have not yet been committed using CMMFDevVideoRecord::CommitL()
. This only applies to methods that can be called both before AND after DevVideoRecord has been initialized. See the following
methods for details.
CMMFDevVideoRecord::SetOutputRectL(THwDeviceId,const TRect &)
Sets the encoder output rectangle for encoded video output. This rectangle speci...CMMFDevVideoRecord::SetPreProcessTypesL(THwDeviceId,TUint32)
Sets the pre-processing types to be used in a hardware device. [1 #191] If separ...CMMFDevVideoRecord::SetRotateOptionsL(THwDeviceId,TRotationType)
Sets pre-processing options for rotation.CMMFDevVideoRecord::SetScaleOptionsL(THwDeviceId,const TSize &,TBool)
Sets pre-processing options for scaling.CMMFDevVideoRecord::SetInputCropOptionsL(THwDeviceId,const TRect &)
Sets pre-processing options for input cropping. Input cropping is typically used...CMMFDevVideoRecord::SetOutputCropOptionsL(THwDeviceId,const TRect &)
Sets pre-processing options for output cropping. Output cropping is performed af...CMMFDevVideoRecord::SetOutputPadOptionsL(THwDeviceId,const TSize &,const TPoint &)
Sets pre-processing options for output padding. Output padding is performed as t...CMMFDevVideoRecord::SetColorEnhancementOptionsL(THwDeviceId,const TColorEnhancementOptions &)
Sets color enhancement pre-processing options.CMMFDevVideoRecord::SetFrameStabilisationOptionsL(THwDeviceId,const TSize &,TBool)
Sets frame stabilisation options.CMMFDevVideoRecord::SetCustomPreProcessOptionsL(THwDeviceId,const TDesC8 &)
Sets custom implementation-specific pre-processing options.CMMFDevVideoRecord::SetCodingStandardSpecificOptionsL(const TDesC8 &)
Sets coding-standard specific encoder options.CMMFDevVideoRecord::SetImplementationSpecificEncoderOptionsL(const TDesC8 &)
Sets implementation-specific encoder options.IMPORT_C HBufC8* CodingStandardSpecificInitOutputLC();
"This method can only be called after the API has been initialized with Initialize()."
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 CMMFDevVideoRecord::Initialize()
has been called.
|
|
IMPORT_C HBufC8* ImplementationSpecificInitOutputLC();
"This method can only be called after the API has been initialized with Initialize()."
Returns implementation-specific initialization output from the encoder. This method can be called after CMMFDevVideoRecord::Initialize()
has been called.
|
|
IMPORT_C void SetErrorProtectionLevelsL(TUint aNumLevels, TBool aSeparateBuffers);
"This method can only be called after the API has been initialized with Initialize()."
Sets the number of unequal error protection levels. By default unequal error protection is not used.
|
|
IMPORT_C void SetErrorProtectionLevelL(TUint aLevel, TUint aBitrate, TUint aStrength);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void SetChannelPacketLossRate(TUint aLevel, TReal aLossRate, TTimeIntervalMicroSeconds32 aLossBurstLength);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
IMPORT_C void SetChannelBitErrorRate(TUint aLevel, TReal aErrorRate, TReal aStdDeviation);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
IMPORT_C void SetSegmentTargetSize(TUint aLayer, TUint aSizeBytes, TUint aSizeMacroblocks);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
IMPORT_C void SetRateControlOptions(TUint aLayer, const TRateControlOptions &aOptions);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
SetInLayerScalabilityL(TUint,TUint,TInLayerScalabilityType,const TArray< TUint > &,const TArray< TUint > &)
IMPORT_C void SetInLayerScalabilityL(TUint aLayer, TUint aNumSteps, TInLayerScalabilityType aScalabilityType, const TArray<
TUint > &aBitrateShare, const TArray< TUint > &aPictureShare);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void SetLayerPromotionPointPeriod(TUint aLayer, TUint aPeriod);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
IMPORT_C HBufC8* CodingStandardSpecificSettingsOutputLC();
"This method can only be called after the API has been initialized with Initialize()."
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.
|
|
IMPORT_C HBufC8* ImplementationSpecificSettingsOutputLC();
"This method can only be called after the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void WritePictureL(TVideoPicture *aPicture);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void SendSupplementalInfoL(const TDesC8 &aData);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void SendSupplementalInfoL(const TDesC8 &aData, const TTimeIntervalMicroSeconds &aTimestamp);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void CancelSupplementalInfo();
"This method can only be called after the API has been initialized with Initialize()."
Cancels the current supplemental information send request. The memory buffer reserved for supplemental information data can be reused or deallocated after the method returns.
IMPORT_C void InputEnd();
"This method can only be called after the API has been initialized with Initialize()."
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.
IMPORT_C void Start();
"This method can only be called after the API has been initialized with Initialize()."
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.
IMPORT_C void Stop();
"This method can only be called after the API has been initialized with Initialize()."
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.
IMPORT_C void Pause();
"This method can only be called after the API has been initialized with Initialize()."
Pauses video recording. Recording can be resumed using CMMFDevVideoRecord::Resume()
.
While video is paused, new pictures are not captured, and input pictures written using CMMFDevVideoRecord::WritePictureL(TVideoPicture *)
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 CMMFDevVideoRecord::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.
IMPORT_C void Resume();
"This method can only be called after the API has been initialized with Initialize()."
Resumes video recording after a pause.
IMPORT_C void Freeze();
"This method can only be called after the API has been initialized with Initialize()."
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 CMMFDevVideoRecord::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.
IMPORT_C void ReleaseFreeze();
"This method can only be called after the API has been initialized with Initialize()."
Releases a frozen input picture. Video capturing and encoding continues normally.
IMPORT_C TTimeIntervalMicroSeconds RecordingPosition();
"This method can only be called after the API has been initialized with Initialize()."
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.
|
IMPORT_C void GetOutputBufferStatus(TUint &aNumFreeBuffers, TUint &aTotalFreeBytes);
"This method can only be called after the API has been initialized with Initialize()."
Gets the current output buffer status. The information includes the number of free output buffers and the total size of free buffers in bytes.
|
IMPORT_C void GetPictureCounters(TPictureCounters &aCounters);
"This method can only be called after the API has been initialized with Initialize()."
Reads various counters related to processed video pictures. See the definition of CMMFDevVideoRecord::TPictureCounters
for a description of the counters. The counters are reset when CMMFDevVideoRecord::Initialize()
or this method is called, and thus they only include pictures processed since the last call.
|
IMPORT_C void GetFrameStabilisationOutput(THwDeviceId aHwDevice, TRect &aRect);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
IMPORT_C TUint NumDataBuffers();
"This method can only be called after the API has been initialized with Initialize()."
Returns the number of output buffers currently containing valid output data.
|
IMPORT_C TVideoOutputBuffer* NextBufferL();
"This method can only be called after the API has been initialized with Initialize()."
Retrieves the next output buffer, in coding order. The buffer must be returned using CMMFDevVideoRecord::ReturnBuffer(TVideoOutputBuffer *)
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.
|
|
IMPORT_C void ReturnBuffer(TVideoOutputBuffer *aBuffer);
"This method can only be called after the API has been initialized with Initialize()."
Returns a used output buffer back to the encoder. The buffer can no longer be used by the client.
|
IMPORT_C void PictureLoss();
"This method can only be called after the API has been initialized with Initialize()."
Indicates a picture loss to the encoder, without specifying the lost picture. The encoder can react to this by transmitting an intra-picture.
IMPORT_C void PictureLoss(const TArray< TPictureId > &aPictures);
"This method can only be called after the API has been initialized with Initialize()."
Indicates to the encoder the pictures that have been lost. The encoder can react to this by transmitting an intra-picture.
|
IMPORT_C void SliceLoss(TUint aFirstMacroblock, TUint aNumMacroblocks, const TPictureId &aPicture);
"This method can only be called after the API has been initialized with Initialize()."
Indicates a loss of consecutive macroblocks in raster scan order to the encoder.
|
IMPORT_C void ReferencePictureSelection(const TDesC8 &aSelectionData);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
IMPORT_C TUint NumComplexityLevels(THwDeviceId aHwDevice);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void SetComplexityLevel(THwDeviceId aHwDevice, TUint aLevel);
"This method can only be called after the API has been initialized with Initialize()."
Sets the complexity level to use for video processing in a hardware device. The level can be changed at any time.
|
IMPORT_C TAny* CustomInterface(THwDeviceId aHwDevice, TUid aInterface);
Retrieves a custom interface to the specified hardware device.
|
|
private: virtual void MdvrpNewBuffer(TVideoOutputBuffer *aBuffer);
Delivers a new coded data unit to the client. The CDevVideoRecord implementation will maintain a list of buffers and implement
CMMFDevVideoRecord::NumDataBuffers()
and CMMFDevVideoRecord::NextBufferL()
based on those. The buffers will be returned back to the device using CMMFDevVideoRecord::ReturnBuffer(TVideoOutputBuffer *)
.
|
private: virtual void MdvrpReturnPicture(TVideoPicture *aPicture);
Returns a used input picture back to the client. Called by the encoder hardware device after the picture has been encoded.
|
private: virtual void MdvrpSupplementalInfoSent();
Sends a notification to the client that the current supplemental info send request has completed.
private: virtual void MdvrpFatalError(CMMFVideoHwDevice *aDevice, TInt aError);
Reports a fatal error to the client. The device must automatically stop processing video data when such errors occur, and may not do further processing before it has been deleted and re-created.
|
private: virtual void MdvrpInitializeComplete(CMMFVideoHwDevice *aDevice, TInt aError);
Reports that an asynchronous CMMFDevVideoRecord::Initialize()
method has completed. The device is now ready for recording.
|
private: virtual void MdvrpStreamEnd();
Reports that the input video data end has been reached and all pictures have been processed. Called by each hardware device
after their CMMFDevVideoRecord::InputEnd()
methods have been called and all data has been processed. The proxy implementation will notify the client about stream end
when all hardware devices have called this method.
class TPictureCounters;
Class to define the picture counters available through GetPictureCounters.
Defined in CMMFDevVideoRecord::TPictureCounters
:
TPictureCounters()
Default constructor. Zeros all members.iInputPictures
The total number of input pictures. When using direct capture, this is the total...iPicturesProcessed
The number of processed (i.e. pre-processed and encoded) input pictures. iPicturesSkippedBufferOverflow
The number of pictures skipped due to lack of output buffers. iPicturesSkippedProcPower
The number of pictures skipped due to lack of processing power. iPicturesSkippedRateControl
The number of pictures skipped for bit-rate control purposes. TPictureCounters()
inline TPictureCounters();
Default constructor. Zeros all members.
iPicturesSkippedBufferOverflow
TUint iPicturesSkippedBufferOverflow;
The number of pictures skipped due to lack of output buffers.
iPicturesSkippedProcPower
TUint iPicturesSkippedProcPower;
The number of pictures skipped due to lack of processing power.
iPicturesSkippedRateControl
TUint iPicturesSkippedRateControl;
The number of pictures skipped for bit-rate control purposes.
iPicturesProcessed
TUint iPicturesProcessed;
The number of processed (i.e. pre-processed and encoded) input pictures.
iInputPictures
TUint iInputPictures;
The total number of input pictures. When using direct capture, this is the total number of pictures captured, otherwise it is the total number of input pictures written by the client.