<div dir="ltr"><div>Hi all,</div><div><br></div><div>I have a gstreamer pipeline that I initialize on thread #1 like so:</div><div><br></div><div>gst_init (0, NULL);</div><div><br></div><div>string pipeline = "v4l2src device=/dev/video1 ! video/x-raw, width=1920, height=1080, framerate=15/1 ! vpuenc_h264 ! tee name=v ! queue ! h264parse ! appsink name=h264vid max-buffers=1 drop=true v. ! queue ! h264parse ! splitmuxsink name=filesink location=./videos/video%02d.mkv max-size-time=10000000000 muxer-properties=\"properties,streamable=true\"";</div><div><br></div><div>gstreamer_main_video_pipeline = gst_parse_launch(pipeline.c_str(),NULL); <br>gst_element_set_state (gstreamer_main_video_pipeline, GST_STATE_PLAYING);</div><div><br></div><div><br></div><div><br></div><div>On  a second thread I am trying to run an rtsp server. I was able to get the RTSP server working from media_configure to run the exact pipeline as above.</div><div><br></div><div>If I initialize the pipeline in the local method: media_configure it works, but if I pass the pointer to the pipeline from the other thread it doesn't work.</div><div><br></div><div>for example this works:</div><div><br></div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:"Droid Sans Mono","monospace",monospace,"Droid Sans Fallback";font-weight:normal;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(106,153,85)">ctx->generator_pipe = gst_parse_launch(pipeline.c_str(),NULL);</span></div></div></div><div><br></div><div>this doesn't work:</div><div><br></div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:"Droid Sans Mono","monospace",monospace,"Droid Sans Fallback";font-weight:normal;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(156,220,254)">ctx</span><span style="color:rgb(212,212,212)">-></span><span style="color:rgb(156,220,254)">generator_pipe</span><span style="color:rgb(212,212,212)"> = </span><span style="color:rgb(220,220,170)">get_gstreamer_pipeline</span><span style="color:rgb(212,212,212)">();  </span></div></div></div><div><br></div><div>I know that the pipeline is playing because I can see the files being outputted but I can't see the VLC client video if I pass the pointer from the other thread. If I call gst_parse_launch on the same thread then it works.<br></div><div><br></div><div>Is there a way to share a pipeline between two threads ?<br></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px">Sincerely,</span><div><br></div><div>Dwight Kulkarni                </div><br></div></div></div></div></div></div></div>