<div dir="ltr"><div><div><div><div><div><div><div><div>Hello!<br></div>I am developing an audio player, and faced one issue:<br><br></div>I have cue sheet file with single audio file (an album).<br></div>So I want to play a regions of this media file which are separated tracks.<br></div>I am parsing cue sheet and getting start and end position of each track, then when user starts playing I am seeking to the start and end position of each track, like this:<br><br>gst_element_seek<span style="color:rgb(238,232,213)"> </span><span style="color:rgb(101,123,131)">(</span><span style="color:rgb(38,139,210)">_pipeline</span><span style="color:rgb(101,123,131)">,</span><span style="color:rgb(238,232,213)"> </span><span style="color:rgb(42,161,152)">1.0</span><span style="color:rgb(101,123,131)">,</span><span style="color:rgb(238,232,213)"> </span>GST_FORMAT_TIME<span style="color:rgb(101,123,131)">,</span><span style="color:rgb(238,232,213)"> </span>GST_SEEK_FLAG_FLUSH<span style="color:rgb(101,123,131)">,</span>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(238,232,213)">                                   </span>GST_SEEK_TYPE_SET<span style="color:rgb(101,123,131)">,</span><span style="color:rgb(238,232,213)"> </span>gint64<span style="color:rgb(101,123,131)">(</span><span style="color:rgb(38,139,210)">_currentStartPosition</span><span style="color:rgb(101,123,131)">)</span><span style="color:rgb(238,232,213)"> </span><span style="color:rgb(101,123,131)">*</span><span style="color:rgb(238,232,213)"> </span>MillisecondsConvertion<span style="color:rgb(101,123,131)">,</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(238,232,213)">                                   </span>GST_SEEK_TYPE_SET<span style="color:rgb(101,123,131)">,</span><span style="color:rgb(238,232,213)"> </span>gint64<span style="color:rgb(101,123,131)">(</span><span style="color:rgb(38,139,210)">_currentEndPosition</span><span style="color:rgb(101,123,131)">)</span><span style="color:rgb(238,232,213)"> </span><span style="color:rgb(101,123,131)">*</span><span style="color:rgb(238,232,213)"> </span>MillisecondsConvertion<span style="color:rgb(101,123,131)">);</span></pre><br></div><div>I am getting notification about new track (stream) starts by GST_MESSAGE_STREAM_START to update current selected/playing track in playlist or switch to a new track.<br><br></div>And it is playing ok, but I want to do gapless  transition between tracks which are localted in sequence in same file.<br><br></div>When each track is separated track I am doing gapless playing between them via "<span style="color:rgb(42,161,152)">about-to-finish" </span>pipeline signal and updating an uri of <span style="color:rgb(42,161,152)">playbin, </span>but how to do the same thing if each track is a part of one single file?<br><br></div><span style="color:rgb(42,161,152)"></span>Mainly I need somehow just to set the stream end position to get GST_MESSAGE_STREAM_START without actual reseeking. Or maybe you know another way to get notified when track ends without using gst_element_seek<span style="color:rgb(238,232,213)"></span>? Maybe just to do a timer and query current position each 1ms to check what (end position - current position) is < 1ms?<br><br></div>Thanks!<br></div>