Fast Forwarding and Rewinding

This tutorial describes how to fast forward and rewind video clips.

Purpose

The purpose of this tutorial is to show you how to fast forward and rewind video clips during playback.

Required Background

The Video Client Overview introduces the video client utilities.

Introduction

You can view a video clip in fast forward, rewind and slow-motion playback. This is achieved by setting the playback velocity to a value higher or lower than normal playback speed. The default playback velocity is 100. Values above 100 and below 0 correspond to fast forward and rewind respectively, while values 1 to 99 represent slow-motioned playback.

Note: This functionality is dependent on the capabilities of the underlying play-controller implementation and the characteristics of the video clip.

Using Playback Velocity

The following tasks are covered in this tutorial:

Basic Procedure

The high level steps to fast forward and rewind a video clip are shown here:

  1. Create a new video player utility object.

  2. Open a video clip to play.

  3. Use CVideoPlayerUtility::GetPlayRateCapabilitiesL() to check the current forward and rewind capabilities.

  4. Call the CVideoPlayerUtility::Prepare() method.

  5. Call CVideoPlayerUtility::Play() to start playback.

  6. The default playback velocity is 100. To fast forward use CVideoPlayerUtility::SetPlayVelocityL() and set aVelocity to a value greater than 100. Velocity set in this call takes effect immediately.

  7. To rewind use CVideoPlayerUtility::SetPlayVelocityL() and set aVelocity to a value less than 0. Velocity set in this call takes effect immediately.

  8. Call CVideoPlayerUtility::Stop() to halt video playback.

Example

// Create new video player utility object (iVideoPlayer)
// Open the video clip
// Call Prepare()
// Call Play()

iVideoPlayer->GetPlayRateCapabilitiesL(iVideoPlayRateCapabilities);
// Return the current playback rate capabilities

//Check that engine has forward capability.
if( iVideoPlayRateCapabilities.iPlayForward)
{
iVideoPlayer->SetPlayVelocityL(200); // fast forward
}
else
{
// Forward is not supported.
}

// If user wants to rewind. Check that engine has rewind capability.
if( iVideoPlayRateCapabilities.iPlayBackward)
{
iVideoPlayer->SetPlayVelocityL(-200); // rewind
}
else
{
// Rewind is not supported.
}

// Call Stop()

See Also

Creating and Preparing a Video Player

Configuring the Video Player

Enabling/Disabling Audio or Video Playback Separately

Scaling Automatically

Controlling Video Playback

Stepping Frames

Controlling the Video Controller Plugin