|
||
class CVideoRecorderUtility : public CBase, public MMMFClientUtility;
Records video data.
The class offers a simple interface to record and set meta data and control information for a video clip and save the result to a file, descriptor or URL.
Note: Some video formats also allow the storing of audio data. To accommodate this, this class contains audio functions that can manipulate such data.
While this class is abstract, CVideoRecorderUtility::NewL(MVideoRecorderUtilityObserver &,TInt,TMdaPriorityPreference)
constructs, initialises and returns pointers to instances of concrete classes derived from this abstract class. This concrete
class is part of the MMF implementation and is private.
MMMFClientUtility
- No description.
CBase
-
Base class for all classes to be instantiated on the heap.
CVideoRecorderUtility
-
Records video data.
Defined in CVideoRecorderUtility
:
AddMetaDataEntryL(const CMMFMetaDataEntry &)
Adds a new meta data entry to the video clip.AudioBitRateL()const
Gets the audio bit rate.AudioChannelsL()const
Returns the current number of audio channels to record (1 for mono, 2 for stereo...AudioEnabledL()const
Returns the status of audio support for the video clip currently being recorded.AudioSampleRateL()const
Returns the current audio sample rate.AudioTypeL()const
Returns the audio type. This represents the encoding of audio data within the cu...Close()
Closes a video clip.ControllerImplementationInformationL()
Returns the controller implementation information associated with the current co...CustomCommandAsync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &,TDes8 &,TRequestStatus &)
Sends an asynchronous custom command to the controller.CustomCommandAsync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &,TRequestStatus &)
Sends an asynchronous custom command to the controller.CustomCommandSync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &)
Sends a synchronous custom command to the controller.CustomCommandSync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &,TDes8 &)
Sends a synchronous custom command to the controller.DurationL()const
Returns the length of the video clip.GainL()const
Returns the current recording gain.GetPixelAspectRatioL(TVideoAspectRatio &)const
Gets the current pixel aspect ratio.GetPriorityL(TInt &,TMdaPriorityPreference &)const
Gets the current recording priority. This is used to arbitrate between simultane...GetSupportedAudioChannelsL(RArray< TUint > &)const
Gets the list of the supported numbers of audio channels. One channel represents...GetSupportedAudioSampleRatesL(RArray< TUint > &)const
Gets the list of the supported audio sample rates. The client must select the au...GetSupportedAudioTypesL(RArray< TFourCC > &)const
Gets a list of the audio types that are supported for recording to.GetSupportedPixelAspectRatiosL(RArray< TVideoAspectRatio > &)const
Gets a list of supported pixel aspect ratios. The client must select the video c...GetSupportedVideoTypesL(CDesC8Array &)const
Gets a list of the video types that are supported for recording to.GetVideoFrameSizeL(TSize &)const
Gets the video frame size.MaxGainL()const
Returns the maximum possible setting for the recording gain.MetaDataEntryL(TInt)const
Returns a meta data entry from the current clip.NewL(MVideoRecorderUtilityObserver &,TInt,TMdaPriorityPreference)
Constructs and initialises a new instance of the video recorder utility.NumberOfMetaDataEntriesL()const
Returns the number of meta data entries associated with this video clip.OpenDesL(TDes8 &,TInt,TUid,TUid,const TDesC8 &,TFourCC)
Specifies a descriptor that can be used to store a recorded video clip.OpenFileL(const RFile &,TInt,TUid,TUid,const TDesC8 &,TFourCC)
Opens a file that can be used to store a recorded video clip.OpenFileL(const TDesC &,TInt,TUid,TUid,const TDesC8 &,TFourCC)
Opens a file that can be used to store a recorded video clip.OpenUrlL(const TDesC &,TInt,TInt,TUid,TUid,const TDesC8 &,TFourCC)
Specifies a URL that can be used to store a recorded video clip.PauseL()
Pauses the recording of video data to the specified file, descriptor or URL.Prepare()
Prepares the recorder for recording.Record()
Starts the recording of video data to the specified file, descriptor or URL.RecordTimeAvailable()const
Returns the (possibly estimated) record time left in the clip.RemoveMetaDataEntryL(TInt)
Removes a meta data entry.ReplaceMetaDataEntryL(TInt,const CMMFMetaDataEntry &)
Replaces a meta data entry.SetAudioBitRateL(TInt)
Sets the audio bit rate.SetAudioChannelsL(const TUint)
Sets the number of audio channels to record (1 for mono, 2 for stereo). The clie...SetAudioEnabledL(TBool)
Sets whether the current clip has an audio stream.SetAudioSampleRateL(const TUint)
Sets the sample rate for audio recording. The client must select the audio codec...SetAudioTypeL(TFourCC)
Sets the audio type. This represents the encoding of the audio data within the c...SetGainL(TInt)
Sets the audio recording gain.SetMaxClipSizeL(TInt)
Sets the maximum recording size for a video clip in bytes.SetPixelAspectRatioL(const TVideoAspectRatio &)
Sets recorded video pixel aspect ratio. The client must select the video codec a...SetPriorityL(TInt,TMdaPriorityPreference)
Sets the recording priority. This is used to arbitrate between simultaneous acce...SetVideoBitRateL(TInt)
Sets the video bit rate.SetVideoFrameRateL(TReal32)
Sets the video frame rate.SetVideoFrameSizeL(const TSize &)
Sets the video frame size in pixels.SetVideoTypeL(const TDesC8 &)
Sets the codec to use for the video component of the video clip.Stop()
Stops the recording of video data to the specified file, descriptor or URL.VideoBitRateL()
Returns the video bit rate.VideoFormatMimeType()const
Returns the video format's MIME type.VideoFrameRateL()const
Returns the video frame rate.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...Capability: | MultimediaDD | A process requesting or using this method that has MultimediaDD capability will always have precedence over a process that does not have MultimediaDD. |
IMPORT_C static CVideoRecorderUtility* NewL(MVideoRecorderUtilityObserver &aObserver, TInt aPriority=EMdaPriorityNormal, TMdaPriorityPreference
aPref=EMdaPriorityPreferenceTimeAndQuality);
Constructs and initialises a new instance of the video recorder utility.
The function leaves if the video recorder utility object cannot be created.
|
|
IMPORT_C void OpenFileL(const TDesC &aFileName, TInt aCameraHandle, TUid aControllerUid, TUid aVideoFormat, const TDesC8 &aVideoType=KNullDesC8,
TFourCC aAudioType=KMMFFourCCCodeNULL);
Opens a file that can be used to store a recorded video clip.
If an error occurs, this function leaves with one of the system wide error codes.
|
IMPORT_C void OpenFileL(const RFile &aFile, TInt aCameraHandle, TUid aControllerUid, TUid aVideoFormat, const TDesC8 &aVideoType=KNullDesC8,
TFourCC aAudioType=KMMFFourCCCodeNULL);
Opens a file that can be used to store a recorded video clip.
If an error occurs, this function leaves with one of the system wide error codes.
|
IMPORT_C void OpenDesL(TDes8 &aDescriptor, TInt aCameraHandle, TUid aControllerUid, TUid aVideoFormat, const TDesC8 &aVideoType=KNullDesC8,
TFourCC aAudioType=KMMFFourCCCodeNULL);
Specifies a descriptor that can be used to store a recorded video clip.
If an error occurs, this function leaves with one of the system wide error codes.
|
IMPORT_C void OpenUrlL(const TDesC &aUrl, TInt aIapId, TInt aCameraHandle, TUid aControllerUid, TUid aVideoFormat, const TDesC8
&aVideoType=KNullDesC8, TFourCC aAudioType=KMMFFourCCCodeNULL);
Specifies a URL that can be used to store a recorded video clip.
If an error occurs, this function leaves with one of the system wide error codes.
|
IMPORT_C void Prepare();
Prepares the recorder for recording.
This should be called before the first call to record. The client will receive a MvruoPrepareComplete when the prepare operation is complete.
MVideoRecorderUtilityObserver::MvruoPrepareComplete(TInt)
Notification that video recorder is ready to begin recording. This callback is g...IMPORT_C void Record();
Starts the recording of video data to the specified file, descriptor or URL.
If the video format also supports the use of an audio track, recording of the audio track can be enabled using CVideoRecorderUtility::SetAudioEnabledL(TBool)
.
The client will receive a MvruoRecordComplete on completion of recording, unless it explicitly ends recording with Stop. CVideoRecorderUtility::Prepare()
should be called before the first call to CVideoRecorderUtility::Record()
.
This function must not be called until a MVideoRecorderUtilityObserver::MvruoPrepareComplete(TInt)
has been received with an aError equal to KErrNone.
IMPORT_C TInt Stop();
Stops the recording of video data to the specified file, descriptor or URL.
If the video format supports audio tracks and audio is enabled, this function also stops the recording of the audio data.
Recording is stopped without sending the MvruoRecordComplete message to the client.
|
IMPORT_C void PauseL();
Pauses the recording of video data to the specified file, descriptor or URL.
If the video format supports audio tracks and audio is enabled, this function also pauses the recording of the audio data.
If an error occurs, this function leaves with one of the system wide error codes.
Capability: | MultimediaDD | A process requesting or using this method that has MultimediaDD capability will always have precedence over a process that does not have MultimediaDD. |
IMPORT_C void SetPriorityL(TInt aPriority, TMdaPriorityPreference aPref);
Sets the recording priority. This is used to arbitrate between simultaneous accesses of the sound hardware.
|
IMPORT_C void GetPriorityL(TInt &aPriority, TMdaPriorityPreference &aPref) const;
Gets the current recording priority. This is used to arbitrate between simultaneous accesses of the sound hardware.
|
IMPORT_C void SetVideoFrameRateL(TReal32 aFrameRate);
Sets the video frame rate.
|
IMPORT_C TReal32 VideoFrameRateL() const;
Returns the video frame rate.
If an error occurs, this function leaves with one of the system wide error codes.
|
IMPORT_C void SetVideoFrameSizeL(const TSize &aSize);
Sets the video frame size in pixels.
If an error occurs, this function leaves with one of the system wide error codes.
|
IMPORT_C void GetVideoFrameSizeL(TSize &aSize) const;
Gets the video frame size.
If an error occurs, this function leaves with one of the system wide error codes.
|
IMPORT_C void SetVideoBitRateL(TInt aBitRate);
Sets the video bit rate.
|
IMPORT_C TInt VideoBitRateL();
Returns the video bit rate.
|
IMPORT_C void SetAudioBitRateL(TInt aBitRate);
Sets the audio bit rate.
If an error occurs, this function leaves with one of the system wide error codes.
|
IMPORT_C TInt AudioBitRateL() const;
Gets the audio bit rate.
If an error occurs, this function leaves with one of the system wide error codes.
|
IMPORT_C void SetAudioEnabledL(TBool aEnabled);
Sets whether the current clip has an audio stream.
|
IMPORT_C TBool AudioEnabledL() const;
Returns the status of audio support for the video clip currently being recorded.
|
IMPORT_C TTimeIntervalMicroSeconds DurationL() const;
Returns the length of the video clip.
|
IMPORT_C void SetMaxClipSizeL(TInt aClipSizeInBytes);
Sets the maximum recording size for a video clip in bytes.
If an error occurs, this function leaves with one of the system wide error codes.
|
IMPORT_C void SetGainL(TInt aGain);
Sets the audio recording gain.
If you want to disable audio, rather than setting the recording gain to 0, use CVideoRecorderUtility::SetAudioEnabledL(TBool)
.
If an error occurs, this function leaves with one of the system wide error codes
|
IMPORT_C TInt GainL() const;
Returns the current recording gain.
If an error occurs, this function leaves with one of the system wide error codes.
|
IMPORT_C TInt MaxGainL() const;
Returns the maximum possible setting for the recording gain.
|
IMPORT_C TInt NumberOfMetaDataEntriesL() const;
Returns the number of meta data entries associated with this video clip.
If an error occurs, this function leaves with one of the system wide error codes.
|
IMPORT_C CMMFMetaDataEntry* MetaDataEntryL(TInt aIndex) const;
Returns a meta data entry from the current clip.
If an error occurs, this function leaves with one of the system wide error codes.
|
|
|
IMPORT_C void AddMetaDataEntryL(const CMMFMetaDataEntry &aNewEntry);
Adds a new meta data entry to the video clip.
If an error occurs, this function leaves with one of the system wide error codes.
|
IMPORT_C void RemoveMetaDataEntryL(TInt aIndex);
Removes a meta data entry.
If an error occurs, this function leaves with one of the system wide error codes.
|
IMPORT_C void ReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry &aNewEntry);
Replaces a meta data entry.
The meta data entry specified by aIndex is replaced by the new data specified in aNewEntry. The index must be a value between
0 and CVideoRecorderUtility::NumberOfMetaDataEntriesL()const
-1.
If an error occurs, this function leaves with one of the system wide error codes.
|
IMPORT_C TFourCC AudioTypeL() const;
Returns the audio type. This represents the encoding of audio data within the current format.
If an error occurs, this function leaves with one of the system wide error codes.
|
IMPORT_C void SetVideoTypeL(const TDesC8 &aType);
Sets the codec to use for the video component of the video clip.
This represents the encoding of the video data within the current format. To retrieve a list of available video codecs, use
CVideoRecorderUtility::GetSupportedVideoTypesL(CDesC8Array &)const
.
If an error occurs, this function leaves with one of the system wide error codes.
|
IMPORT_C void SetAudioTypeL(TFourCC aType);
Sets the audio type. This represents the encoding of the audio data within the current format.
To retrieve a list of available audio codecs, use CVideoRecorderUtility::GetSupportedAudioTypesL(RArray< TFourCC > &)const
.
If an error occurs, this function leaves with one of the system wide error codes.
|
IMPORT_C void GetSupportedVideoTypesL(CDesC8Array &aVideoTypes) const;
Gets a list of the video types that are supported for recording to.
|
IMPORT_C void GetSupportedAudioTypesL(RArray< TFourCC > &aAudioTypes) const;
Gets a list of the audio types that are supported for recording to.
|
IMPORT_C TTimeIntervalMicroSeconds RecordTimeAvailable() const;
Returns the (possibly estimated) record time left in the clip.
|
IMPORT_C const TDesC8& VideoFormatMimeType() const;
Returns the video format's MIME type.
|
IMPORT_C const CMMFControllerImplementationInformation& ControllerImplementationInformationL();
Returns the controller implementation information associated with the current controller.
|
IMPORT_C TInt CustomCommandSync(const TMMFMessageDestinationPckg &aDestination, TInt aFunction, const TDesC8 &aDataTo1, const
TDesC8 &aDataTo2, TDes8 &aDataFrom);
Sends a synchronous custom command to the controller.
|
|
IMPORT_C TInt CustomCommandSync(const TMMFMessageDestinationPckg &aDestination, TInt aFunction, const TDesC8 &aDataTo1, const
TDesC8 &aDataTo2);
Sends a synchronous custom command to the controller.
|
|
CustomCommandAsync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &,TDes8 &,TRequestStatus &)
IMPORT_C void CustomCommandAsync(const TMMFMessageDestinationPckg &aDestination, TInt aFunction, const TDesC8 &aDataTo1, const
TDesC8 &aDataTo2, TDes8 &aDataFrom, TRequestStatus &aStatus);
Sends an asynchronous custom command to the controller.
Note: This method will return immediately. The RunL of the active object owning the aStatus parameter will be called when the command is completed by the controller framework.
|
CustomCommandAsync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &,TRequestStatus &)
IMPORT_C void CustomCommandAsync(const TMMFMessageDestinationPckg &aDestination, TInt aFunction, const TDesC8 &aDataTo1, const
TDesC8 &aDataTo2, TRequestStatus &aStatus);
Sends an asynchronous custom command to the controller.
Note: This method will return immediately. The RunL of the active object owning the aStatus parameter will be called when the command is completed by the controller framework.
|
IMPORT_C void SetPixelAspectRatioL(const TVideoAspectRatio &aAspectRatio);
The video codec has been selected.
Sets recorded video pixel aspect ratio. The client must select the video codec and set the picture size (CVideoRecorderUtility::SetVideoFrameSizeL(const TSize &)
) before calling this method, since the supported aspect ratios may depend on the codec and picture size. If the codec or
picture size is not set, the controller may accept or reject pixel aspect ratios incorrectly.
If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below. This
method can be called after the destination has been opened, but only before calling CVideoRecorderUtility::Prepare()
.
|
|
IMPORT_C void GetPixelAspectRatioL(TVideoAspectRatio &aAspectRatio) const;
The destination file, descriptor, or URL has been opened.
Gets the current pixel aspect ratio.
If an error occurs, this function leaves with one of the system wide error codes. This method can be called after the destination has been opened.
|
|
IMPORT_C void GetSupportedPixelAspectRatiosL(RArray< TVideoAspectRatio > &aAspectRatios) const;
The video codec has been selected.
Gets a list of supported pixel aspect ratios. The client must select the video codec and set the picture size (CVideoRecorderUtility::SetVideoFrameSizeL(const TSize &)
) before calling this method, since the supported aspect ratios may depend on the codec and picture size. If the codec or
picture size is not set, the returned list may not be correct.
If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below.
|
|
IMPORT_C void SetAudioChannelsL(const TUint aNumChannels);
The audio codec has been selected.
Sets the number of audio channels to record (1 for mono, 2 for stereo). The client must select the audio codec before calling this method, since not all codecs support stereo or multi-channel recording. If the codec has not been set, this method may accept or reject configurations incorrectly.
If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below. This
method can be called after the destination has been opened, but only before calling CVideoRecorderUtility::Prepare()
.
|
|
IMPORT_C TUint AudioChannelsL() const;
The destination file, descriptor, or URL has been opened.
Returns the current number of audio channels to record (1 for mono, 2 for stereo).
If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below. This method can be called after the destination has been opened.
|
|
IMPORT_C void GetSupportedAudioChannelsL(RArray< TUint > &aChannels) const;
The audio codec has been selected.
Gets the list of the supported numbers of audio channels. One channel represents mono, two channels stereo and so on. This method can only be called after the audio codec has been selected, otherwise the list may be incorrect.
If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below.
|
|
IMPORT_C void SetAudioSampleRateL(const TUint aSampleRate);
The audio codec has been selected.
Sets the sample rate for audio recording. The client must select the audio codec before calling this method, since the supported sample rates depend on the codec. If the codec has not been set, this method may accept or reject configurations incorrectly.
If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below.
|
|
IMPORT_C TUint AudioSampleRateL() const;
The destination file, descriptor, or URL has been opened.
Returns the current audio sample rate.
If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below. This method can be called after the destination has been opened.
|
|
IMPORT_C void GetSupportedAudioSampleRatesL(RArray< TUint > &aSampleRates) const;
The audio codec has been selected.
Gets the list of the supported audio sample rates. The client must select the audio codec before calling this method, since the supported sample rates depend on the codec. If the codec has not been set, the returned list may not be correct.
If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below.
|
|