Hi,
When executing (in a command prompt) a gst-launch-ed pipeline that is capturing a live feed, what's the best way to stop it other than ctrl-C? I want to close it automatically,without the use of the keyboard...
Any suggestions??
HI,
Through coding you can use this instruction to make the pipeline to NULL state.
gst_element_set_state (pipeline, GST_STATE_NULL);
Thanks & Regards,
RayBiztech.
Hi,
I tried to find the process id and kill the process, but i think thats not the correct way...
Can anyone suggest me an alternate/correct way of stopping livestreaming using gst-launch????
agree with Leo, the gstreamer pipeline can be put to play or stop status by code setting, otherwise it has to get the events to do related things
The best way is to send the pipeline to NULL state in case you launching the pipeline inside a C program. From the shell, You can send a SIGINT signal with the command kill, check the man info.
Leo
Hi,
The below grep and awk command does the work for me.
system("ps | grep gst | awk '{print $1}' | xargs kill -2 $1");
Is it fine or is there a better option??
Your opinion plz..
if it works on the shell, then it should work using the system call 'system'. Just remember that looking at gst process with ps, it with also pick the grep command, so I dont think those pipes will work all the time.
Leo