CVideoRecorderUtility
provides features to record video clips to files, descriptors or URLs and manipulate embedded meta data. For the purposes
of this description, the recording process has been broken down into the following sections.
Opening - describes the options available for opening video sources and sinks.
Configuration - describes the various configuration settings that can be queried or set such as volume and gain settings, maximum size of a recorded clip and so on.
Plug-in Control - describes the information and commands that can be sent to or retrieved from plug-in controllers.
Meta data control - describes the controls available for meta data manipulation.
Recording - describes the controls available for recording video clips.
When recording video it is necessary to specify the handle to the camera, the controller UID, video format and the codecs
to use for video and audio; this is reflected in the range of open statements available in CVideoRecorderUtility
.
The following open statements are provided:
void OpenFileL(const TDesC& aFileName, TInt aCameraHandle, TUid aControllerUid, TUid aVideoFormat, TFourCC aVideoType=KFourCCNULL, TFourCC aAudioType=KFourCCNULL);
void OpenDesL(TDes8& aDescriptor, TInt aCameraHandle, TUid aControllerUid, TUid aVideoFormat, TFourCC aVideoType=KFourCCNULL, TFourCC aAudioType=KFourCCNULL);
void OpenUrlL(const TDesC& aUrl, TInt aIapId = KUseDefaultIap, TInt aCameraHandle, TUid aControllerUid, TUid aVideoFormat, TFourCC aVideoType=KFourCCNULL, TFourCC aAudioType=KFourCCNULL);
If a video clip is already being recorded, use Stop()
followed by Close()
to close the video clip correctly before specifying new video clip to record.
Following the opening of the file, descriptor or URL to record video data, configuration adjustments can be made using the methods described below.
The following categories of configuration methods can be used to retrieve and set configuration parameters when recording video data:
General - covers the setting and reporting of playback priorities in relation to other applications that may be running, the detection or setting of audio tracks within video clips and the detection and setting of video frame sizes. The specific methods are:
SetPriorityL()
- sets the priority of the video/audio device which is used to arbitrate between multiple objects trying to access a controller.
GetPriorityL()
- gets the priority setting of the video/audio device.
AudioEnabledL()
and SetAudioEnabledL()
- determines whether an audio track is present within the video clip or specifies that an audio track is present within the
clip.
GetVideoFrameSizeL()
and SetVideoFrameSizeL()
- gets and sets the current frame size of the video clip.
Mime type and codecs - covers the reporting and setting of video and audio codecs.
GetSupportedVideoTypesL()
and GetSupportedAudioTypesL()
- gets a list of supported video and audio codecs supported by the currently open video clip.
VideoTypeL()
and AudioTypeL()
- retrieves the video and audio codecs currently in use by the video clip.
SetVideoTypeL()
and SetAudioTypeL()
- sets new video and audio codecs to use when recording data to the video clip.
Note: the presence of an audio track within a video clip can be determined using AudioEnabledL()
.
Bit and frame rates - covers the reporting of the bit and frame rate settings for video clips and possible audio tracks.
VideoBitRateL()
and SetVideoBitRateL()
- gets or sets the video bit rates.
AudioBitRateL()
and SetAudioBitRateL()
- gets or sets the audio bit rates.
GetVideoFrameSizeL()
and SetVideoFrameSizeL()
- gets or sets the current frame size of the video.
The video frame rate in frames per second can be retrieved using VideoFrameRateL()
.
Note: the presence of an audio track within a video clip can be determined using AudioEnabledL()
.
Gain - covers the reporting and setting of the gain settings for the recording device. The methods for controlling gain settings
for recording devices are GainL()
, SetGainL()
and MaxGainL()
.
You can govern the relationship with a video plug-n in various ways:
ControllerImplementationInformationL()
-
allows applications to query implementation information about the controller plugin in use.
CustomCommandSync()
- allows applications to send custom commands to controller plugins.
Some video formats enable the use of meta data, enabling the creator or player of a video clip to retrieve or set information that is held within the clip itself. This meta data is usually used to store information such as copyright information, creator, creation date and so on.
CMdaAudioRecorderUtility
provides a set of meta data methods that enable you to:
NumberOfMetaDataEntriesL()
and MetaDataEntryL()
- gets the number of meta data entries in a clip and retrieves specific meta data entries from a clip.
AddMetaDataEntryL()
and ReplaceMetaDataEntryL()
- adds or replaces meta data entries.
RemoveMetaDataEntryL()
- deletes a specific meta data entry.
This class is intended for recording video clips only. If more than one video clip needs to be recorded, you must first Stop()
and Close()
any open video clip before attempting to record a new one.
The record related methods are:
SetMaxClipSizeL()
- sets the maximum size (in bytes) permissible
for a recorded video clip.
Prepare()
- prepares the record controller for use.
When the preparation of the record controller is complete, successfully or otherwise, the callback function MVideoRecorderUtilityObserver::MvruoPrepareComplete()
is called.
Record()
- starts recording video data to the specified file, descriptor or URL. This function must not be called until a MVideoRecorderUtilityObserver::MvruoPrepareComplete()
has been received with an aError
equal to KErrNone
.
Note: before starting to record, if you are using an audio clip, make sure that the recording gain is set by calling SetGainL()
, as the initial gain is undefined. The gain might also have been modified by another client application.
PauseL()
- enables you to pause recording; the position within the video clip is maintained in case a subsequent RecordL()
is issued.
Stop()
- enables you to stop recording. If the video format supports audio tracks and audio is enabled, this function also stops
the recording of the audio data.
Close()
- closes all related video and audio controllers.
PositionL()
- retrieves the current recording position within the video clip.
DurationL()
- determines the duration of the video clip in microseconds.
Multi Media Framework Client Overview - general overview of the various components of the MMF Client API and the functionality they provide.
Audio Recording, Conversion and Playing - advanced audio file manipulation features; specifically, the ability to record, convert and playback sound clips as well as to manipulate meta data.
Audio Recording - introduction to the audio recording class.
Audio Conversion - introduction to the audio conversion class.
Audio Playing - introduction to the audio playing class.
Audio Streaming - the interface to streaming sampled audio.
Audio Tone Player - a simple interface for tone generation (synthesized sounds) that is supported on all audio-capable devices.
Video Recording and Playing - video manipulation features; specifically, the ability to record and playback video clips as well as to manipulate meta data.
Video Recording - introduction to the video recording class.
Video Playing - introduction to the video playing class.