Appsrc Seek not working

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Appsrc Seek not working

diegoavila
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/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel