I am trying to play a video clip on emulator using CVideoPlayerUtility class from SDK v2.0 in symbian OS7.0s.
The first problem I have is when I use the constructor of CVideoPlayerUtility (shown below) with only the first parameter,
which is supposed to work, according to the SDK Documentation, but the program does not compile.
So looking at the header definition of the class (.h file) I have found that the constructor requires eigth parameters
(enclosed below) and they don´t appear in the Documentation, so I don´t know what are they used for,
either way how to get them.
CVideoPlayerUtility* NewL(MVideoPlayerUtilityObserver& aObserver,TInt aPriority,TMdaPriorityPreference aPref,
RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWindow,const TRect& aScreenRect,const TRect& aClipRect);
Where I get stuck is with the last five parameters. What we have tried is:
- RWsSession and CWsScreenDevice have been obtained from the Enviroment, as follows:
CEikonEnv* myEikonEnv = CEikonEnv::Static();
RWsSession ws = myEikonEnv->WsSession();
- RWindowBase from "myView/Container" (which is a CCoeControl) using the function DrawableWindow()
- And I used the function ClientRect() from "myAppUI" to get both TRects
Doing this I have created an instance of the object, but the program crashes when I try to
draw anything on the screen, for instance, when I display a command menu.
I suppose the problem is with CWsScreenDevice object that is not properly initialized or built, but it is
only a supposition.
Has anyone an idea of how to solve this??
In addition to this I would like to ask you if you know any example of how to play video &/or using this class
Tanks in advance,