Stack memory issue with gstreamer
jb.vu.lai at gmail.com
Wed Apr 30 14:07:47 PDT 2014
I have a memory issue concerning an QT embedded app that is running
gstreamer. I have a simple audio pipeline that plays multiple wav files one
after the other. I am doing so by detecting the EOS signal on the bus and
during this callback, I change my file source and start the playback on the
next file. Once all files have been played, the entire list is looped again.
(code is annexed at the end) All of this, using the same pipeline.
After awhile, the application loses responsiveness and eventually crashes.
I've noticed that while gstreamer is playing, the stack memory increases
steadily as if a certain portion of the stack is never freed. (see attached
Valgrind Massif reports) This is usually a symptom of deep recursion.
After playing with different ways of running gstreamer (different ways of
looping, reducing calls to the api), i've noticed that how fast the stack
memory fills is directly proportional to the number of gst_element_set_state
calls. But even if i call it once... or just set the pipeline state to NULL
in a loop or with QT support for g_loop, the symptoms are the same.
All files are relatively small (< 15s and audio/x-raw-int, signed=false,
width=8, depth=8, rate=8000, channels=1) and this issue has been observed
with both Gstreamer 0.10 and 1.0.
My colleagues and I have on this for quite some time and would really need
help on this.
Here is my bus callback function :
int AudioVoiceService::playbus_callback(GstBus *bus, GstMessage *msg,
PlaybackStream* ps = (PlaybackStream*) data;
//Next file source index + Detect end of playlist
if (++(ps->currentSourceIndex) >= ps->filesources.size())
ps->currentSourceIndex = 0;
//Stop playback loop if repeat not enabled
ps->isPlaybackPlaying = false;
if (gst_element_get_state(ps->pipeline, NULL, NULL,
GST_CLOCK_TIME_NONE) == GST_STATE_CHANGE_SUCCESS); //check if state change
//Change file source
//Play new file
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Stack-memory-issue-with-gstreamer-tp4666681.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel