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.
parent 0f03b8ee
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> 2005-10-10 Andy Wingo <wingo@pobox.com>
* autogen.sh (CONFIGURE_DEF_OPT): No more --plugin-buiddir, yay * autogen.sh (CONFIGURE_DEF_OPT): No more --plugin-buiddir, yay
......
...@@ -82,6 +82,7 @@ gst_caps_get_type (void) ...@@ -82,6 +82,7 @@ gst_caps_get_type (void)
* *
* Creates a new #GstCaps that is empty. That is, the returned * Creates a new #GstCaps that is empty. That is, the returned
* #GstCaps contains no media formats. * #GstCaps contains no media formats.
* Caller is responsible for unreffing the returned caps.
* *
* Returns: the new #GstCaps * Returns: the new #GstCaps
*/ */
...@@ -128,6 +129,7 @@ gst_caps_new_any (void) ...@@ -128,6 +129,7 @@ gst_caps_new_any (void)
* Creates a new #GstCaps that contains one #GstStructure. The * Creates a new #GstCaps that contains one #GstStructure. The
* structure is defined by the arguments, which have the same format * structure is defined by the arguments, which have the same format
* as @gst_structure_new(). * as @gst_structure_new().
* Caller is responsible for unreffing the returned caps.
* *
* Returns: the new #GstCaps * Returns: the new #GstCaps
*/ */
......
...@@ -21,17 +21,18 @@ ...@@ -21,17 +21,18 @@
*/ */
/** /**
* SECTION:gstevent * 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 * @see_also: #GstPad, #GstElement
* *
* The event classes are used to construct and query events. * The event classes are used to construct and query events.
* *
* Events are usually created with gst_event_new_*() which takes the extra event * Events are usually created with gst_event_new_*() which takes the extra
* paramters as arguments. * event parameters as arguments.
* Events can be parsed with their respective gst_event_parse_*() functions. * 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. * the needed parameters for a seek event.
* *
* gst_event_new_flush() creates a new flush event. * gst_event_new_flush() creates a new flush event.
...@@ -294,7 +295,7 @@ gst_event_get_structure (GstEvent * event) ...@@ -294,7 +295,7 @@ gst_event_get_structure (GstEvent * event)
* It marks pads as being in a WRONG_STATE to process more data. * It marks pads as being in a WRONG_STATE to process more data.
* *
* Elements unlock and blocking functions and exit their streaming functions * Elements unlock and blocking functions and exit their streaming functions
* as fast as possible. * as fast as possible.
* *
* This event is typically generated after a seek to minimize the latency * This event is typically generated after a seek to minimize the latency
* after the seek. * after the seek.
...@@ -450,7 +451,7 @@ gst_event_parse_newsegment (GstEvent * event, gdouble * rate, ...@@ -450,7 +451,7 @@ gst_event_parse_newsegment (GstEvent * event, gdouble * rate,
* @taglist: metadata list * @taglist: metadata list
* *
* Generates a metadata tag event from the given @taglist. * Generates a metadata tag event from the given @taglist.
* *
* Returns: a new #GstEvent * Returns: a new #GstEvent
*/ */
GstEvent * GstEvent *
...@@ -571,7 +572,7 @@ gst_event_parse_buffersize (GstEvent * event, GstFormat * format, ...@@ -571,7 +572,7 @@ gst_event_parse_buffersize (GstEvent * event, GstFormat * format,
* datarate, 0.75 means increase datarate by 75%, 1.5 is 150%. Negative * datarate, 0.75 means increase datarate by 75%, 1.5 is 150%. Negative
* values request a slow down, so -0.75 means a decrease by 75%. * values request a slow down, so -0.75 means a decrease by 75%.
* *
* diff is the difference against the clock in stream time of the last * diff is the difference against the clock in stream time of the last
* buffer that caused the element to generate the QOS event. * buffer that caused the element to generate the QOS event.
* *
* timestamp is the timestamp of the last buffer that cause the element * timestamp is the timestamp of the last buffer that cause the element
...@@ -628,7 +629,7 @@ gst_event_parse_qos (GstEvent * event, gdouble * proportion, ...@@ -628,7 +629,7 @@ gst_event_parse_qos (GstEvent * event, gdouble * proportion,
* gst_event_new_seek: * gst_event_new_seek:
* @rate: The new playback rate * @rate: The new playback rate
* @format: The format of the seek values * @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_type: The type and flags for the new current position
* @cur: The value of the new current position * @cur: The value of the new current position
* @stop_type: The type and flags for the new stop position * @stop_type: The type and flags for the new stop position
......
...@@ -1035,17 +1035,17 @@ gst_value_serialize_ ## _type (const GValue * value) \ ...@@ -1035,17 +1035,17 @@ gst_value_serialize_ ## _type (const GValue * value) \
return (char *) g_value_get_string (&val); \ 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 * check if the result is actually storeable in the given size number of
* bytes. * bytes.
*/ */
static gboolean static gboolean
gst_value_deserialize_int_helper (long long *to, const char *s, gst_value_deserialize_int_helper (gint64 * to, const char *s,
long long min, long long max, int size) gint64 min, gint64 max, int size)
{ {
gboolean ret = FALSE; gboolean ret = FALSE;
char *end; char *end;
long long mask = -1; gint64 mask = -1;
errno = 0; errno = 0;
*to = g_ascii_strtoull (s, &end, 0); *to = g_ascii_strtoull (s, &end, 0);
...@@ -1075,7 +1075,7 @@ gst_value_deserialize_int_helper (long long *to, const char *s, ...@@ -1075,7 +1075,7 @@ gst_value_deserialize_int_helper (long long *to, const char *s,
} }
} }
if (ret) { 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 (size != sizeof (mask)) {
if (*to >= 0) { if (*to >= 0) {
/* for positive numbers, we create a mask of 1's outside of the range /* for positive numbers, we create a mask of 1's outside of the range
...@@ -1103,7 +1103,7 @@ CREATE_SERIALIZATION_START(_type,_macro) \ ...@@ -1103,7 +1103,7 @@ CREATE_SERIALIZATION_START(_type,_macro) \
static gboolean \ static gboolean \
gst_value_deserialize_ ## _type (GValue * dest, const char *s) \ 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, \ if (gst_value_deserialize_int_helper (&x, s, G_MIN ## _macro, \
G_MAX ## _macro, sizeof (g ## _type))) { \ G_MAX ## _macro, sizeof (g ## _type))) { \
...@@ -1120,7 +1120,7 @@ CREATE_SERIALIZATION_START(_type,_macro) \ ...@@ -1120,7 +1120,7 @@ CREATE_SERIALIZATION_START(_type,_macro) \
static gboolean \ static gboolean \
gst_value_deserialize_ ## _type (GValue * dest, const char *s) \ gst_value_deserialize_ ## _type (GValue * dest, const char *s) \
{ \ { \
guint64 x; \ gint64 x; \
char *end; \ char *end; \
gboolean ret = FALSE; \ gboolean ret = FALSE; \
\ \
...@@ -1174,18 +1174,19 @@ G_STMT_START { \ ...@@ -1174,18 +1174,19 @@ G_STMT_START { \
gst_value_register (&gst_value); \ gst_value_register (&gst_value); \
} G_STMT_END } G_STMT_END
CREATE_SERIALIZATION (int, INT) CREATE_SERIALIZATION (int, INT);
CREATE_SERIALIZATION (int64, INT64) CREATE_SERIALIZATION (int64, INT64);
CREATE_SERIALIZATION (long, LONG) CREATE_SERIALIZATION (long, LONG);
CREATE_USERIALIZATION (uint, UINT)
CREATE_USERIALIZATION (uint64, UINT64) CREATE_USERIALIZATION (uint, UINT);
CREATE_USERIALIZATION (ulong, ULONG) CREATE_USERIALIZATION (uint64, UINT64);
CREATE_USERIALIZATION (ulong, ULONG);
/********** /**********
* double * * double *
**********/ **********/
static int static int
gst_value_compare_double (const GValue * value1, const GValue * value2) gst_value_compare_double (const GValue * value1, const GValue * value2)
{ {
if (value1->data[0].v_double > value2->data[0].v_double) if (value1->data[0].v_double > value2->data[0].v_double)
return GST_VALUE_GREATER_THAN; return GST_VALUE_GREATER_THAN;
......
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