mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
gst/: Docs and consistency fixes.
Original commit message from CVS: * gst/gstpad.h: * gst/gstquery.c: (gst_query_set_position), (gst_query_parse_position), (gst_query_set_duration), (gst_query_parse_duration), (gst_query_new_convert): * gst/gstquery.h: * gst/gstutils.c: (gst_element_query_convert): * gst/gstutils.h: Docs and consistency fixes.
This commit is contained in:
parent
9e28a129a5
commit
8c96da05f2
6 changed files with 25 additions and 12 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2005-10-20 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/gstpad.h:
|
||||
* gst/gstquery.c: (gst_query_set_position),
|
||||
(gst_query_parse_position), (gst_query_set_duration),
|
||||
(gst_query_parse_duration), (gst_query_new_convert):
|
||||
* gst/gstquery.h:
|
||||
* gst/gstutils.c: (gst_element_query_convert):
|
||||
* gst/gstutils.h:
|
||||
Docs and consistency fixes.
|
||||
|
||||
2005-10-20 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/gsttask.c:
|
||||
|
|
|
@ -96,6 +96,7 @@ typedef enum {
|
|||
* @GST_FLOW_UNEXPECTED: Did not expect anything, like after EOS.
|
||||
* @GST_FLOW_NOT_NEGOTIATED: Pad is not negotiated.
|
||||
* @GST_FLOW_ERROR: Some (fatal) error occured.
|
||||
* @GST_FLOW_NOT_SUPPORTED: This operation is not supported.
|
||||
*
|
||||
* The result of passing data to a linked pad.
|
||||
*/
|
||||
|
|
|
@ -462,9 +462,9 @@ gst_query_parse_duration (GstQuery * query, GstFormat * format,
|
|||
|
||||
/**
|
||||
* gst_query_new_convert:
|
||||
* @src_fmt: the source #GstFormat for the new query
|
||||
* @src_format: the source #GstFormat for the new query
|
||||
* @value: the value to convert
|
||||
* @dest_fmt: the target #GstFormat
|
||||
* @dest_format: the target #GstFormat
|
||||
*
|
||||
* Constructs a new query convert object. Use gst_query_unref()
|
||||
* when done with it.
|
||||
|
@ -472,7 +472,8 @@ gst_query_parse_duration (GstQuery * query, GstFormat * format,
|
|||
* Returns: A new #GstQuery
|
||||
*/
|
||||
GstQuery *
|
||||
gst_query_new_convert (GstFormat src_fmt, gint64 value, GstFormat dest_fmt)
|
||||
gst_query_new_convert (GstFormat src_format, gint64 value,
|
||||
GstFormat dest_format)
|
||||
{
|
||||
GstQuery *query;
|
||||
GstStructure *structure;
|
||||
|
@ -480,9 +481,9 @@ gst_query_new_convert (GstFormat src_fmt, gint64 value, GstFormat dest_fmt)
|
|||
g_return_val_if_fail (value >= 0, NULL);
|
||||
|
||||
structure = gst_structure_new ("GstQueryConvert",
|
||||
"src_format", GST_TYPE_FORMAT, src_fmt,
|
||||
"src_format", GST_TYPE_FORMAT, src_format,
|
||||
"src_value", G_TYPE_INT64, value,
|
||||
"dest_format", GST_TYPE_FORMAT, dest_fmt,
|
||||
"dest_format", GST_TYPE_FORMAT, dest_format,
|
||||
"dest_value", G_TYPE_INT64, (gint64) - 1, NULL);
|
||||
query = gst_query_new (GST_QUERY_CONVERT, structure);
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ void gst_query_set_duration (GstQuery *query, GstFormat format, gint64 duratio
|
|||
void gst_query_parse_duration (GstQuery *query, GstFormat *format, gint64 *duration);
|
||||
|
||||
/* convert query */
|
||||
GstQuery* gst_query_new_convert (GstFormat src_fmt, gint64 value, GstFormat dest_fmt);
|
||||
GstQuery* gst_query_new_convert (GstFormat src_format, gint64 value, GstFormat dest_format);
|
||||
void gst_query_set_convert (GstQuery *query, GstFormat src_format, gint64 src_value,
|
||||
GstFormat dest_format, gint64 dest_value);
|
||||
void gst_query_parse_convert (GstQuery *query, GstFormat *src_format, gint64 *src_value,
|
||||
|
|
|
@ -1661,25 +1661,25 @@ gst_element_query_duration (GstElement * element, GstFormat * format,
|
|||
*/
|
||||
gboolean
|
||||
gst_element_query_convert (GstElement * element, GstFormat src_format,
|
||||
gint64 src_val, GstFormat * dest_fmt, gint64 * dest_val)
|
||||
gint64 src_val, GstFormat * dest_format, gint64 * dest_val)
|
||||
{
|
||||
GstQuery *query;
|
||||
gboolean ret;
|
||||
|
||||
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
|
||||
g_return_val_if_fail (dest_fmt != NULL, FALSE);
|
||||
g_return_val_if_fail (dest_format != NULL, FALSE);
|
||||
g_return_val_if_fail (dest_val != NULL, FALSE);
|
||||
|
||||
if (*dest_fmt == src_format) {
|
||||
if (*dest_format == src_format) {
|
||||
*dest_val = src_val;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
query = gst_query_new_convert (src_format, src_val, *dest_fmt);
|
||||
query = gst_query_new_convert (src_format, src_val, *dest_format);
|
||||
ret = gst_element_query (element, query);
|
||||
|
||||
if (ret)
|
||||
gst_query_parse_convert (query, NULL, NULL, dest_fmt, dest_val);
|
||||
gst_query_parse_convert (query, NULL, NULL, dest_format, dest_val);
|
||||
|
||||
gst_query_unref (query);
|
||||
|
||||
|
|
|
@ -515,7 +515,7 @@ gboolean gst_element_query_position (GstElement *element, Gs
|
|||
gboolean gst_element_query_duration (GstElement *element, GstFormat *format,
|
||||
gint64 *duration);
|
||||
gboolean gst_element_query_convert (GstElement *element, GstFormat src_format, gint64 src_val,
|
||||
GstFormat *dest_fmt, gint64 *dest_val);
|
||||
GstFormat *dest_format, gint64 *dest_val);
|
||||
|
||||
/* element class functions */
|
||||
void gst_element_class_install_std_props (GstElementClass * klass,
|
||||
|
|
Loading…
Reference in a new issue