From 192330d37a15e8e53119e062d36ba436e55385bd Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 30 Jan 2004 20:48:13 +0000 Subject: [PATCH] parts of the patch submitted in bug #113913 Original commit message from CVS: 2004-01-30 Laurent Vivier reviewed by Benjamin Otte parts of the patch submitted in bug #113913 * configure.ac: use AC_C_INLINE. Use = instead of == with test * examples/plugins/example.c: * gst/autoplug/gstspideridentity.c: * gst/elements/gstfdsrc.c: * gst/elements/gstfilesrc.c: * gst/elements/gstidentity.c: * gst/elements/gstmultidisksrc.c: * gst/elements/gststatistics.c: * gst/gstelement.c: * gst/gstobject.c: * gst/gstpad.c: * gst/gstpipeline.c: * gst/gstthread.c: don't end enums with a comma * gst/gstindex.c: (gst_index_compare_func): do explicit casting to gint * gst/gsttrace.c: (gst_trace_text_flush): #define strsize as a macro --- ChangeLog | 25 +++++ configure.ac | 3 +- docs/gst/tmpl/gstbin.sgml | 56 +++++------ docs/gst/tmpl/gstclock.sgml | 30 +++--- docs/gst/tmpl/gstelement.sgml | 141 ++++++++++++++------------- docs/gst/tmpl/gstindex.sgml | 26 ++--- docs/gst/tmpl/gstobject.sgml | 82 ++++++++-------- docs/gst/tmpl/gstpadtemplate.sgml | 18 ++-- docs/gst/tmpl/gstreamer-unused.sgml | 9 ++ docs/gst/tmpl/gstthread.sgml | 18 ++-- docs/gst/tmpl/gstxml.sgml | 22 ----- examples/plugins/example.c | 2 +- gst/autoplug/gstspideridentity.c | 2 +- gst/elements/gstfdsrc.c | 2 +- gst/elements/gstfilesrc.c | 2 +- gst/elements/gstidentity.c | 2 +- gst/elements/gstmultidisksrc.c | 2 +- gst/elements/gstmultifilesrc.c | 2 +- gst/elements/gststatistics.c | 2 +- gst/gstelement.c | 2 +- gst/gstindex.c | 4 +- gst/gstobject.c | 2 +- gst/gstpad.c | 2 +- gst/gstpipeline.c | 2 +- gst/gstthread.c | 2 +- gst/gsttrace.c | 7 +- plugins/elements/gstfdsrc.c | 2 +- plugins/elements/gstfilesrc.c | 2 +- plugins/elements/gstidentity.c | 2 +- plugins/elements/gstmultidisksrc.c | 2 +- plugins/elements/gstmultifilesrc.c | 2 +- plugins/elements/gststatistics.c | 2 +- tests/old/examples/plugins/example.c | 2 +- 33 files changed, 248 insertions(+), 233 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0019682c4f..27d341dd85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,28 @@ +2004-01-30 Laurent Vivier + + reviewed by Benjamin Otte + parts of the patch submitted in bug #113913 + + * configure.ac: + use AC_C_INLINE. Use = instead of == with test + * examples/plugins/example.c: + * gst/autoplug/gstspideridentity.c: + * gst/elements/gstfdsrc.c: + * gst/elements/gstfilesrc.c: + * gst/elements/gstidentity.c: + * gst/elements/gstmultidisksrc.c: + * gst/elements/gststatistics.c: + * gst/gstelement.c: + * gst/gstobject.c: + * gst/gstpad.c: + * gst/gstpipeline.c: + * gst/gstthread.c: + don't end enums with a comma + * gst/gstindex.c: (gst_index_compare_func): + do explicit casting to gint + * gst/gsttrace.c: (gst_trace_text_flush): + #define strsize as a macro + 2004-01-30 Thomas Vander Stichele * docs/README: diff --git a/configure.ac b/configure.ac index 4aa8c533d9..ba85187f00 100644 --- a/configure.ac +++ b/configure.ac @@ -65,6 +65,7 @@ dnl *NOTE*: dnl this line before release, so release does static too dnl AM_DISABLE_STATIC AC_HEADER_STDC([]) +AC_C_INLINE dnl define correct errorlevel for debugging messages. We want to have GST_ERROR dnl messages printed when running cvs builds @@ -149,7 +150,7 @@ AC_MSG_RESULT(no) dnl check for makecontext and define HAVE_MAKECONTEXT if we have it AC_CHECK_MCSC() -if test "$ac_cv_check_mcsc" == "yes"; then +if test "$ac_cv_check_mcsc" = "yes"; then AC_DEFINE_UNQUOTED(HAVE_MAKECONTEXT, $HAVE_MAKECONTEXT, [defined if we have makecontext ()]) fi diff --git a/docs/gst/tmpl/gstbin.sgml b/docs/gst/tmpl/gstbin.sgml index 68c62da4bc..8a0038e0b9 100644 --- a/docs/gst/tmpl/gstbin.sgml +++ b/docs/gst/tmpl/gstbin.sgml @@ -72,6 +72,34 @@ The GstBin object + + + + + +@gstbin: the object which received the signal. +@arg1: the element that was added to the bin + + + + + + +@gstbin: the object which received the signal. +@arg1: the element that was removed from the bin + + + +This signal is emitted when a bin iterates, either automatically or +due to a #gst_bin_iterate() call. The return value is used to +determine if the object method handler processed any data. +In most normal cases, a user-provided signal handler should return +FALSE. + + +@gstbin: the object which received the signal. +@Returns: TRUE if the state of the bin was advanced. + The signature of the callback for the post and pre iterate function as set with @@ -224,31 +252,3 @@ gst_bin_set_pre_iterate_function() and gst_bin_set_post_iterate_function(). @clock: - - - - - -@gstbin: the object which received the signal. -@arg1: the element that was added to the bin - - - - - - -@gstbin: the object which received the signal. -@arg1: the element that was removed from the bin - - - -This signal is emitted when a bin iterates, either automatically or -due to a #gst_bin_iterate() call. The return value is used to -determine if the object method handler processed any data. -In most normal cases, a user-provided signal handler should return -FALSE. - - -@gstbin: the object which received the signal. -@Returns: TRUE if the state of the bin was advanced. - diff --git a/docs/gst/tmpl/gstclock.sgml b/docs/gst/tmpl/gstclock.sgml index 0e9540e424..2f67ebae65 100644 --- a/docs/gst/tmpl/gstclock.sgml +++ b/docs/gst/tmpl/gstclock.sgml @@ -235,6 +235,21 @@ The GstClock object + + + + + + + +Maximum allowed diff for clock sync requests against the real time. + + + + +Boolean property to activate stat generation on the clock. + + @@ -402,18 +417,3 @@ The GstClock object @id: - - - - - - - -Maximum allowed diff for clock sync requests against the real time. - - - - -Boolean property to activate stat generation on the clock. - - diff --git a/docs/gst/tmpl/gstelement.sgml b/docs/gst/tmpl/gstelement.sgml index 542a16fda6..9165014aed 100644 --- a/docs/gst/tmpl/gstelement.sgml +++ b/docs/gst/tmpl/gstelement.sgml @@ -71,6 +71,77 @@ The element object + + +Signal emited when the element goes to PAUSED due to an end-of-stream +condition. + + +@gstelement: the object which received the signal. + + + +Is triggered whenever an error occured. + + + +@gstelement: the object which received the signal. +@arg1: the error message +@arg2: +@: +@: +@: +@: +@: +@: +@: +@: +@: +@: +@: +@: +@: +@: +@: +@: +@: +@: +@: + + + + + + +@gstelement: the object which received the signal. +@arg1: +@arg2: + + + +Is triggered whenever a new pad is added to an element. + + +@gstelement: the object which received the signal. +@arg1: the new pad that was added + + + +Is triggered whenever a pad has been removed from the element. + + +@gstelement: the object which received the signal. +@arg1: The pad that was removed. + + + +Is triggered whenever the state of an element changes. + + +@gstelement: the object which received the signal. +@arg1: the new state of the object +@arg2: + Gets the name of the element. @@ -954,73 +1025,3 @@ Helper macro to create query type functions @...: list of query types. - - -Signal emited when the element goes to PAUSED due to an end-of-stream -condition. - - -@gstelement: the object which received the signal. - - - -Is triggered whenever an error occured. - - - -@gstelement: the object which received the signal. -@arg1: the error message -@arg2: -@: -@: -@: -@: -@: -@: -@: -@: -@: -@: -@: -@: -@: -@: -@: -@: -@: -@: - - - - - - -@gstelement: the object which received the signal. -@arg1: -@arg2: - - - -Is triggered whenever a new pad is added to an element. - - -@gstelement: the object which received the signal. -@arg1: the new pad that was added - - - -Is triggered whenever a pad has been removed from the element. - - -@gstelement: the object which received the signal. -@arg1: The pad that was removed. - - - -Is triggered whenever the state of an element changes. - - -@gstelement: the object which received the signal. -@arg1: the new state of the object -@arg2: - diff --git a/docs/gst/tmpl/gstindex.sgml b/docs/gst/tmpl/gstindex.sgml index d828fa3114..cdc3cfa10e 100644 --- a/docs/gst/tmpl/gstindex.sgml +++ b/docs/gst/tmpl/gstindex.sgml @@ -209,6 +209,19 @@ The GstIndex object + + +Is emited when a new entry is added to the index. + + +@gstindex: the object which received the signal. +@arg1: The entry added to the index. + + + + + + @@ -401,16 +414,3 @@ The GstIndex object @id: - - -Is emited when a new entry is added to the index. - - -@gstindex: the object which received the signal. -@arg1: The entry added to the index. - - - - - - diff --git a/docs/gst/tmpl/gstobject.sgml b/docs/gst/tmpl/gstobject.sgml index 52616a2215..cf69ab93ee 100644 --- a/docs/gst/tmpl/gstobject.sgml +++ b/docs/gst/tmpl/gstobject.sgml @@ -40,6 +40,47 @@ The GstObject + + +The deep notify signal is used to be notified of property changes. +it is typically attached to the toplevel bin to receive notifications +from all the elements contained in that bin. + + +@gstobject: the object which received the signal. +@arg1: the object that originated the signal +@arg2: the property that changed + + + +Is trigered whenever a new object is saved to XML. You can connect to +this signal to insert custom XML tags into the core XML. + + +@gstobject: the object which received the signal. +@arg1: the xmlNodePtr of the parent node + + + +Is emitted when the parent of an object is set. + + +@gstobject: the object which received the signal. +@arg1: the new parent + + + +Is emitted when the parent of an object is unset. + + +@gstobject: the object which received the signal. +@arg1: the old parent + + + +The name of the object + + This macro returns the entire set of flags for the object. @@ -290,44 +331,3 @@ Check if the object has been destroyed. @Returns: - - -The deep notify signal is used to be notified of property changes. -it is typically attached to the toplevel bin to receive notifications -from all the elements contained in that bin. - - -@gstobject: the object which received the signal. -@arg1: the object that originated the signal -@arg2: the property that changed - - - -Is trigered whenever a new object is saved to XML. You can connect to -this signal to insert custom XML tags into the core XML. - - -@gstobject: the object which received the signal. -@arg1: the xmlNodePtr of the parent node - - - -Is emitted when the parent of an object is set. - - -@gstobject: the object which received the signal. -@arg1: the new parent - - - -Is emitted when the parent of an object is unset. - - -@gstobject: the object which received the signal. -@arg1: the old parent - - - -The name of the object - - diff --git a/docs/gst/tmpl/gstpadtemplate.sgml b/docs/gst/tmpl/gstpadtemplate.sgml index a2736922d0..b20d655c80 100644 --- a/docs/gst/tmpl/gstpadtemplate.sgml +++ b/docs/gst/tmpl/gstpadtemplate.sgml @@ -87,6 +87,15 @@ The padtemplate object. + + +This signal is fired when an element creates a pad from this +template. + + +@gstpadtemplate: the object which received the signal. +@arg1: The pad that was created. + Flags for the padtemplate @@ -168,12 +177,3 @@ Check if the properties of the padtemplate are fixed @Returns: - - -This signal is fired when an element creates a pad from this -template. - - -@gstpadtemplate: the object which received the signal. -@arg1: The pad that was created. - diff --git a/docs/gst/tmpl/gstreamer-unused.sgml b/docs/gst/tmpl/gstreamer-unused.sgml index ee359607f3..3015f334a4 100644 --- a/docs/gst/tmpl/gstreamer-unused.sgml +++ b/docs/gst/tmpl/gstreamer-unused.sgml @@ -6033,6 +6033,15 @@ Query the element for the current mime type + + + + + +@gstxml: the object which received the signal. +@arg1: +@arg2: + diff --git a/docs/gst/tmpl/gstthread.sgml b/docs/gst/tmpl/gstthread.sgml index 6d7021906d..38a7691b0a 100644 --- a/docs/gst/tmpl/gstthread.sgml +++ b/docs/gst/tmpl/gstthread.sgml @@ -34,15 +34,6 @@ The GstThread object - - - - - -@name: -@Returns: - - @@ -55,3 +46,12 @@ The GstThread object The thread priority + + + + + +@name: +@Returns: + + diff --git a/docs/gst/tmpl/gstxml.sgml b/docs/gst/tmpl/gstxml.sgml index 08450b21b9..ea4e4bd24a 100644 --- a/docs/gst/tmpl/gstxml.sgml +++ b/docs/gst/tmpl/gstxml.sgml @@ -105,25 +105,3 @@ All GstElements can be serialized to an XML presentation and subsequently loaded @Returns: - - - - - -@: -@: -@: - -@gstxml: the object which received the signal. -@arg1: -@arg2: - - - - - - -@gstxml: the object which received the signal. -@arg1: -@arg2: - diff --git a/examples/plugins/example.c b/examples/plugins/example.c index ad47dcdc9a..796d339407 100644 --- a/examples/plugins/example.c +++ b/examples/plugins/example.c @@ -49,7 +49,7 @@ enum { */ enum { ARG_0, - ARG_ACTIVE, + ARG_ACTIVE /* FILL ME */ }; diff --git a/gst/autoplug/gstspideridentity.c b/gst/autoplug/gstspideridentity.c index 7cdbbfa51f..24c8f60b90 100644 --- a/gst/autoplug/gstspideridentity.c +++ b/gst/autoplug/gstspideridentity.c @@ -64,7 +64,7 @@ enum { }; enum { - ARG_0, + ARG_0 /* FILL ME */ }; diff --git a/gst/elements/gstfdsrc.c b/gst/elements/gstfdsrc.c index d45ff18f81..ffabc94d80 100644 --- a/gst/elements/gstfdsrc.c +++ b/gst/elements/gstfdsrc.c @@ -55,7 +55,7 @@ enum { enum { ARG_0, ARG_FD, - ARG_BLOCKSIZE, + ARG_BLOCKSIZE }; #define _do_init(bla) \ diff --git a/gst/elements/gstfilesrc.c b/gst/elements/gstfilesrc.c index dab1fd41ee..c47a7ff15f 100644 --- a/gst/elements/gstfilesrc.c +++ b/gst/elements/gstfilesrc.c @@ -99,7 +99,7 @@ enum { ARG_FD, ARG_BLOCKSIZE, ARG_MMAPSIZE, - ARG_TOUCH, + ARG_TOUCH }; GST_PAD_EVENT_MASK_FUNCTION (gst_filesrc_get_event_mask, diff --git a/gst/elements/gstidentity.c b/gst/elements/gstidentity.c index e369cdb309..c6b9c361bc 100644 --- a/gst/elements/gstidentity.c +++ b/gst/elements/gstidentity.c @@ -57,7 +57,7 @@ enum { ARG_DROP_PROBABILITY, ARG_SILENT, ARG_LAST_MESSAGE, - ARG_DUMP, + ARG_DUMP }; diff --git a/gst/elements/gstmultidisksrc.c b/gst/elements/gstmultidisksrc.c index eef3a424d7..6f3b304962 100644 --- a/gst/elements/gstmultidisksrc.c +++ b/gst/elements/gstmultidisksrc.c @@ -55,7 +55,7 @@ enum { enum { ARG_0, - ARG_LOCATIONS, + ARG_LOCATIONS }; #define _do_init(bla) \ diff --git a/gst/elements/gstmultifilesrc.c b/gst/elements/gstmultifilesrc.c index eef3a424d7..6f3b304962 100644 --- a/gst/elements/gstmultifilesrc.c +++ b/gst/elements/gstmultifilesrc.c @@ -55,7 +55,7 @@ enum { enum { ARG_0, - ARG_LOCATIONS, + ARG_LOCATIONS }; #define _do_init(bla) \ diff --git a/gst/elements/gststatistics.c b/gst/elements/gststatistics.c index 688727c123..65e578b25a 100644 --- a/gst/elements/gststatistics.c +++ b/gst/elements/gststatistics.c @@ -54,7 +54,7 @@ enum { ARG_EVENT_UPDATE_FREQ, ARG_UPDATE_ON_EOS, ARG_UPDATE, - ARG_SILENT, + ARG_SILENT }; diff --git a/gst/gstelement.c b/gst/gstelement.c index 0788407a60..24cc8d1979 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -47,7 +47,7 @@ enum { }; enum { - ARG_0, + ARG_0 /* FILL ME */ }; diff --git a/gst/gstindex.c b/gst/gstindex.c index 23f6ce74a3..9a5951f505 100644 --- a/gst/gstindex.c +++ b/gst/gstindex.c @@ -35,7 +35,7 @@ enum { enum { ARG_0, - ARG_RESOLVER, + ARG_RESOLVER /* FILL ME */ }; @@ -710,7 +710,7 @@ gst_index_compare_func (gconstpointer a, gconstpointer b, gpointer user_data) { - return a - b; + return (gint)a - (gint)b; } /** diff --git a/gst/gstobject.c b/gst/gstobject.c index d6ea419175..2fd1748008 100644 --- a/gst/gstobject.c +++ b/gst/gstobject.c @@ -42,7 +42,7 @@ enum { enum { ARG_0, - ARG_NAME, + ARG_NAME /* FILL ME */ }; diff --git a/gst/gstpad.c b/gst/gstpad.c index b8f884ea73..2f100223fb 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -126,7 +126,7 @@ enum { enum { REAL_ARG_0, REAL_ARG_CAPS, - REAL_ARG_ACTIVE, + REAL_ARG_ACTIVE /* FILL ME */ }; diff --git a/gst/gstpipeline.c b/gst/gstpipeline.c index aa55d91786..d7b4166c27 100644 --- a/gst/gstpipeline.c +++ b/gst/gstpipeline.c @@ -40,7 +40,7 @@ enum { }; enum { - ARG_0, + ARG_0 /* FILL ME */ }; diff --git a/gst/gstthread.c b/gst/gstthread.c index b28d892909..97ced94baa 100644 --- a/gst/gstthread.c +++ b/gst/gstthread.c @@ -54,7 +54,7 @@ enum { enum { ARG_0, - ARG_PRIORITY, + ARG_PRIORITY }; diff --git a/gst/gsttrace.c b/gst/gsttrace.c index 6130e7ddc3..0c9ed7990c 100644 --- a/gst/gsttrace.c +++ b/gst/gsttrace.c @@ -108,8 +108,8 @@ void gst_trace_text_flush (GstTrace * trace) { int i; - const int strsize = 20 + 1 + 10 + 1 + 10 + 1 + 112 + 1 + 1; - char str[strsize]; +#define STRSIZE (20 + 1 + 10 + 1 + 10 + 1 + 112 + 1 + 1) + char str[STRSIZE]; if (!trace) { trace = _gst_trace_default; @@ -118,12 +118,13 @@ gst_trace_text_flush (GstTrace * trace) } for (i = 0; i < trace->bufoffset; i++) { - snprintf (str, strsize, "%20" G_GINT64_FORMAT " %10d %10d %s\n", + snprintf (str, STRSIZE, "%20" G_GINT64_FORMAT " %10d %10d %s\n", trace->buf[i].timestamp, trace->buf[i].sequence, trace->buf[i].data, trace->buf[i].message); write (trace->fd, str, strlen (str)); } trace->bufoffset = 0; +#undef STRSIZE } void diff --git a/plugins/elements/gstfdsrc.c b/plugins/elements/gstfdsrc.c index d45ff18f81..ffabc94d80 100644 --- a/plugins/elements/gstfdsrc.c +++ b/plugins/elements/gstfdsrc.c @@ -55,7 +55,7 @@ enum { enum { ARG_0, ARG_FD, - ARG_BLOCKSIZE, + ARG_BLOCKSIZE }; #define _do_init(bla) \ diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index dab1fd41ee..c47a7ff15f 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -99,7 +99,7 @@ enum { ARG_FD, ARG_BLOCKSIZE, ARG_MMAPSIZE, - ARG_TOUCH, + ARG_TOUCH }; GST_PAD_EVENT_MASK_FUNCTION (gst_filesrc_get_event_mask, diff --git a/plugins/elements/gstidentity.c b/plugins/elements/gstidentity.c index e369cdb309..c6b9c361bc 100644 --- a/plugins/elements/gstidentity.c +++ b/plugins/elements/gstidentity.c @@ -57,7 +57,7 @@ enum { ARG_DROP_PROBABILITY, ARG_SILENT, ARG_LAST_MESSAGE, - ARG_DUMP, + ARG_DUMP }; diff --git a/plugins/elements/gstmultidisksrc.c b/plugins/elements/gstmultidisksrc.c index eef3a424d7..6f3b304962 100644 --- a/plugins/elements/gstmultidisksrc.c +++ b/plugins/elements/gstmultidisksrc.c @@ -55,7 +55,7 @@ enum { enum { ARG_0, - ARG_LOCATIONS, + ARG_LOCATIONS }; #define _do_init(bla) \ diff --git a/plugins/elements/gstmultifilesrc.c b/plugins/elements/gstmultifilesrc.c index eef3a424d7..6f3b304962 100644 --- a/plugins/elements/gstmultifilesrc.c +++ b/plugins/elements/gstmultifilesrc.c @@ -55,7 +55,7 @@ enum { enum { ARG_0, - ARG_LOCATIONS, + ARG_LOCATIONS }; #define _do_init(bla) \ diff --git a/plugins/elements/gststatistics.c b/plugins/elements/gststatistics.c index 688727c123..65e578b25a 100644 --- a/plugins/elements/gststatistics.c +++ b/plugins/elements/gststatistics.c @@ -54,7 +54,7 @@ enum { ARG_EVENT_UPDATE_FREQ, ARG_UPDATE_ON_EOS, ARG_UPDATE, - ARG_SILENT, + ARG_SILENT }; diff --git a/tests/old/examples/plugins/example.c b/tests/old/examples/plugins/example.c index ad47dcdc9a..796d339407 100644 --- a/tests/old/examples/plugins/example.c +++ b/tests/old/examples/plugins/example.c @@ -49,7 +49,7 @@ enum { */ enum { ARG_0, - ARG_ACTIVE, + ARG_ACTIVE /* FILL ME */ };