×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    30

    playing video on series 60 7.0s

    Hi Gurus,

    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();
    CWsScreenDevice myScrDev(ws);
    myScrDev.Construct();

    - RWindowBase from "myView/Container" (which is a CCoeControl) using the function DrawableWindow()
    iAppContainer->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,

  2. #2
    Registered User
    Join Date
    Apr 2003
    Posts
    5
    Could you please post your code, to have a look?
    Are you trying to test your code in the emulator or a device?

  3. #3
    Registered User
    Join Date
    Nov 2003
    Posts
    30
    Hi,
    I'm using a simple empty app created from app wizard in VisualStudio, at which I added an CVideoPlayerUtility object and instantiate it as it is explained above. It compiles but crashes when shows anything on screen (an InfoMsg Note or Unfold the options in the command bar...)
    If you are very interested on the source code I could send it to you, but all things related to video playing are explained above.

    Thanks in advance.

  4. #4
    Registered User
    Join Date
    Apr 2003
    Posts
    5

    code

    Are you testing the code in a device(6600?), if you like i can have a look at your code, if you want to send it to me,
    i am doing pretty much the same things and the video starts playing ok but in my code crashes after a while...

    Maybe you forgot something in your implementation

  5. #5
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    50
    Hi,

    I too develop a similar kind of application for 6600 which will play a videoclip initially. First, I want to test it on emulator. Can you please send me the code snippet and some video clips.

    Thanks,
    Narayanan.

  6. #6
    Registered User
    Join Date
    Nov 2003
    Posts
    30

    Re

    Hi!
    AFIK , SDK doesn't provides codecs to play video, so emulator can't. If you want to test CVideoPlayer, you must to run your app on a real device.

    Thanks.

  7. #7
    Registered User
    Join Date
    Jul 2005
    Posts
    4
    I try to play 3gp video with CVideoPlayerUtility but only sound hear from phone Nokia 7610. No crush but no picture, only sound. Video was written withhelp build-in camera in Nokia 7610 and play by standard RealVideo player. Maybe error in intialisation?

    TSize newCSize;
    newCSize.iHeight = 208;
    newCSize.iWidth = 176;
    TRect rectangle = TRect(TPoint(0,0),newCSize);

    iVideoPlayer = CVideoPlayerUtility::NewL(*this, EMdaPriorityNormal, EMdaPriorityPreferenceQuality,
    eikonEnv->WsSession(), *(eikonEnv->ScreenDevice()),
    Window(), rectangle, rectangle);

    iVideoPlayer->SetDisplayWindowL(eikonEnv->WsSession(),
    *(eikonEnv->ScreenDevice()),
    Window(),rectangle, rectangle);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×