×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    16

    QMediaPlayer is playing only the first time I open the application and not for furthe

    I 'm trying to solve the following problem long time ago, but in vain. Here you are what happens:
    I 'm working on an app that displays a video using QMediaPlayer, QVideoWidget and QMediaPlaylist. The media player plays videos stored at the directory "." and videos format is 3gp.
    one or more videos are added to the playlist and I set the playback mode to QMediaPlaylist::Loop to loop over these videos infinitely.
    After I reboot the system, the videos run properly with no problems, but as I close the application and runs it again, the videos do not run!!! and any further launches of the application do not play the videos.

    Remark that as I install the application on the C drive of the Nokia N8, it works OK, but as I install it on the mass storage E drive the problem occurs.

    Is this a problem with the media player deallocation or the media object deallocation although I do deallocate the object in the destructor of the parent class (delete videoPlayer).

    am I missing something or the QMediaPlayer class is buggy such that it runs the video sometimes and sometimes not???!!!

    I 'm using Qt 4.6.3 on windows 7.
    Last edited by ghanemabdo; 2011-01-13 at 16:19.

  2. #2
    Registered User
    Join Date
    Jan 2011
    Posts
    12

    Re: QMediaPlayer is playing only the first time I open the application and not for fu

    I have the same problem here! did you find any solution?

  3. #3
    Registered User
    Join Date
    Oct 2004
    Posts
    89

    Re: QMediaPlayer is playing only the first time I open the application and not for fu

    Hi

    In the destructor please add:

    player->stop();
    delete videoWidget;
    delete player;

    -halderp

  4. #4
    Registered User
    Join Date
    Nov 2010
    Posts
    16

    Re: QMediaPlayer is playing only the first time I open the application and not for fu

    I already do that, but the problem still exists.

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

    Re: QMediaPlayer is playing only the first time I open the application and not for fu

    If you reboot the phone does it work again?

    Have you tried changing the path from "." to QDir::currentPath()?

Similar Threads

  1. Playing two audio streams at a time
    By MatuX in forum [Archived] Qt Mobility Project
    Replies: 2
    Last Post: 2010-09-30, 11:49
  2. Video Recording and Playing at the same time
    By raul.cicero in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2007-04-12, 16:23
  3. Playing a tone and a sound at the same time?
    By danparks in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2005-09-21, 03:34

Posting Permissions

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