Using identity causes memory leak (Ported application from gstreamer-0.10 to gstreamer-1.0)
tiko
tkorthals at cit-ec.uni-bielefeld.de
Thu Sep 8 11:01:05 UTC 2016
Dear devs,
we want to setup a tracking application artoolkit5
<https://github.com/artoolkit/artoolkit5> for our students project.
Since we are using gstreamer-1.0, my first intention was to port the
application from gstreamer-0.10 to gstreamer-1.0 ( patch
<https://github.com/artoolkit/artoolkit5/pull/182> ).
It compiles, it runs, but I experience two different odd behaviours:
1. For the test application
<https://github.com/artoolkit/artoolkit5/blob/master/util/check_id/check_id.c>
:
$ ./check_id --vconf 'v4l2src device="/dev/video0" ! videoconvert !
video/x-raw,format=RGB,width=640,height=480,framerate=30/1 ! identity
name=artoolkit sync=true ! fakesink'
I get a SegFault when calling:
arVideoCapStart( void ) in /lib/SRC/Video/video.c
<https://github.com/artoolkit/artoolkit5/blob/master/lib/SRC/Video/video.c>
which calls
ar2VideoCapStart(AR2VideoParamT *vid) in /lib/SRC/Video/video2.c
<https://github.com/artoolkit/artoolkit5/blob/master/lib/SRC/Video/video2.c>
which calls ar2VideoCapStartGStreamer( AR2VideoParamGStreamerT *vid ) in
/lib/SRC/VideoGStreame/videoGStreamer.c
<https://github.com/artoolkit/artoolkit5/blob/master/lib/SRC/VideoGStreamer/videoGStreamer.c>
which calls
gst_element_set_state (vid->pipeline, GST_STATE_PLAYING)
2. For the test application:
./check_id --vconf 'v4l2src device="/dev/video0" ! videoconvert !
video/x-raw,format=RGB,width=640,height=480,framerate=30/1 ! videoconvert !
video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! identity
name=artoolkit sync=true ! fakesink'
It runs without segfault, but the memory of the received image is not freed
so the program runs out of heap after a while.
3. For test application compiled with gstreamer-0.10:
./check_id --vconf 'v4l2src device="/dev/video0" ! ffmpegcolorspace !
video/x-raw-rgb,width=640,height=480,framerate=30/1 ! identity
name=artoolkit sync=true ! fakesink'
This works like a charm.
The point is, we dont want to use the depricated 0.10.
Our current Setup is as follows:
Kubuntu 14.04.5
Gstreamer-1.0 Version 1.8.3 with all plugins (Have also tested it with the
stock version 1.2.4 from the Ubuntu repositories with the same error)
I think the porting from 0.10 to 1.0 went wrong, but I cannot find the
misstake in the code.
Would be nice if someone can give me a pointer, since I am working with
gstreamer for my first time.
Gretings,
Timo
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Using-identity-causes-memory-leak-Ported-application-from-gstreamer-0-10-to-gstreamer-1-0-tp4679488.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list