Configuring the Video Recorder

This tutorial describes how to configure the video recorder.

Purpose

The purpose of this tutorial is to show you how to make configuration adjustments to video recording parameters.

Required Background

The Video Client Overview introduces the video client utilities.

Introduction

The video recorder utility is used to record video clips to files, descriptors or URLs and manipulate embedded meta data. This functionality is implemented by the CVideoRecorderUtility class.

Using Video Recording Parameters

The following tasks will be covered in this tutorial:

Configuring the Priority

The high level steps to configure the priority are shown here:

  • To set the priority of the video/audio device, which is used to arbitrate between multiple objects trying to access a controller, use the CVideoRecorderUtility::SetPriorityL() function.

             
              
             
             void CRecordVideo::SetPriorityL(TInt aPriority, TMdaPriorityPreference aPref)
        {
        iVideoRecordUtility->SetPriorityL(aPriority, aPref);
        }
            
  • To retrieve the priority setting of the video/audio device, use the CVideoRecorderUtility::GetPriorityL() function.

             
              
             
             void CRecordVideo::GetPriorityL(TInt &aPriority, TMdaPriorityPreference &aPref)
        {
        iVideoRecordUtility->GetPriorityL(aPriority, aPref);
        }
            

Enabling Audio Playback

The high level steps to enable audio playback are shown here:

  • To determine whether an audio track is associated with a video clip, use the CVideoRecorderUtility::AudioEnabledL() . This function returns the status of audio support for the video clip currently being recorded.

             
              
             
             TBool CRecordVideo::AudioEnabledL()
        {
        return iVideoRecordUtility->AudioEnabledL();
        }
            
  • To set whether the current video clip has an audio track associated with it, use clip CVideoRecorderUtility::SetAudioEnabledL() function.

             
              
             
             void CRecordVideo::SetAudioEnabledL(TBool aEnabled)
        {
        iVideoRecordUtility->SetAudioEnabledL(aEnabled);
        }
            

    Note : The above listed APIs are relevant only if the video clip is associated with an audio stream.

Configuring Video Frame Size

The high level steps to configure video frame size are shown here:

  • To retrieve the current frame size of the video clip, use the CVideoRecorderUtility::GetVideoFrameSizeL() . This function returns the video frame size in pixels.

             
              
             
             void CRecordVideo::GetVideoFrameSizeL(TSize &aSize)
        {
        iVideoRecordUtility->GetVideoFrameSizeL(aSize);
        }
            
  • To set the video frame to the desired size, use CVideoRecorderUtility::SetVideoFrameSizeL() function. This functions sets the video frame size in pixels.

             
              
             
             void CRecordVideo::SetVideoFrameSizeL(const TSize &aSize)
        {
        iVideoRecordUtility->SetVideoFrameSizeL(aSize);
        }
            
  • To set the video frame size to 176x144, use the CVideoRecorderUtility::SetVideoFrameSizeL() function.

             
              
             
             TSize frameSize;
        frameSize.iWidth = 176;
        frameSize.iHeight = 144;
        TRAP(err, iVideoRecorderUtility->SetVideoFrameSizeL(frameSize));
            

Configuring MIME Type and Codecs

The high level steps to configure MIME type and codecs are shown here:

Configuring Bit and Frame Rates

The high level steps to configure bit and frame rates are shown here:

Configuring Gain

The high level steps to configure recording gain are shown here:

  • To return the current recording gain use GainL() .

             
              
             
             TInt CRecordVideo::GainL() 
        {
        return iVideoRecordUtility->GainL();
        }
            
  • To set the audio recording gain use SetGainL() .

             
              
             
             void CRecordVideo::SetGainL(TInt aGain)
        {
        iVideoRecordUtility->SetGainL(aGain);
        }
            
  • To return the maximum possible setting for the recording gain use MaxGain() .

             
              
             
             TInt CRecordVideo::MaxGainL() 
        {
        return iVideoRecordUtility->MaxGainL();
        }