Hi,
We are using gst-launch in our application to stream the CSI over Display whenever it detects Signal and Stop the Streamer when there is no signal..
Thus, i was testing gst-launch functionality with the following simple code:
void MainLoop()
{
char command[256];
int ret = 0;
int loopCount = 0;
while(1)
{
memset(command, '\0', sizeof(command));
sprintf(command, "/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &");
ret = system(command);
printf("StartStreamer: command=[%s], status:%d\n", command, ret);
sleep(15);
memset(command, '\0', sizeof(command));
sprintf(command, "killall gst-launch-1.0");
ret = system(command);
printf("StopStreamer: command=[%s], status = %d\n", command, ret);
sleep(15);
loopCount++;
printf("Loop Count:%d\n", loopCount);
fflush(stdout);
}
}
After running a loop count of about 2400+ it failed with segmentation Fault, in the next restart of the utility, it crashed at 551 Loop Count and then at 1300+ Loop Count..
Following is the Log at the stdout before segmentation Fault:
Loop Count:551
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:0
StopStreamer: command=[killall gst-launch-1.0], status = 4
Loop Count:276828289
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828290
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828291
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828292
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828293
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828294
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828295
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828296
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828297
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828298
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828299
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828300
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828301
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
[1]+ Segmentation fault ./startStop
I believe it is due to some memory corruption .. How can we resolve this issue...
Thanks for your reply.. What is the difference between those versions..
difference is described on
trac.gateworks.com/wiki/Yocto/gstreamer
Hi Jamal
you are using gstreamer-imx version, there are also nxp imx-gst1.0-plugins,
for details please refer to: trac.gateworks.com/wiki/Yocto/gstreamer
Alternatively one can try nxp imx-gst1.0-plugins, described in nxp linux documentation:
i.MX 6 / i.MX 7 Series Software and Development Tool|NXP
as for gstreamer-imx, issue can be posted on meta-fsl-arm mailing list, so that someone
familiar with it could try to assist you.
https://lists.yoctoproject.org/listinfo/meta-freescale
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------