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
This commit is contained in:
Ronald S. Bultje 2003-08-04 21:48:06 +00:00
parent f7c37a4384
commit e2a9a87c64
2 changed files with 22 additions and 0 deletions

View file

@ -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

View file

@ -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);