Community: Wiki

你在这里: You Are Here: Olet tässä: Vous êtes ici: Sie befinden sich hier: Tu sei qui: 現在のページ: Você está aqui: Вы здесь: Usted está aquí:
This page was last modified 13:21, 19 June 2008.

Rendering on top of the video

From Forum Nokia Wiki


Contents

Purpose

This article shows how to render content on top of the video besides playing the video.


Use cases

Scrolling some text content on top of the video besides playing the video.

Describing the content of the video.


Description

There are no specific API's available for rendering content on top of the video. The only possibility is to go for a work around using CDirectScreenAccess and CVideoPlayerUtility classes.

However the use of CDirectScreenAccess class for rendering content on top of the video is working only for 3.0 devices and is not applicable for 3rd Edition FP1 devices as the content goes behind the video.

Also note that it causes flickering effect which is quite unacceptable. Hence the use of CDirectScreenAccess is just a workaround and not an appropriate solution for rendering on top of video as it works fine only on specific devices.


Code Snippet

The rendering part can be done using the CDirectScreenAccess class.

Intially go for creating an object of type CDirectScreenAccess and add it to the ActiveScheduler, followed by a call to StartL() function. The StartL() function informs the window server that you are going to start direct screen access and sets up a graphics context with which you can draw to the screen.

   iDSA = CDirectScreenAccess::NewL(iWsSession,iWsScreenDevice,iWindow,*this);
   CActiveScheduler::Add(this);
   StartL();

In the StartL() we can include the functionality for getting the graphics context, the region the DSA can draw in and finally setting the display to the defined region, using the following lines of code.

   iGc = iDSA->Gc(); //iGc is an object of type CFbsBitGc
   iGc->SetBrushStyle(CGraphicsContext::ENullBrush);
   iRegion = iDSA->DrawingRegion();
   iGc->SetClippingRegion(iRegion);

Using various API's available in CFbsBitGc class, the content can actually be drawn to the screen in the required format. More information is provided in the link below where you can get a samle example for rendering on top of the video.


Known Issues

With respect to 3rd Edition FP1 devices, it's not possible to render on top of the video, but we can have an alternative of setting the video to some part of the screen and utilize the remaining portion for displaying the content to be rendered. Resizing the window in which the video is being played can be done using SetDisplayWindowL().


Example application

Sample application: Image:RenderingText.zip

Related Discussions

Thread Thread Starter Forum Replies Last Post
related to video quality sis1987 Mobile Java Media (Graphics & Sounds) 2 2008-06-05 13:37
Distinguishing between BT Enabled Phones and GPS michaelmatthews Bluetooth Technology 8 2007-06-08 16:50
Mixing Audio and Video dchiaramello Symbian Media (Graphics & Sounds) 7 2005-11-18 13:44
HELP! any other way?? joei523 General Discussion 1 2005-11-27 17:03
unable to stream video on 3250 dinesh547 General Symbian C++ 6 2008-07-07 16:56

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditFurlTechnocratiMagnoliaTwitter  Share this page Share this page Invite a friend Invite a friend
E-mail Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us Regional websites: Chinese Japanese © 2008 Nokia 
RDF Facets: qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfnTypeZCommunityContentQ qfnZtypeQUqfnTypeZWebpageQ qfnZtypeQUqfnTypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX