appsrc- seekable?

leon dudi.reuveni at
Wed Apr 9 01:01:22 PDT 2014

Im using appsrc in my code (visual studio) and I have two pipelines-
transmitter and receiver. 
the transmitter loads file with RTP stream, push the RTP packet into udpsink
with appsrc and udpsink transmit it. 
the transmission works great and I can see the video on the receiver.

my goal is to make fast forward on the receiver side and see the video- fast
forwarded, on the receiver side. 

this is the important parts of the code:

*transmitter pipeline:*

      app->src = (GstAppSrc*)gst_element_factory_make("appsrc", "mysrc");
      app->sink = gst_element_factory_make ("udpsink", "sink");

      gst_util_set_object_arg (G_OBJECT (app->src), "stream-type",

*signal connect:*

     g_signal_connect(app->src, "need-data", G_CALLBACK(start_feed), app);
     g_signal_connect(app->src, "enough-data", G_CALLBACK(stop_feed), app);
     g_signal_connect(app->src, "seek-data", G_CALLBACK (seek_data), app);

*create and send seek event:*

     gst_element_query_position ( app->pipeline1, app->format ,
     app->seek_event = gst_event_new_seek (app->rate, GST_FORMAT_BYTES,
		GST_SEEK_TYPE_SET, app->position , GST_SEEK_TYPE_SET, -1)
     gst_element_send_event ((GstElement *)app->pipeline1, app->seek_event)

the format is set to BYTES (with TIME I get "Unable to retrieve current
position") because the source is a file with RTP packets.

when I send the seek event, nothing happen. and I don't get error from the

my question is if appsrc supports seeking with file and how does it works?
it is a bit confusing because the "need-data" signal is called every time
the buffer can get more data. 
so is the seek event makes the "push buffer" work faster?
what is the connection between the "need-data" and seek event?

where should I implement the seek event?

I will be happy for clarifications and to know what am I doing wrong here.

thanks a lot,

View this message in context:
Sent from the GStreamer-devel mailing list archive at

More information about the gstreamer-devel mailing list