This tutorial describes how to fast forward and rewind video clips.
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.
The following tasks are covered in this tutorial:
The high level steps to fast forward and rewind a video clip are shown here:
Create a new video player utility object.
Open a video clip to play.
Use CVideoPlayerUtility::GetPlayRateCapabilitiesL()
to check the current forward and rewind capabilities.
Call the CVideoPlayerUtility::Prepare()
method.
Call CVideoPlayerUtility::Play()
to start playback.
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.
To rewind use CVideoPlayerUtility::SetPlayVelocityL()
and set aVelocity to a value less than 0. Velocity set in this call takes effect immediately.
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()