Results 1 to 5 of 5

Thread: Playing multiple media files using QT Gstreamer

  1. #1
    Join Date
    Feb 2014
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Playing multiple media files using QT Gstreamer

    Hi

    My application plays multiple media files using Qt Gstreamer one after one in loop. When it reaches end of stream, I am setting the state to StateNull and then playing the next media. It is not releasing the resources allocated for the previous media and allocates again for playing the next file. What should I do to release the resources. Please suggest.

    Thanks in advance.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Playing multiple media files using QT Gstreamer

    How have you determined that "it" is not returning resources?

  3. #3
    Join Date
    Feb 2014
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Playing multiple media files using QT Gstreamer

    Because there is a huge memory leak. And if i set the state to ready instead of null, there is no leak but after playing for 1-2 hours the video starts freezing.

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Playing multiple media files using QT Gstreamer

    We have no idea what your code looks like, so we have no idea what "if i set the state to ready instead of null" might apply to or why that might change the behaviour. Other than statements like, "Make sure you free memory you allocate with new," there is not much to say.

    What platform you are running on? We might guess Linux.
    What input you are feeding the player?
    What you have tried to find the leak? Have you run your program using valgrind?
    What versions of Qt, GStreamer, compiler etc.
    Does the example player show the same 'leak'?
    Is it the problem related to certain media?
    Can you produce a minimal, compilable program that demonstrates the 'leak'?

  5. #5
    Join Date
    Feb 2014
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Playing multiple media files using QT Gstreamer

    -> I am playing .flv & .webm media files of 5-10 sec.

    -> I have used valgrind to find the leak, Valgrind result :
    ==13891== LEAK SUMMARY:
    ==13891== definitely lost: 53,843 bytes in 12 blocks
    ==13891== indirectly lost: 11,328 bytes in 352 blocks
    ==13891== possibly lost: 4,270,855 bytes in 9,201 blocks
    ==13891== still reachable: 7,705,096 bytes in 22,239 blocks
    ==13891== suppressed: 0 bytes in 0 blocks
    ==13891== Reachable blocks (those to which a pointer was found) are not shown.
    ==13891== To see them, rerun with: --leak-check=full --show-reachable=yes
    ==13891==
    ==13891== For counts of detected and suppressed errors, rerun with: -v
    ==13891== ERROR SUMMARY: 2834 errors from 2818 contexts (suppressed: 2 from 2)

    -> I am using Qt Gstreamer0.10 version & ubuntu-12.04

    -> the example player plays only one media but i am playing continuously, so found the leak

    If anybody has an example program that plays more than one media file then please me help on this.

Similar Threads

  1. Phonon and GStreamer (avi and flv files)
    By pssss in forum Newbie
    Replies: 0
    Last Post: 22nd January 2011, 16:07
  2. Playing multiple audio files with Phonon
    By MartinWalter in forum Qt Programming
    Replies: 0
    Last Post: 23rd December 2010, 11:19
  3. Playing .avi media file on QT Form
    By nmkarvekar in forum Newbie
    Replies: 3
    Last Post: 7th January 2010, 11:02
  4. Performance problems playing video with Phonon and GStreamer on QT Embedded.
    By MarcosRodriguez in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 3rd December 2009, 13:57
  5. Playing Media files in Qt 4
    By sar_van81 in forum Qt Programming
    Replies: 2
    Last Post: 18th December 2007, 05:53

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.