Commit e2a9a87c authored by Ronald S. Bultje's avatar Ronald S. Bultje

Implement simple seek API. This can later be extended to work with GstPipeline...

Implement simple seek API. This can later be extended to work with GstPipeline as arguments and so on *autodetect pro...

Original commit message from CVS:
Implement simple seek API. This can later be extended to work with GstPipeline as arguments and so on *autodetect proper element to send event to and so on), but this'll do as a start... See #116149
parent f7c37a43
......@@ -1900,6 +1900,26 @@ gst_element_send_event (GstElement *element, GstEvent *event)
return FALSE;
}
/**
* gst_element_seek:
* @element: a #GstElement to send the event to.
* @seek_type: the method to use for seeking.
* @offset: the offset to seek to.
*
* Sends a seek event to an element.
*
* Returns: TRUE if the event was handled.
*/
gboolean
gst_element_seek (GstElement *element,
GstSeekType seek_type,
guint64 offset)
{
GstEvent *event = gst_event_new_seek (seek_type, offset);
return gst_element_send_event (element, event);
}
/**
* gst_element_get_query_types:
* @element: a #GstElement to query
......
......@@ -315,6 +315,8 @@ void gst_element_unlink_pads (GstElement *src, const gchar *srcpadname,
const GstEventMask* gst_element_get_event_masks (GstElement *element);
gboolean gst_element_send_event (GstElement *element, GstEvent *event);
gboolean gst_element_seek (GstElement *element, GstSeekType seek_type,
guint64 offset);
const GstQueryType* gst_element_get_query_types (GstElement *element);
gboolean gst_element_query (GstElement *element, GstQueryType type,
GstFormat *format, gint64 *value);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment