<div dir="ltr">Hi expert:<div>  I have a short gst pipeline (appsrc-->videodecode-->videosink), and want to control the playback pace by an external clock.  in my simple example, I created a customized GstAudioClock basing on system time. it works for normal playback.</div><div>GstAudioClock *myGstClock = GST_AUDIO_CLOCK(gst_audio_clock_new("MyClock", (GstAudioClockGetTimeFunc)getMyClockTime, NULL/* user   data */, NULL/*GDestroyNotify destroy_notify*/));</div><div>getMyClockTime() reports played time comparable with video frame timestamp. code piece see below.<br></div><div><br></div><div>  but, I met issue after seek. <br></div><div>  after seek, I simply update g_anchorTime to the seek_time (0 in my sample code); thus getMyClockTime always returns currTime comparable with timestamp of video frame.</div><div>   however video frames are dropped before seek_time. because gst_clock_get_time() always returns monotonically increasing time(not currTime as I expect).</div><div>   I tried to call gst_audio_clock_reset(myGstClock, 0), it doesn't help.</div><div>   </div><div>static uint64_t g_anchorTime = -1;<br>int64_t getTimeNs()<br>{<br>    struct timespec t;<br>    clock_gettime(CLOCK_MONOTONIC, &t);<br>    int64_t currTime = t.tv_sec;<br>    currTime = currTime * 1000*1000*1000LL + t.tv_nsec;<br><br>    return currTime;<br>}<br>GstClockTime getMyClockTime(GstClock * clock, gpointer user_data)<br>{<br>    static int dbgCount = 0;<br><br>    int64_t currTime = getTimeNs();<br>    currTime = currTime-g_anchorTime;<br>    DEBUG("dbgCount: %d, %" PRId64 ", %.3f", dbgCount++, currTime, currTime/1000/1000/1000.0);<br><br>    return currTime;<br><div>}</div><div><br></div>complete sample code see attachment seek.c</div><div><br></div></div>