Recording Video Data

This tutorial describes how to record video data.

Purpose

The purpose of this tutorial is to show you how to use the video recorder to control video recording.

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.

The sequence diagram below explains the different functionalities of the video recorder utility:

Figure 1. Video recorder sequence diagram

Using Video Recording

The following tasks will be covered in this tutorial:

Basic Procedure

The high level steps to record video data are shown here:

  1. If you are using an audio clip, the recording gain must be set using the CVideoRecorderUtility::SetGainL() function before recording because the initial gain is undefined or may also have been modified by another client application.

  2. The specific functions to record and perform related tasks are as follows:

    • To start recording video data to the specified file, descriptor or URL, use the CVideoRecorderUtility::Record() function.

                 
                  
                 
                 void CRecordVideo::Record()
          {
          iVideoRecordUtility->Record();
          }
                
    • To pause recording, use the CVideoRecorderUtility::PauseL() function. The position within the video clip is maintained in case a subsequent CVideoRecorderUtility::Record() is called.

                 
                  
                 
                 void CRecordVideo::PauseL()
          {
          iVideoRecordUtility->PauseL();
          }
                
    • To stop recording, use the CVideoRecorderUtility::Stop() function. If the video format supports audio tracks and if audio is enabled, this function also stops recording the audio data.

                 
                  
                 
                 TInt CRecordVideo::Stop()
          {
          TInt err = iVideoRecordUtility->Stop();
          return err;
          }
                
    • To close all related video and audio controllers, use the CVideoRecorderUtility::Close() function.

                 
                  
                 
                 void  CRecordVideo::Close()
          {
          iVideoRecordUtility->Close();
          }