<div dir="ltr"><div>Request your help with the following issue. I am not unable to proceed without resolving this issue.<br></div>I feel the issue here is related to multiple queues. I need to stop and start them properly, which I don't know how to handle.<br><br>I am new to gstreamer. Need help in resolving this issue.<br><br>I am writing an app which reads ts streams one after the other and renders both video and audio. <br>Hence I need to change the ts streaming file after receiving EOS from the first ts file in filesrc element.<br>My pipeline looks as below:<br><br>filesrc
 location=B4USO123073012.ts ! tsdemux  name=d ! queue ! h264parse ! 
avdec_h264 ! xvimagesink  d. ! queue ! faad ! autoaudiosink (ofcourse I 
am not using gst-launch, instead writing C program to implement the 
pipeline).<br><br><br>The first file runs fine, after receiving EOS I follwo following steps:<br>1. Set pipeline state to NULL<br>2. Remove filesrc element<br>3. Create new filesrc element<br>4. Set the location in filesrc to new file<br>5. add the new filesrc element to pipeline.<br>6. link filesrc to tsdemux<br>7. change pipeline state to PLAYING<br><br>After this I receive error message "No program activated before EOS" and app terminates.<br>Here is a snippet of my code where location is changed on arrival of EOS.<br><br>case GST_MESSAGE_EOS:<br>                        g_print ("End-Of-Stream reached.\n");<br>                        gst_element_set_state (data->pipeline, GST_STATE_NULL);<br>                        gst_bin_remove(data->pipeline, data->source);<br>                        data->source = gst_element_factory_make ("filesrc", "file-source");<br>                        g_object_set (G_OBJECT (data->source), "location", "B4USO123073012.ts", NULL);<br>                        gst_bin_add(data->pipeline, data->source);<br>                        gst_element_link(data->source, data->demuxer);<br>                        gst_element_set_state (data->pipeline, GST_STATE_PLAYING);<br>                        break;<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 1, 2015 at 4:21 PM, Sujata Gaddemane <span dir="ltr"><<a href="mailto:gsujata@gmail.com" target="_blank">gsujata@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div><div>Hi,<br><br></div>I am new to gstreamer. Need help in resolving this issue.<br><br></div>I am writing an app which reads ts streams one after the other and renders both video and audio. <br></div>Hence I need to change the ts streaming file after receiving EOS from the first ts file in filesrc element.<br></div>My pipeline looks as below:<br><br>filesrc location=B4USO123073012.ts ! tsdemux  name=d ! queue ! h264parse ! avdec_h264 ! xvimagesink  d. ! queue ! faad ! autoaudiosink (ofcourse I am not using gst-launch, instead writing C program to implement the pipeline).<br><br><br></div>The first file runs fine, after receiving EOS I follwo following steps:<br></div>1. Set pipeline state to NULL<br></div>2. Remove filesrc element<br></div>3. Create new filesrc element<br></div>4. Set the location in filesrc to new file<br></div>5. add the new filesrc element to pipeline.<br></div>6. link filesrc to tsdemux<br></div>7. change pipeline state to PLAYING<br><br></div>After this I receive error message "No program activated before EOS" and app terminates.<br></div>Here is a snippet of my code where location is changed on arrival of EOS.<br><br>case GST_MESSAGE_EOS:<br>                        g_print ("End-Of-Stream reached.\n");<br>                        gst_element_set_state (data->pipeline, GST_STATE_NULL);<br>                        gst_bin_remove(data->pipeline, data->source);<br>                        data->source = gst_element_factory_make ("filesrc", "file-source");<br>                        g_object_set (G_OBJECT (data->source), "location", "B4USO123073012.ts", NULL);<br>                        gst_bin_add(data->pipeline, data->source);<br>                        gst_element_link(data->source, data->demuxer);<br>                        gst_element_set_state (data->pipeline, GST_STATE_PLAYING);<br>                        break;<span class="HOEnZb"><font color="#888888"><br><br><div><br clear="all"><div><div><div><div><div><div><div><div><div><div><div><div><div><div><br>-- <br><div><div dir="ltr"><div><br>Regards,<br></div>Sujata<br></div></div>
</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><br>Regards,<br></div>Sujata<br></div></div>
</div>