Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [Closed] How to Play Video....
Forum Updated to NodeBB v4.3 + New Features

[Closed] How to Play Video....

Scheduled Pinned Locked Moved Mobile and Embedded
6 Posts 3 Posters 3.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hitesh
    wrote on last edited by
    #1

    hi,

    i am using following code to play video in Symbian device(N95) .
    @
    //
    videoPlayer = new Phonon::VideoPlayer(Phonon::VideoCategory);
    videoPlayer->setFixedSize(QSize(320,240));
    videoPlayer->move(0,0);
    videoPlayer->show();
    connect(videoPlayer, SIGNAL(finished()), videoPlayer, SLOT(deleteLater()));
    media = new Phonon::MediaObject();
    media->setCurrentSource(Phonon::MediaSource(QString("D:\data\abc.3gp")));
    videoPlayer->play(media->currentSource());
    /
    /
    @
    but unable to execute first line i.e

    videoPlayer = new Phonon::VideoPlayer(Phonon::VideoCategory);
    

    is it correct code to play video ?
    how i can play video in Symbian device.
    please show me right way , to play video........

    1 Reply Last reply
    0
    • L Offline
      L Offline
      leon.anavi
      wrote on last edited by
      #2

      Use Qt Mobility's "QMediaPlayer":http://doc.qt.nokia.com/qtmobility/qmediaplayer.html to play a video on Symbian devices as shown "on this example":http://doc.qt.nokia.com/qtmobility/multimedia.html#video

      http://anavi.org/

      1 Reply Last reply
      0
      • H Offline
        H Offline
        hitesh
        wrote on last edited by
        #3

        i have already try this

        i am using following code (1)
        @
        /******************************************************************/
        playlist = new QMediaPlaylist;
        playlist->addMedia(QUrl("http://abc/video/video1.3gp"));
        playlist->addMedia(QUrl("http://abc/video/video2.3gp"));
        playlist->addMedia(QUrl("http://abc/video/video3.3gp"));
        playlist->setCurrentIndex(1);

                     player = new QMediaPlayer;
                     connect(player, SIGNAL(positionChanged(qint64)), this, SLOT(positionChanged(qint64)));
                     connect(player, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)), this, SLOT(mediaStatusChanged(QMediaPlayer::MediaStatus)));
                     connect(player, SIGNAL(error(QMediaPlayer::Error)), this, SLOT(error(QMediaPlayer::Error)));
                     player->setPlaylist(playlist);
         
                     Qm_pQVideoWidget = new QVideoWidget(this);
                     player->setVideoOutput(Qm_pQVideoWidget);
                     Qm_pQVideoWidget->show();
                     player->play();
        /******************************************************************/
        

        @
        then it gives error msg “DirectShowPlayerService::doRender: Unresolved error code 8007000d” and “QMediaPlayer::ResourceError (1)”
        on simulator....

        and if i am using following code (2)
        @
        /********************************************/
        playlist = new QMediaPlaylist;
        QString filepath;
        filepath.clear();
        filepath.append("E:\data/abc.3gp");
        QMediaResource resource(QUrl::fromLocalFile(filepath));
        QMediaContent content(resource);
        playlist->addMedia(content);
        playlist->setCurrentIndex(1);

        player = new QMediaPlayer;
        connect(player, SIGNAL(positionChanged(qint64)), this, SLOT(positionChanged(qint64)));
        connect(player, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)), this, SLOT(mediaStatusChanged(QMediaPlayer::MediaStatus)));
        connect(player, SIGNAL(error(QMediaPlayer::Error)), this, SLOT(error(QMediaPlayer::Error)));
        connect(player, SIGNAL(stateChanged(QMediaPlayer::State)), this, SLOT(stateChanged(QMediaPlayer::State)));
        player->setPlaylist(playlist);
        Qm_pQVideoWidget = new QVideoWidget(this);
        player->setVideoOutput(Qm_pQVideoWidget);
        Qm_pQVideoWidget->show();
        Qm_pQVideoWidget->activateWindow();
        Qm_pQVideoWidget->showFullScreen();
        /********************************************/
        

        @
        when i run this code on simulator only i can listen video,i can’t see video

        and when i run on device video is not playing.
        i.e i can't (see and listen) the video..

        i am working on Qt with window.
        want to play video on Symbian device.

        on simulator Qt version is

        "Simulator Qt for MinGW 4.4 (Qt SDK)"

        and on Symbian device Qt version is

        "Qt 4.6.3 for Symbian^1 (Qt SDK)" .

        plz show me the right way to play Video.....

        1 Reply Last reply
        0
        • L Offline
          L Offline
          leon.anavi
          wrote on last edited by
          #4

          Please wrap the code at your post using @

          Which version of Qt Mobility are you using?

          http://anavi.org/

          1 Reply Last reply
          0
          • H Offline
            H Offline
            hitesh
            wrote on last edited by
            #5

            using Qt Mobility 1.2

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mlong
              wrote on last edited by
              #6

              This topic is already under discussion "here.":http://developer.qt.nokia.com/forums/viewthread/14038/ Please do not open multiple threads on the same questions.

              Software Engineer
              My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved