Results 1 to 20 of 22

Thread: QuickTime API

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default QuickTime API

    Hi all

    http://doc.trolltech.com/qq/qq20-hiviews.html

    I had used the above API of QuickTime to display movies , but the problem is
    that i am having a list of files in QTreeWidget , on double click on an item , I am saving the file and then calling this API , the file Plays , but sometimes after playing some files, when i click on another file to play ,the balnk screen displays but the movie widget and controllers are not visible on the screen, I dont know why it is happening.

    Regards
    Merry
    Always Believe in Urself
    Merry

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QuickTime API

    So, what do you expect us to do without giving a single line of code?
    J-P Nurmi

  3. #3
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: QuickTime API

    I had given the link , In this link Full Source code is available for displaying movies (himovieview), I used same code , but the difference is this much only that in this , file is selected using QFileDialog and I am selecting file using QTreeWidget, that is I am having a QTreeWidget , in which there is a list of files, and on double click on the file , the player is being visible and load the file.

    Regards
    Merry
    Always Believe in Urself
    Merry

  4. #4
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: QuickTime API

    Hi all

    I think there is a problem of Memory Leakage in the QuickTime Player API. (http://doc.trolltech.com/qq/qq20-hiviews.html).
    Source code is available in the above link
    Can anybody tells me How to handle the problem of Memory leakage in this API.

    Regards
    Merry
    Always Believe in Urself
    Merry

  5. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QuickTime API

    Quote Originally Posted by merry View Post
    I had given the link , In this link Full Source code is available for displaying movies (himovieview), I used same code , but the difference is this much only that in this , file is selected using QFileDialog and I am selecting file using QTreeWidget, that is I am having a QTreeWidget , in which there is a list of files, and on double click on the file , the player is being visible and load the file.
    So, are you able to reproduce the problem with the example code? If not, most likely the problem is in your code.

    Quote Originally Posted by merry View Post
    I think there is a problem of Memory Leakage in the QuickTime Player API. (http://doc.trolltech.com/qq/qq20-hiviews.html).
    Source code is available in the above link
    Can anybody tells me How to handle the problem of Memory leakage in this API.
    What actions did you take to verify that there is a memory leak? Also, I suppose you mean that the sample application has a memory leak.
    J-P Nurmi

  6. #6
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: QuickTime API

    Thanks for the reply.

    I saw it through the "ActivityMonitor"

    Actually what i am exactly doing is this when the user double click on the file in the QTreeWidget, the file get saved and after saving the file , a signal is emitted for loading the movie in the MovieWidget, and when the movie is loaded , i 'll delete that saved file,

    Through the activity monitor i saw , Till then free memory is available the files are loaded in the movie widget and when free space available is less than the file size then the widget appears but with no controllers , that is only a blank screen appears.

    Then i thought its a Memory Leakage problem at the time of movie load.

    Regards
    Merry
    Always Believe in Urself
    Merry

  7. #7
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: QuickTime API

    Hi all

    I got the problem where the memory leaks.

    On Every double click on the QTreeWidgetItem, When I call the QuickTimeMovie Player,then every time I' ll make the new Player, due to which there is lots of memory leakage.

    Qt Code:
    1. Window *movieWindow = new Window(0);
    2. connect(this,SIGNAL(movieChosen(QString)),movieWindow,SLOT(OpenMovie(QString))),
    3. movieWindow->show();
    To copy to clipboard, switch view to plain text mode 

    Is there any other way , that on doubleClick on the QTreeWidgetItem, I dont have to make the new Player.

    If i make it member variable, then it crashes. what to do?


    Regards
    Merry
    Always Believe in Urself
    Merry

  8. #8
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QuickTime API

    Quote Originally Posted by merry View Post
    I got the problem where the memory leaks.

    On Every double click on the QTreeWidgetItem, When I call the QuickTimeMovie Player,then every time I' ll make the new Player, due to which there is lots of memory leakage.
    You allocate QObjects without parent and never delete them? Yes, that's a memory leak.

    Is there any other way , that on doubleClick on the QTreeWidgetItem, I dont have to make the new Player.

    If i make it member variable, then it crashes. what to do?
    My wild guess is that even if you declare a member variable you assign to a local variable.
    J-P Nurmi

  9. #9
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: QuickTime API

    Thanks 4 the reply

    You allocate QObjects without parent and never delete them? Yes, that's a memory leak.
    How can I stop this memory leak.

    My wild guess is that even if you declare a member variable you assign to a local variable.
    I declare it as a Global Variable.
    Always Believe in Urself
    Merry

  10. #10
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QuickTime API

    Quote Originally Posted by merry View Post
    How can I stop this memory leak.
    Re-use same component or deallocate the previous one before allocating a new one.

    I declare it as a Global Variable.
    I'd advise not to do that. Using global variables tend to lead to unreadable and unmaintainable error-prone code.
    J-P Nurmi

  11. #11
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: QuickTime API

    Hi

    Re-use same component or deallocate the previous one before allocating a new one.
    I am reusing the same component, but when i make it close, it crashes.

    connect(btn_close, SIGNAL(clicked()), this, SLOT(close()));
    and if I not close it using the above statement and close it using the close from the upper left corner , then it works fine,

    What is the difference between the two close.

    I had used the QPushButton to close ,To set the widget Modal.

    Regards
    Merry
    Always Believe in Urself
    Merry

Similar Threads

  1. [MAC] Quicktime Widget
    By dlpnet in forum Qt Programming
    Replies: 3
    Last Post: 29th January 2008, 11:30
  2. Replies: 7
    Last Post: 28th January 2007, 11:07

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.