mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 17:05:52 +00:00
gst/: doc updates
Original commit message from CVS: * gst/gstcaps.c: * gst/gstevent.c: doc updates * gst/gstvalue.c: (gst_value_deserialize_int_helper): don't use long long, it's not portable. Replacing with gint64 seems to work; let's hope no skeletons fall out of the closet.
This commit is contained in:
parent
0f03b8eef6
commit
2b7c3ac5e5
4 changed files with 37 additions and 24 deletions
|
@ -1,3 +1,12 @@
|
|||
2005-10-10 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* gst/gstcaps.c:
|
||||
* gst/gstevent.c:
|
||||
doc updates
|
||||
* gst/gstvalue.c: (gst_value_deserialize_int_helper):
|
||||
don't use long long, it's not portable. Replacing with
|
||||
gint64 seems to work; let's hope no skeletons fall out of the closet.
|
||||
|
||||
2005-10-10 Andy Wingo <wingo@pobox.com>
|
||||
|
||||
* autogen.sh (CONFIGURE_DEF_OPT): No more --plugin-buiddir, yay
|
||||
|
|
|
@ -82,6 +82,7 @@ gst_caps_get_type (void)
|
|||
*
|
||||
* Creates a new #GstCaps that is empty. That is, the returned
|
||||
* #GstCaps contains no media formats.
|
||||
* Caller is responsible for unreffing the returned caps.
|
||||
*
|
||||
* Returns: the new #GstCaps
|
||||
*/
|
||||
|
@ -128,6 +129,7 @@ gst_caps_new_any (void)
|
|||
* Creates a new #GstCaps that contains one #GstStructure. The
|
||||
* structure is defined by the arguments, which have the same format
|
||||
* as @gst_structure_new().
|
||||
* Caller is responsible for unreffing the returned caps.
|
||||
*
|
||||
* Returns: the new #GstCaps
|
||||
*/
|
||||
|
|
|
@ -21,17 +21,18 @@
|
|||
*/
|
||||
/**
|
||||
* SECTION:gstevent
|
||||
* @short_description: Structure describing events that are passed up and down a pipeline
|
||||
* @short_description: Structure describing events that are passed up and down
|
||||
* a pipeline
|
||||
* @see_also: #GstPad, #GstElement
|
||||
*
|
||||
* The event classes are used to construct and query events.
|
||||
*
|
||||
* Events are usually created with gst_event_new_*() which takes the extra event
|
||||
* paramters as arguments.
|
||||
* Events are usually created with gst_event_new_*() which takes the extra
|
||||
* event parameters as arguments.
|
||||
* Events can be parsed with their respective gst_event_parse_*() functions.
|
||||
* The event should be unreferenced with gst_event_unref().
|
||||
* The event should be unreffed with gst_event_unref().
|
||||
*
|
||||
* gst_event_new_seek() is a usually used to create a seek event and it takes
|
||||
* gst_event_new_seek() is usually used to create a seek event and it takes
|
||||
* the needed parameters for a seek event.
|
||||
*
|
||||
* gst_event_new_flush() creates a new flush event.
|
||||
|
@ -628,7 +629,7 @@ gst_event_parse_qos (GstEvent * event, gdouble * proportion,
|
|||
* gst_event_new_seek:
|
||||
* @rate: The new playback rate
|
||||
* @format: The format of the seek values
|
||||
* @flags: The optional seek flags.
|
||||
* @flags: The optional seek flags
|
||||
* @cur_type: The type and flags for the new current position
|
||||
* @cur: The value of the new current position
|
||||
* @stop_type: The type and flags for the new stop position
|
||||
|
|
|
@ -1035,17 +1035,17 @@ gst_value_serialize_ ## _type (const GValue * value) \
|
|||
return (char *) g_value_get_string (&val); \
|
||||
}
|
||||
|
||||
/* deserialize the given s into to as a long long.
|
||||
/* deserialize the given s into to as a gint64.
|
||||
* check if the result is actually storeable in the given size number of
|
||||
* bytes.
|
||||
*/
|
||||
static gboolean
|
||||
gst_value_deserialize_int_helper (long long *to, const char *s,
|
||||
long long min, long long max, int size)
|
||||
gst_value_deserialize_int_helper (gint64 * to, const char *s,
|
||||
gint64 min, gint64 max, int size)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
char *end;
|
||||
long long mask = -1;
|
||||
gint64 mask = -1;
|
||||
|
||||
errno = 0;
|
||||
*to = g_ascii_strtoull (s, &end, 0);
|
||||
|
@ -1075,7 +1075,7 @@ gst_value_deserialize_int_helper (long long *to, const char *s,
|
|||
}
|
||||
}
|
||||
if (ret) {
|
||||
/* by definition, a long long fits into a long long; so ignore those */
|
||||
/* by definition, a gint64 fits into a gint64; so ignore those */
|
||||
if (size != sizeof (mask)) {
|
||||
if (*to >= 0) {
|
||||
/* for positive numbers, we create a mask of 1's outside of the range
|
||||
|
@ -1103,7 +1103,7 @@ CREATE_SERIALIZATION_START(_type,_macro) \
|
|||
static gboolean \
|
||||
gst_value_deserialize_ ## _type (GValue * dest, const char *s) \
|
||||
{ \
|
||||
long long x; \
|
||||
gint64 x; \
|
||||
\
|
||||
if (gst_value_deserialize_int_helper (&x, s, G_MIN ## _macro, \
|
||||
G_MAX ## _macro, sizeof (g ## _type))) { \
|
||||
|
@ -1120,7 +1120,7 @@ CREATE_SERIALIZATION_START(_type,_macro) \
|
|||
static gboolean \
|
||||
gst_value_deserialize_ ## _type (GValue * dest, const char *s) \
|
||||
{ \
|
||||
guint64 x; \
|
||||
gint64 x; \
|
||||
char *end; \
|
||||
gboolean ret = FALSE; \
|
||||
\
|
||||
|
@ -1174,18 +1174,19 @@ G_STMT_START { \
|
|||
gst_value_register (&gst_value); \
|
||||
} G_STMT_END
|
||||
|
||||
CREATE_SERIALIZATION (int, INT)
|
||||
CREATE_SERIALIZATION (int64, INT64)
|
||||
CREATE_SERIALIZATION (long, LONG)
|
||||
CREATE_USERIALIZATION (uint, UINT)
|
||||
CREATE_USERIALIZATION (uint64, UINT64)
|
||||
CREATE_USERIALIZATION (ulong, ULONG)
|
||||
CREATE_SERIALIZATION (int, INT);
|
||||
CREATE_SERIALIZATION (int64, INT64);
|
||||
CREATE_SERIALIZATION (long, LONG);
|
||||
|
||||
CREATE_USERIALIZATION (uint, UINT);
|
||||
CREATE_USERIALIZATION (uint64, UINT64);
|
||||
CREATE_USERIALIZATION (ulong, ULONG);
|
||||
|
||||
/**********
|
||||
* double *
|
||||
**********/
|
||||
static int
|
||||
gst_value_compare_double (const GValue * value1, const GValue * value2)
|
||||
static int
|
||||
gst_value_compare_double (const GValue * value1, const GValue * value2)
|
||||
{
|
||||
if (value1->data[0].v_double > value2->data[0].v_double)
|
||||
return GST_VALUE_GREATER_THAN;
|
||||
|
|
Loading…
Reference in a new issue