appsrc- seekable?

leon dudi.reuveni at comm-it.co.il
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");

      g_object_set(G_OBJECT(app->src),"is-live",TRUE,NULL);
      gst_util_set_object_arg (G_OBJECT (app->src), "stream-type",
"random-access");


*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->position)
     app->seek_event = gst_event_new_seek (app->rate, GST_FORMAT_BYTES,
GST_SEEK_FLAG_FLUSH ,
		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
"_send_event()"

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,
Leon.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/appsrc-seekable-tp4666379.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list