This tutorial shows you how to use the Video Renderer utility class to create a new surface for rendering and render a video buffer onto the display.
Before you start, you must:
Understand the Video Renderer .
You use the CVideoRenderer utility class to render video to a graphics surface. CVideoRenderer has two modes:
In timed mode, a frame is rendered at a specific time called its presentation time. A frame's presentation time is the system clock time when that frame must be visible on the display. CVideoRenderer launches its own high-priority thread to handle timed rendering.
In non-timed mode, a frame is rendered as soon as possible. Non-timed mode requires a CActiveScheduler to be present in the calling thread.
CVideoRenderer uses the MVideoRendererObserver interface to provide notifications about the status of video buffers. MVideoRendererObserver provides the following notifications:
A buffer has been rendered onto the display.
A buffer was skipped in the rendering process. This could be because it missed its presentation time or an error occurred.
A new buffer is available which can be used to store a video frame for rendering.
Note : You must implement MVideoRendererObserver to receive these notifications.
Note you should only perform this step after your observer's MvroVideoBufferAvailable() routine has been called.CVideoRenderer::NextBuffer() returns the next available buffer.
FillWithData(buffer->Buffer()); // Fills buffer with data renderer->UpdateBuffer(buffer, presentationTime);When the buffer has been displayed, you are notified via the MVideoRendererObserver::MvroBufferDisplayed(TInt,const TTime &) callback.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.