Appsrc Seek not working

diegoavila diego_javila at hotmail.com
Fri Mar 20 20:19:26 UTC 2020


Hello mates im using  Appsrc+decodebin+ audiosink but i faced a big problem ,
I want to make a seek to a especific time , but i dont understand why its
failing... this is my function and works
void :seek_to_time(GstElement *pipeline, gint64 time_nanoseconds)
{
	g_print ("seek_to_time!\n");
	if (!gst_element_seek (m_appSrc, 1.0, GST_FORMAT_BYTES,
GST_SEEK_FLAG_FLUSH,
                         GST_SEEK_TYPE_SET, 827392,
                         GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE)) {
    g_print ("Seek failed!\n");
  }
  GetCurrentPosition();
}
 but when i try using seconds instead of bytes doens work, always fails
void :seek_to_time(GstElement *pipeline, gint64 time_nanoseconds)
{
	g_print ("seek_to_time!\n");
	if (!gst_element_seek (m_appSrc, 1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,
                         GST_SEEK_TYPE_SET, time_nanoseconds* GST_SECOND,
                         GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE)) {
    g_print ("Seek failed!\n");
  }
  GetCurrentPosition();
}
Could you help me please !



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list