Results 1 to 2 of 2

Thread: Memory leak after deletion of a GStreamer element on embedded linux board

  1. #1
    Join Date
    Nov 2012
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Question Memory leak after deletion of a GStreamer element on embedded linux board

    I am trying to implement a video Player on an Embedded Linux Boaed (OFSP7 ultratronik.de) using The Ångström Distribution and Embedded Qt 4.7
    In my code I construct an GstElement within my qt4.7 Application's VideoPlayerWidget (the player does not have an own mainloop as it is part of my Qt App), feed the video source Name and set the Element to the PLAYING state. This works and the video is visible on screen!

    After that, I would like to delete the player in setting the State to NULL and using the "unref" mechanism to free all the allocated memory. The problem is, that NOT all of the memory gets freed, what ends up in slowly filling up my memory till the board crashes...

    Does anyone have a clue how to delete the player properly...

    Qt Code:
    1. // construction of a GstElement to play a video
    2. gst_init(NULL, NULL);
    3. GstElement *pipeline = gst_element_factory_make("playbin", "player");
    4. g_object_set(G_OBJECT(pipeline), "uri", uri, NULL);
    5. gst_element_set_state(GST_ELEMENT(pipeline), GST_STATE_PLAYING);
    6. ...
    7. ...
    8. // delete player and free memory
    9. gst_element_set_state(GST_ELEMENT(pipeline), GST_STATE_NULL);
    10. gst_object_unref(GST_OBJECT(pipeline));
    11. ...
    To copy to clipboard, switch view to plain text mode 
    Last edited by qtsmartcoder; 27th November 2012 at 22:21.

  2. #2
    Join Date
    Sep 2012
    Location
    Bydgoszcz, Poland
    Posts
    2
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Memory leak after deletion of a GStreamer element on embedded linux board

    It looks like memory leak in some GstElement, you can try Valgrind to locate:

    http://www.developer.nokia.com/Commu...ith_Qt_Creator

    and

    http://wiki.buzztard.org/index.php/Debugging#Valgrind

    or try to use the latest version of Gstreamer

Similar Threads

  1. Replies: 2
    Last Post: 7th December 2012, 03:29
  2. qt embedded + dfbvideosink (gstreamer)
    By minona in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 10th April 2011, 02:42
  3. 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, 14:57
  4. run qt-embedded demos error on arm board
    By ghye in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 2nd December 2009, 15:20
  5. Installing qt-embedded 4.x version on ARM board
    By sivaram_ch in forum Installation and Deployment
    Replies: 0
    Last Post: 29th August 2008, 07:59

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.