bool MediaPluginGStreamer010::seek(double time_sec) { bool success = false; if (mDoneInit && mPlaybin) { success = llgst_element_seek(mPlaybin, 1.0F, GST_FORMAT_TIME, GstSeekFlags(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT), GST_SEEK_TYPE_SET, gint64(time_sec*GST_SECOND), GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); } DEBUGMSG("MEDIA SEEK REQUEST to %fsec result was %d", float(time_sec), int(success)); return success; }
/////////////////////////////////////////////////////////////////////////////// // virtual bool LLMediaImplGStreamer:: seek( double time ) { bool success = false; if (mPlaybin) { success = llgst_element_seek(mPlaybin, 1.0F, GST_FORMAT_TIME, GstSeekFlags(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT), GST_SEEK_TYPE_SET, gint64(time*1000000000.0F), GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); } DEBUGMSG("MEDIA SEEK REQUEST to %fsec result was %d", float(time), int(success)); return success; }