Reputation: 618
I am using appsrc as source for my gstreamer pipeline. I have connected the "seek-data" signal to a callback function and have done everything as mentioned in the following example code : http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/tests/examples/app/appsrc-seekable.c
However, I am not sure how do I signal seek from my code. g_signal_emit_by_name seems to be the way of doing this but its not working for me.
Please let me know if anyone knows how to make it work.
Upvotes: 3
Views: 2207
Reputation: 1143
When an appsrc is of type GST_APP_STREAM_TYPE_SEEKABLE
, and the emit-signals property on the appsrc is true
, the seek-event signal will be sent when a normal seek event reaches the appsrc. After connecting your callback function (seek_data in the link you provided), you can seek by calling the normal gst_element_seek(pipeline, ...) function.
See
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-eventsseek.html (seeking)
and
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsrc.html (appsrc)
Upvotes: 2