[Closed] How to Play Video....



  • 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........



  • 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



  • 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.....



  • Please wrap the code at your post using @

    Which version of Qt Mobility are you using?



  • using Qt Mobility 1.2


  • Moderators

    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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.