×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    80

    Can't play video?

    Dear all,

    I am trying to run a video in openGLES example program. such that I want to implement following wiki video example based on CVideoPlayerUtility in simplecube program(one of Nokia openGLES example).

    MyVideoPlayer Wiki Example:

    http://wiki.forum.nokia.com/index.ph...oPlayerUtility

    For that I have used two class.one for normal simplecube program and another for mediaengine(for video).The application can install into the phone.But when I open the application then it is automatically exit.can't run.I also added MyVideoPlayerAppView.h/MyVideoPlayerAppView.cpp into my main source & header file.

    So can anyone see the coding and find out the problem? I write the coding following way:

    CSimpleCube* CSimpleCube::NewL( TUint aWidth, TUint aHeight )
    {

    CSimpleCube* self = new (ELeave) CSimpleCube( aWidth, aHeight );
    ..........
    ............
    }

    void CSimpleCube::AppInit( void )
    {

    SetScreenSize( iScreenWidth, iScreenHeight );


    }

    void CSimpleCube::SetScreenSize( TUint aWidth, TUint aHeight )
    {
    iScreenWidth = aWidth;
    iScreenHeight = aHeight;

    // Reinitialize viewport and projection.
    glViewport( 0, 0, iScreenWidth, iScreenHeight );

    // Recalculate the view frustrum
    glMatrixMode( GL_PROJECTION );
    glLoadIdentity();
    GLfloat aspectRatio = (GLfloat)(iScreenWidth) / (GLfloat)(iScreenHeight);
    glFrustumf( FRUSTUM_LEFT * aspectRatio, FRUSTUM_RIGHT * aspectRatio,
    FRUSTUM_BOTTOM, FRUSTUM_TOP,
    FRUSTUM_NEAR, FRUSTUM_FAR );
    glMatrixMode( GL_MODELVIEW );
    }

    void CSimpleCube::AppCycle( TInt aFrame )
    {

    iVideoplayer->MvpuoPrepareComplete(aFrame);
    }


    CMediaEngine * CMediaEngine::NewL( CMyVideoPlayerAppView* aView )
    {
    CMediaEngine * self = new ( ELeave ) CMediaEngine();
    .......
    .......
    }


    void CMediaEngine::ConstructL( CMyVideoPlayerAppView* aView )
    {
    iView = aView;
    }


    void CMediaEngine::InitControllerL()
    {
    if( iPlayer != NULL )
    {
    delete iPlayer;
    }

    iPlayer = CVideoPlayerUtility::NewL( *this, EMdaPriorityNormal, EMdaPriorityPreferenceNone,
    iView->ClientWsSession(), iView->ScreenDevice(),
    iView->ClientWindow(), iView->VideoRect(),
    iView->VideoRect() );

    iPlayer->OpenFileL( KDirVideos );
    }

    void CMediaEngine::MvpuoPrepareComplete( TInt aFrame )
    {
    iPlayer->Play();
    }

    Basically im not sure in that way its possbile to implement video in openGLES program or not.But I have to implement video in openGLES enviroment anyway.
    So any solutions,suggestions,feedback,comments most welcome...

    Thanks
    Sabera

  2. #2
    Registered User
    Join Date
    Aug 2009
    Posts
    39

    Re: Can't play video?

    you should confirmation the ( const TRect& aScreenRect, const TRect& aClipRect ) and debug it
    www.devdiv.net http://discussion.forum.nokia.com
    向坛子的牛人学习,缩小与梦想之间的步伐!

    超于自己! Figthing!
    我就是个搞Symbian的,咋的了?!

Similar Threads

  1. cannot able to play a video file.
    By shalini.mishra in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2006-11-13, 16:54
  2. Play video on Canvas with N 6600 doesnt work. Please help!!!
    By Robert111 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2006-02-22, 08:45

Posting Permissions

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