<p>I would like to know that can I get the "end of stream" event (or a signal?) without using the mainloop?</p>
<div>I used:</div>
<div> gst_bus_add_watch (bus, my_bus_callback, NULL);</div>
<div> to add a watch to catch the "end of stream" signal. But it seems my_bus_callback not been called at all.</div>
<div>Maybe because I did not use </div>
<div> g_main_loop_run (loop);<br> because I have something else to do with my program.</div>
<div> </div>
<div>What should I do?</div>
<div>Should I create a thread and run g_main_loop_run (loop) or </div>
<div>this loop is not needed ?<br></div>