<div dir="ltr">I have a need to put multiple video windows in a single application. This means multiple pipelines. For example, the RTSP URL is different for each player, and so I get a new pipeline for each invocation of gst_parse_launch. <br><br>I can share code, but in general: what is the best way to do this? The way I'm doing this now (for EACH player I've instantiated in the SAME app): <div><br></div><div>1) gst_parse_launch, get back the pipeline, <br>2) gst_pipeline_get_bus, to create a bus on this pipeline.</div><div>3) g_main_loop_new(NULL, FALSE) to create a new loop (this is where my main question is at)</div><div>4) gst_bus_add_watch to create an add watch on this pipeline, <br>5) gst_element_set_state to set my pipeline state to GST_STATE_PLAYING</div><div>6) g_main_loop_run on the loop returned from #3</div><div>7) Then I play until a stop is issued....</div><div>8) gst_element_set_state(pipeline, GST_STATE_NULL)</div><div>9) unref the bus, <br>10) unref the pipeline<br>11) unref the loop<br><br>I ask about this order, and the fact I'm creating a new loop without an independent context because I'm getting some random crashes in my app hosting multiple players, and it appears to be during tear down. In general, is this pattern acceptable, or have I committed a sin somewhere? </div></div>