×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Apr 2006
    Posts
    66

    Playing video in QT

    hi,
    Is there any way to play video in qt -S60 other than using phonon as it has not been ported onto S60.


    Regards
    Vishwas

  2. #2
    Nokia Developer Champion
    Join Date
    Sep 2007
    Location
    Bhavnagar
    Posts
    928

    Re: Playing video in QT

    hi,
    I think it is not yet ported to S60. I am not sure but it is possible using phonon only. You should better wait for some new release from nokia.

    Regards
    Jajal Mehul

  3. #3
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Playing video in QT

    While you wait for Phonon, you could just use the native Symbian CVideoPlayerUtility class to play the video.

    Mark

  4. #4
    Registered User
    Join Date
    Jan 2009
    Posts
    16

    Re: Playing video in QT

    Hi
    I tried displaying video through CVideoPlayerUtility. But my app crashes while creating instance of CVideoPlayerUtility with "WServ 6 Panic" (Invalid window handle). Below is code snippet how I am instantiating videoplayerutility

    RWindow window(CCoeEnv::Static()->WsSession());
    const TRect rect(TPoint(0,0), TSize(240,320));
    d_ptr->player = CVideoPlayerUtility::NewL(*d_ptr,EMdaPriorityNormal,
    EMdaPriorityPreferenceNone,
    CCoeEnv::Static()->WsSession(),
    *(CCoeEnv::Static()->ScreenDevice()),
    window,
    rect,
    rect);
    Please, Suggest me the correct parameters to pass.

  5. #5
    Registered User
    Join Date
    Jan 2009
    Location
    ભારત->ગુજરાત->ભાવનગર
    Posts
    279

    Re: Playing video in QT

    Hii
    I think you can't play any movie in QT without Phonon.And as james1980 in the previous article said that"it is not yet ported to S60",so friend better to wait for some other code version of QT

    Regards
    Viral Parmar

  6. #6
    Registered User
    Join Date
    Jan 2009
    Posts
    16

    Re: Playing video in QT

    Hi
    I am able to initailise CVIdeoPlayerUtility object with the following code:

    Code:
    RWindowBase *rWindow = static_cast<RWindowBase*>(videoFrame->winId()->DrawableWindow());
    const TRect rect(TPoint(0,0), TSize(size.width(), size.height()/2));
    QSize  size = videoFrame->size();	
    d_ptr->player = CVideoPlayerUtility::NewL(*d_ptr,EMdaPriorityNormal,
    			EMdaPriorityPreferenceNone,
    		CCoeEnv::Static()->WsSession(),
    		*(CCoeEnv::Static()->ScreenDevice()),
    		*rWindow,
    		rect,
    		rect);
    where d_ptr is an object of class derived from MVideoPlayerUtilityObserver and videoFrame is a QWidget.

    It is showing video on half of the screen. Hope this will be helpful.

    Regards
    Sumit

  7. #7
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    84

    Re: Playing video in QT

    I've tried the suggestion below, but I'm still not clear how to do this. Does anyone have a complete, working example?

    I added CMediaEngine and CMediaContainer to my project, as per the instructions here. These compile without any errors.

    I then incorporated the following in my code:

    Code:
        QWidget *videoWidget = new QWidget(this);
        videoWidget->setFixedSize(240,320);
        _layout->addWidget(videoWidget);
    
        RWindowBase *rWindow = static_cast<RWindowBase*> (videoWidget->winId()->DrawableWindow());
        const TRect rect(TPoint(0, 0), TSize(videoWidget->width(), videoWidget->height() / 2));
        CMediaEngine *d_ptr = new CMediaEngine::NewL(CMediaContainer::NewL(rect));
        d_ptr->player = CVideoPlayerUtility::NewL(*d_ptr, EMdaPriorityNormal,
            EMdaPriorityPreferenceNone, CCoeEnv::Static()->WsSession(),
            *(CCoeEnv::Static()->ScreenDevice()), *rWindow, rect, rect);
    This builds without errors, except that I get an 'undefined identifier' error with d_ptr->player. What is player? I can't find it in MVideoLoadingObserver.

    I'm not sure that d_ptr should be a CMediaEngine object, or that I've initalized it correctly -- but from what I understand, 'd_ptr is an object of class derived from MVideoPlayerUtilityObserver'.

  8. #8
    Registered User
    Join Date
    Jul 2009
    Posts
    16

    Re: Playing video in QT

    Hi Sam,

    You might be interested to know that a Symbian implementation of the Phonon API, written using MMF client APIs such as CVideoPlayerUtility, is now available as part of the Qt 4.6.0 beta 1 release.

    At present, it still lacks a few features (notably support for streaming media playback, provision of metadata to the client, and some video-related parameters such as aspect ratio and scaling mode). We are working on these, and plan to have them in place for the 4.6.0 release.

    If you want to keep up to date with development of the MMF Phonon backend, you can use the following resources:

    You can also download daily snapshots (source, binaries and SIS files) of the complete Qt package from here.

    Best regards,
    Gareth
    Last edited by gareth_stockwell; 2009-11-02 at 12:28.

  9. #9
    Registered User
    Join Date
    Jul 2009
    Posts
    16

    Re: Playing video in QT

    Here is a quick update of the features which have been added to the Phonon backend in each release of Qt for Symbian:
    (Of course each release also has various bug fixes - full details are available in the database from http://bugreports.qt.nokia.com by searching for 'mmfphonon' as the component name).

    4.6.0
    • Audio and video playback from files, including metadata support


    4.6.1
    • Support for streaming playback
    • Playlist handling
    • Aspect ratio / scale mode handling
    • Fixed problems with video playback on some S60 3.2 devices


    4.6.2 (scheduled for release in week 7)
    • Enabled audio effects, if supported by the device


    Best regards,
    Gareth

Posting Permissions

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