mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-04 13:32:29 +00:00
API: add gst_element_seek_simple() (#342238).
Original commit message from CVS: * docs/gst/gstreamer-sections.txt: * win32/common/libgstreamer.def: * gst/gstutils.c: (gst_element_seek_simple): * gst/gstutils.h: API: add gst_element_seek_simple() (#342238).
This commit is contained in:
parent
d28f3fe4be
commit
120ba1596b
6 changed files with 51 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2006-05-19 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* docs/gst/gstreamer-sections.txt:
|
||||||
|
* win32/common/libgstreamer.def:
|
||||||
|
* gst/gstutils.c: (gst_element_seek_simple):
|
||||||
|
* gst/gstutils.h:
|
||||||
|
API: add gst_element_seek_simple() (#342238).
|
||||||
|
|
||||||
2006-05-18 Edward Hervey <edward@fluendo.com>
|
2006-05-18 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
* gst/gsttypefind.c: (gst_type_find_get_type):
|
* gst/gsttypefind.c: (gst_type_find_get_type):
|
||||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
||||||
Subproject commit a5b66304e7abe1440a0f8b0ed232ffbc56e8f3de
|
Subproject commit 764c5f25101d20da7f26942c36ba840ba65c63d7
|
|
@ -501,6 +501,7 @@ gst_element_query_duration
|
||||||
|
|
||||||
<SUBSECTION element-event>
|
<SUBSECTION element-event>
|
||||||
gst_element_send_event
|
gst_element_send_event
|
||||||
|
gst_element_seek_simple
|
||||||
gst_element_seek
|
gst_element_seek
|
||||||
|
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
|
|
|
@ -1916,6 +1916,40 @@ gst_element_query_convert (GstElement * element, GstFormat src_format,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_element_seek_simple
|
||||||
|
* @element: a #GstElement to seek on
|
||||||
|
* @format: a #GstFormat to execute the seek in, such as #GST_FORMAT_TIME
|
||||||
|
* @seek_flags: seek options
|
||||||
|
* @seek_pos: position to seek to (relative to the start); if you are doing
|
||||||
|
* a seek in #GST_FORMAT_TIME this value is in nanoseconds -
|
||||||
|
* multiply with #GST_SECOND to convert seconds to nanoseconds or
|
||||||
|
* with #GST_MSECOND to convert milliseconds to nanoseconds.
|
||||||
|
*
|
||||||
|
* Simple API to perform a seek on the given element, meaning it just seeks
|
||||||
|
* to the given position relative to the start of the stream. For more complex
|
||||||
|
* operations like segment seeks (e.g. for looping) or changing the playback
|
||||||
|
* rate or seeking relative to the current position or seeking relative to
|
||||||
|
* the end of the stream you should use gst_element_seek ().
|
||||||
|
*
|
||||||
|
* Note that seeking is usually only possible in PAUSED or PLAYING state.
|
||||||
|
*
|
||||||
|
* Returns: TRUE if the seek operation succeeded (the seek
|
||||||
|
* might not always be executed instantly though)
|
||||||
|
*
|
||||||
|
* Since: 0.10.7
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
gst_element_seek_simple (GstElement * element, GstFormat format,
|
||||||
|
GstSeekFlags seek_flags, gint64 seek_pos)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
|
||||||
|
g_return_val_if_fail (seek_pos >= 0, FALSE);
|
||||||
|
|
||||||
|
return gst_element_seek (element, 1.0, format, seek_flags,
|
||||||
|
GST_SEEK_TYPE_SET, seek_pos, GST_SEEK_TYPE_NONE, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_pad_can_link:
|
* gst_pad_can_link:
|
||||||
* @srcpad: the source #GstPad to link.
|
* @srcpad: the source #GstPad to link.
|
||||||
|
|
|
@ -533,6 +533,12 @@ void gst_element_unlink_pads (GstElement *src, const
|
||||||
gboolean gst_element_link_pads_filtered (GstElement * src, const gchar * srcpadname,
|
gboolean gst_element_link_pads_filtered (GstElement * src, const gchar * srcpadname,
|
||||||
GstElement * dest, const gchar * destpadname,
|
GstElement * dest, const gchar * destpadname,
|
||||||
GstCaps *filter);
|
GstCaps *filter);
|
||||||
|
|
||||||
|
gboolean gst_element_seek_simple (GstElement *element,
|
||||||
|
GstFormat format,
|
||||||
|
GstSeekFlags seek_flags,
|
||||||
|
gint64 seek_pos);
|
||||||
|
|
||||||
/* util elementfactory functions */
|
/* util elementfactory functions */
|
||||||
gboolean gst_element_factory_can_src_caps(GstElementFactory *factory, const GstCaps *caps);
|
gboolean gst_element_factory_can_src_caps(GstElementFactory *factory, const GstCaps *caps);
|
||||||
gboolean gst_element_factory_can_sink_caps(GstElementFactory *factory, const GstCaps *caps);
|
gboolean gst_element_factory_can_sink_caps(GstElementFactory *factory, const GstCaps *caps);
|
||||||
|
|
|
@ -222,6 +222,7 @@ EXPORTS
|
||||||
gst_element_remove_pad
|
gst_element_remove_pad
|
||||||
gst_element_requires_clock
|
gst_element_requires_clock
|
||||||
gst_element_seek
|
gst_element_seek
|
||||||
|
gst_element_seek_simple
|
||||||
gst_element_send_event
|
gst_element_send_event
|
||||||
gst_element_set_base_time
|
gst_element_set_base_time
|
||||||
gst_element_set_bus
|
gst_element_set_bus
|
||||||
|
|
Loading…
Reference in a new issue