diff --git a/ChangeLog b/ChangeLog index 0b6c1525f5..98e2fa6ba9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,53 +1,3 @@ -2005-02-22 Stefan Kost - - * docs/libs/tmpl/gstcontrol.sgml: - * docs/libs/tmpl/gstdparam.sgml: - * docs/libs/tmpl/gstdplinint.sgml: - * docs/libs/tmpl/gstdpman.sgml: - * docs/libs/tmpl/gstdpsmooth.sgml: - * docs/libs/tmpl/gstunitconvert.sgml: - more docs for the state of dparams - -2005-02-19 Benjamin Otte - - * gst/gstelementfactory.c: (gst_element_factory_create): - * gst/gstobject.c: (gst_object_init), - (gst_object_set_name_default), (gst_object_set_name): - name objects by default, not in gst_element_factory_create. Allows - using elements created with g_object_new. (fixes #167283) - -2005-02-19 Benjamin Otte - - * gst/gstinfo.c: (_gst_debug_init), (gst_debug_log_default): - make the time that debugging functions print relative to when - gst_init was called - -2005-02-18 Tim-Philipp Müller - - * gst/gsttaginterface.c: - Fix inline docs: tag setter vararg functions are NULL-terminated, - GST_TAG_INVALID doesn't exist any more. - -2005-02-18 Zaheer Abbas Merali - - * libs/gst/dataprotocol/dataprotocol.c: (gst_dp_dump_byte_array): - Allocate the 1 byte more memory that was forgotten!!!!! - fixes memory corruption on 64bit platforms - -2005-02-15 Stefan Kost - - * docs/pwg/building-pads.xml: - * docs/pwg/intro-basics.xml: - fixed a few typos, relabeled introductionary list of types - * docs/random/ensonic/dparams.txt: - more notes abut dparam changes - * libs/gst/control/dparam.c: (gst_dparam_attach): - * libs/gst/control/dparammanager.c: - * libs/gst/control/dparammanager.h: - - many comments and notes on dparam implementation - - new dparams are were not initialized to the default value - from param spec - 2005-02-14 Thomas Vander Stichele submitted by: Peter Astakhov diff --git a/README b/README index 1dbcd0bd47..12c0836526 100644 --- a/README +++ b/README @@ -69,4 +69,3 @@ the last passed options as a handy shortcut. Use it. After the autogen.sh stage, you can follow the directions listed in "COMPILING FROM SOURCE" - diff --git a/docs/libs/tmpl/gstcontrol.sgml b/docs/libs/tmpl/gstcontrol.sgml index f41c436316..afc9feb4b5 100644 --- a/docs/libs/tmpl/gstcontrol.sgml +++ b/docs/libs/tmpl/gstcontrol.sgml @@ -6,25 +6,15 @@ dynamic parameter functionality. -This library provides a manager component (#GstDParamManager) that maintains a -list of dynamically controlable parameters for a #GstElement. +This library provides a Manager that maintains a list of dynamically +controlable parameters for a GstElement. Just think of a volume slider in a mixer. -#GstElement instances wanting to provide dynamic parameters, need to provide -a #GParamSpec and an update method. The application that will later use the -control parameter, will create a #DParam instance and attach that to use -provided #GParamSpec and update method. -The control library provides several #DParam implementations that can be used -interchangably. The base on just updated the parameter, while others can smooth -the control changes. - - - -To use this library in a application one needs to add some code to initialize it. +To use this library one needs to add some code to initialize it. -Adding the control library to an application (step 1) +Adding the control library to a project ... &hash;include <gst/gst.h> @@ -35,37 +25,7 @@ gst_control_init(&argc,&argv); ... - - -The next step is to get hold of the #GstDParamManager instance of a #GstElement -and set the working mode of the manager. - -Adding the control library to an application (step 2) - -dparam_manager=gst_dpman_get_manager(element); -gst_dpman_set_mode(dparam_manager, "synchronous"); - - - - - -Finally one need to attach a new #DParam to the paramter spec. - -Adding the control library to an application (step 3) - -pspec=gst_dpman_get_param_spec(dparam_manager,"volume"); -dparam=gst_dparam_new(G_PARAM_SPEC_VALUE_TYPE(pspec)); -gst_dpman_attach_dparam(dparam_manager,g_param_spec_get_name(pspecs),dparam); - - -For a full example look at the gst-plugins/gst/sine/demo-dparams.c - - -To add dparam support to a plugin look at gst-plugins/gst/sine/gstsinesrc.c -or gst-plugins/gst/volume/gstvolume.c. -The key concept is to call GST_DPMAN_PREPROCESS() before processing data and to -wrap the data processing (chain or loop function) by GST_DPMAN_PROCESS(). -This allows the manager to interupt processing to apply new control values. +The next step is to get hold of the GstDParamManager instance of a GstElement. @@ -73,9 +33,6 @@ This allows the manager to interupt processing to apply new control values. - - - diff --git a/docs/libs/tmpl/gstdataprotocol.sgml b/docs/libs/tmpl/gstdataprotocol.sgml index 1bb87c8d3e..0cd1515e94 100644 --- a/docs/libs/tmpl/gstdataprotocol.sgml +++ b/docs/libs/tmpl/gstdataprotocol.sgml @@ -27,9 +27,6 @@ network connections also need a protocol to do this. #GstBuffer, #GstCaps, #GstEvent - - - diff --git a/docs/libs/tmpl/gstdparam.sgml b/docs/libs/tmpl/gstdparam.sgml index 7726db63e6..349dbe5b87 100644 --- a/docs/libs/tmpl/gstdparam.sgml +++ b/docs/libs/tmpl/gstdparam.sgml @@ -6,8 +6,7 @@ dynamic parameter instance -This base class for dynamic parameters will update parameters as they are. -Subclasses of this do more advanced updates like smoothing parameter changes. + @@ -15,9 +14,6 @@ Subclasses of this do more advanced updates like smoothing parameter changes. - - - diff --git a/docs/libs/tmpl/gstdplinint.sgml b/docs/libs/tmpl/gstdplinint.sgml index c76ea7d24e..ca453e18f5 100644 --- a/docs/libs/tmpl/gstdplinint.sgml +++ b/docs/libs/tmpl/gstdplinint.sgml @@ -14,9 +14,6 @@ linear interpolation dynamic parameter - - - diff --git a/docs/libs/tmpl/gstdpman.sgml b/docs/libs/tmpl/gstdpman.sgml index 52ce531044..b6a4d43aee 100644 --- a/docs/libs/tmpl/gstdpman.sgml +++ b/docs/libs/tmpl/gstdpman.sgml @@ -6,7 +6,7 @@ dynamic parameter manager -The manager provides a set of functions to work with #GstElements and their #GstDParams. +The manager bings all functions to work with #GstElements and their #GstDParams. One can find out which dparams an element has, get the parameter specs and pick a control change rate. @@ -20,9 +20,6 @@ are for applications that use elements with dparams. - - - diff --git a/docs/libs/tmpl/gstdpsmooth.sgml b/docs/libs/tmpl/gstdpsmooth.sgml index 17dd2a5065..bfd5e8333e 100644 --- a/docs/libs/tmpl/gstdpsmooth.sgml +++ b/docs/libs/tmpl/gstdpsmooth.sgml @@ -14,9 +14,6 @@ realtime smoothed dynamic parameter - - - diff --git a/docs/pwg/building-pads.xml b/docs/pwg/building-pads.xml index d244ffdfc1..35c4b894e2 100644 --- a/docs/pwg/building-pads.xml +++ b/docs/pwg/building-pads.xml @@ -137,7 +137,7 @@ gst_my_filter_link (GstPad *pad, The getcaps function - The _getcaps () function is used to request the list + The _getcaps () funtion is used to request the list of supported formats and properties from the element. In some cases, this will be equal to the formats provided by the pad template, in which case this function can be omitted. In some cases, too, it will not depend on @@ -184,9 +184,8 @@ gst_my_filter_getcaps (GstPad *pad) Explicit caps - Obviously, many elements will not need the complex mechanism described in - the previous sections, because they are much simpler than that. - Such elements only support one format, or their format + Obviously, many elements will not need this complex mechanism, because they + are much simpler than that. They only support one format, or their format is fixed but the contents of the format depend on the stream or something else. In those cases, explicit caps are an easy way of handling caps. Explicit caps are an easy way of specifying one, fixed, diff --git a/docs/pwg/intro-basics.xml b/docs/pwg/intro-basics.xml index 18e8e02ce6..fc3c9b0095 100644 --- a/docs/pwg/intro-basics.xml +++ b/docs/pwg/intro-basics.xml @@ -279,8 +279,8 @@ included in . - - Table of Example Types +
+ Table of Basic Types diff --git a/docs/random/ensonic/dparams.txt b/docs/random/ensonic/dparams.txt index 9c24d27887..30742adbe6 100644 --- a/docs/random/ensonic/dparams.txt +++ b/docs/random/ensonic/dparams.txt @@ -1,10 +1,8 @@ $Id$ * cleanup of dparams - * library "namespace" - * even though it is long try to stick to the prefix "dparam" for the whole library - * e.g. avoid namespace clashes with "dataprotocol" which is using "dp" as well :-( - * use a new namespace "ctrl" for control + * even though it is long try to stick to the prefix "dparam" for the whole library + * e.g. avoid namespace clashes with "dataprotocol" which is using "dp" as well :-( * resolve g_return_if_fail() into GST_WARNING and return() in cases where the caller has to handle the problem * rename @@ -15,20 +13,13 @@ $Id$ dparam_mode_synchronous dparam_mode_asynchronous dparam_mode_disabled - * split dparam manager api (like e.g. GConf does it) - * plugin api : GstCtrlManagerServer - * application api : GstCtrlManagerClient - * remove "value-changed" signal from DParam? - * one can connect to e.g. "notify::value-double" as well - * dparam update callback needs to pass more info - * GstElement as the first arg - * GstDPram as the second arg + * split dparam manager api + * plugin api + * application api * documentation * state of unitconvert * state of sychronous params - * dpman_set/get_rate - if element_sampling_rate is 44100 and dpman_rate is 22050, dparams are updated twice a second * dparams ng * concept for global, voice params @@ -36,8 +27,4 @@ $Id$ different parameter sets (sound synthesizers, effects) * based on gobject params, so that e.g. the GUI can connect to "notify:param" events and update the GUI - * implement timelined dparams via queues - * the queue contains dparams and timestamps - * GST_DPARAM_DO_UPDATE() checks the head of the queue for events that are due now - and sets the values diff --git a/docs/random/ensonic/profiling.txt b/docs/random/ensonic/profiling.txt deleted file mode 100644 index d75e67d997..0000000000 --- a/docs/random/ensonic/profiling.txt +++ /dev/null @@ -1,26 +0,0 @@ -$Id$ - -Could schedulers do a little profiling? - -* scheduler keeps a list of usecs the process function of each element was - running -* process functions are: loop, chain, get -* scheduler keeps a sum of all times -* each gst-element has a profile_percentage field - -* when going to play - * scheduler sets sum and all usecs in the list to 0 -* when handling an element - * remember old usecs t_old - * take time t1 - * call elements processing function - * take time t2 - * t_new=t2-t1 - * sum+=(t_new-t_old) - * profile_percentage=t_new/sum; - * should the percentage be averaged? - * profile_percentage=(profile_percentage+(t_new/sum))/2.0; - -* the profile_percentage shows how much CPU time the element uses in relation - to the whole pipeline - diff --git a/gst/gstelementfactory.c b/gst/gstelementfactory.c index 85280992ed..14039f7cae 100644 --- a/gst/gstelementfactory.c +++ b/gst/gstelementfactory.c @@ -324,8 +324,7 @@ gst_element_factory_create (GstElementFactory * factory, const gchar * name) g_type_class_unref (oclass); - if (name) - gst_object_set_name (GST_OBJECT (element), name); + gst_object_set_name (GST_OBJECT (element), name); return element; } diff --git a/gst/gstinfo.c b/gst/gstinfo.c index ac1cd08346..616b81f14b 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -47,8 +47,6 @@ /* underscore is to prevent conflict with GST_CAT_DEBUG define */ GST_DEBUG_CATEGORY_STATIC (_GST_CAT_DEBUG); -/* time of initialization, so we get useful debugging output times */ -GstClockTime start_time; #if 0 #if defined __sgi__ @@ -205,15 +203,9 @@ __gst_in_valgrind (void) void _gst_debug_init (void) { - GTimeVal current; - gst_atomic_int_init (&__default_level, GST_LEVEL_DEFAULT); gst_atomic_int_init (&__use_color, 1); - /* get time we started for debugging messages */ - g_get_current_time (¤t); - start_time = GST_TIMEVAL_TO_TIME (current); - #ifdef HAVE_PRINTF_EXTENSION register_printf_function (GST_PTR_FORMAT[0], _gst_info_printf_extension, _gst_info_printf_extension_arginfo); @@ -502,7 +494,6 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level, gchar *pidcolor; gint pid; GTimeVal now; - GstClockTime elapsed; if (level > gst_debug_category_get_threshold (category)) return; @@ -525,11 +516,10 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level, obj = object ? gst_debug_print_object (object) : g_strdup (""); g_get_current_time (&now); - elapsed = GST_TIMEVAL_TO_TIME (now) - start_time; g_printerr ("%s (%p - %" GST_TIME_FORMAT ") %s%15s%s(%s%5d%s) %s%s(%d):%s:%s%s %s\n", gst_debug_level_get_name (level), g_thread_self (), - GST_TIME_ARGS (elapsed), color, + GST_TIME_ARGS (GST_TIMEVAL_TO_TIME (now)), color, gst_debug_category_get_name (category), clear, pidcolor, pid, clear, color, file, line, function, obj, clear, gst_debug_message_get (message)); diff --git a/gst/gstobject.c b/gst/gstobject.c index 46fc246489..62396d7cd9 100644 --- a/gst/gstobject.c +++ b/gst/gstobject.c @@ -72,7 +72,7 @@ static guint gst_signal_object_signals[SO_LAST_SIGNAL] = { 0 }; #endif static void gst_object_class_init (GstObjectClass * klass); -static void gst_object_init (GTypeInstance * instance, gpointer g_class); +static void gst_object_init (GstObject * object); #ifndef GST_DISABLE_TRACE static GObject *gst_object_constructor (GType type, @@ -89,9 +89,6 @@ static void gst_object_dispatch_properties_changed (GObject * object, static void gst_object_dispose (GObject * object); static void gst_object_finalize (GObject * object); -static void gst_object_set_name_default (GstObject * object, - const gchar * type_name); - #ifndef GST_DISABLE_LOADSAVE_REGISTRY static void gst_object_real_restore_thyself (GstObject * object, xmlNodePtr self); @@ -113,7 +110,7 @@ gst_object_get_type (void) NULL, sizeof (GstObject), 0, - gst_object_init, + (GInstanceInitFunc) gst_object_init, NULL }; @@ -180,14 +177,11 @@ gst_object_class_init (GstObjectClass * klass) } static void -gst_object_init (GTypeInstance * instance, gpointer g_class) +gst_object_init (GstObject * object) { - GstObject *object = GST_OBJECT (instance); - object->lock = g_mutex_new (); object->parent = NULL; object->name = NULL; - gst_object_set_name_default (object, G_OBJECT_CLASS_NAME (g_class)); object->flags = 0; GST_FLAG_SET (object, GST_FLOATING); @@ -439,10 +433,13 @@ gst_object_default_deep_notify (GObject * object, GstObject * orig, } static void -gst_object_set_name_default (GstObject * object, const gchar * type_name) +gst_object_set_name_default (GstObject * object) { gint count; gchar *name, *tmp; + const gchar *type_name; + + type_name = G_OBJECT_TYPE_NAME (object); /* to ensure guaranteed uniqueness across threads, only one thread * may ever assign a name */ @@ -490,7 +487,7 @@ gst_object_set_name (GstObject * object, const gchar * name) if (name != NULL) object->name = g_strdup (name); else - gst_object_set_name_default (object, G_OBJECT_TYPE_NAME (object)); + gst_object_set_name_default (object); } /** diff --git a/gst/gstqueue.c b/gst/gstqueue.c index b9ade24055..23866344a8 100644 --- a/gst/gstqueue.c +++ b/gst/gstqueue.c @@ -657,7 +657,6 @@ restart: GstScheduler *sched; GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "interrupted"); - queue->interrupt = FALSE; GST_QUEUE_MUTEX_UNLOCK; sched = gst_pad_get_scheduler (queue->sinkpad); if (!sched || gst_scheduler_interrupt (sched, GST_ELEMENT (queue))) { @@ -784,7 +783,6 @@ restart: GstScheduler *sched; GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "interrupted"); - queue->interrupt = FALSE; GST_QUEUE_MUTEX_UNLOCK; sched = gst_pad_get_scheduler (queue->srcpad); if (!sched || gst_scheduler_interrupt (sched, GST_ELEMENT (queue))) diff --git a/gst/gsttaginterface.c b/gst/gsttaginterface.c index f6b792b6fe..339b6ba9c3 100644 --- a/gst/gsttaginterface.c +++ b/gst/gsttaginterface.c @@ -132,7 +132,7 @@ gst_tag_setter_merge (GstTagSetter * setter, const GstTagList * list, * @...: more tag / value pairs to set * * Adds the given tag / value pairs on the setter using the given merge mode. - * The list must be terminated with %NULL. + * The list must be terminated with GST_TAG_INVALID. */ void gst_tag_setter_add (GstTagSetter * setter, GstTagMergeMode mode, @@ -156,7 +156,7 @@ gst_tag_setter_add (GstTagSetter * setter, GstTagMergeMode mode, * @...: more tag / GValue pairs to set * * Adds the given tag / GValue pairs on the setter using the given merge mode. - * The list must be terminated with %NULL. + * The list must be terminated with GST_TAG_INVALID. */ void gst_tag_setter_add_values (GstTagSetter * setter, GstTagMergeMode mode, @@ -180,7 +180,7 @@ gst_tag_setter_add_values (GstTagSetter * setter, GstTagMergeMode mode, * @var_args: tag / value pairs to set * * Adds the given tag / value pairs on the setter using the given merge mode. - * The list must be terminated with %NULL. + * The list must be terminated with GST_TAG_INVALID. */ void gst_tag_setter_add_valist (GstTagSetter * setter, GstTagMergeMode mode, @@ -206,7 +206,7 @@ gst_tag_setter_add_valist (GstTagSetter * setter, GstTagMergeMode mode, * @var_args: tag / GValue pairs to set * * Adds the given tag / GValue pairs on the setter using the given merge mode. - * The list must be terminated with %NULL. + * The list must be terminated with GST_TAG_INVALID. */ void gst_tag_setter_add_valist_values (GstTagSetter * setter, GstTagMergeMode mode, diff --git a/gst/gsttagsetter.c b/gst/gsttagsetter.c index f6b792b6fe..339b6ba9c3 100644 --- a/gst/gsttagsetter.c +++ b/gst/gsttagsetter.c @@ -132,7 +132,7 @@ gst_tag_setter_merge (GstTagSetter * setter, const GstTagList * list, * @...: more tag / value pairs to set * * Adds the given tag / value pairs on the setter using the given merge mode. - * The list must be terminated with %NULL. + * The list must be terminated with GST_TAG_INVALID. */ void gst_tag_setter_add (GstTagSetter * setter, GstTagMergeMode mode, @@ -156,7 +156,7 @@ gst_tag_setter_add (GstTagSetter * setter, GstTagMergeMode mode, * @...: more tag / GValue pairs to set * * Adds the given tag / GValue pairs on the setter using the given merge mode. - * The list must be terminated with %NULL. + * The list must be terminated with GST_TAG_INVALID. */ void gst_tag_setter_add_values (GstTagSetter * setter, GstTagMergeMode mode, @@ -180,7 +180,7 @@ gst_tag_setter_add_values (GstTagSetter * setter, GstTagMergeMode mode, * @var_args: tag / value pairs to set * * Adds the given tag / value pairs on the setter using the given merge mode. - * The list must be terminated with %NULL. + * The list must be terminated with GST_TAG_INVALID. */ void gst_tag_setter_add_valist (GstTagSetter * setter, GstTagMergeMode mode, @@ -206,7 +206,7 @@ gst_tag_setter_add_valist (GstTagSetter * setter, GstTagMergeMode mode, * @var_args: tag / GValue pairs to set * * Adds the given tag / GValue pairs on the setter using the given merge mode. - * The list must be terminated with %NULL. + * The list must be terminated with GST_TAG_INVALID. */ void gst_tag_setter_add_valist_values (GstTagSetter * setter, GstTagMergeMode mode, diff --git a/gst/gstthread.c b/gst/gstthread.c index 3e87ef919f..fe7849aec1 100644 --- a/gst/gstthread.c +++ b/gst/gstthread.c @@ -419,7 +419,7 @@ gst_thread_change_state (GstElement * element) GstThread *thread; GstElementStateReturn ret; gint transition; - gboolean is_self, reverting = FALSE; + gboolean is_self; g_return_val_if_fail (GST_IS_THREAD (element), GST_STATE_FAILURE); @@ -432,9 +432,7 @@ gst_thread_change_state (GstElement * element) /* boolean to check if we called the state change in the same thread as * the iterate thread */ is_self = (thread == gst_thread_get_current ()); - transition = GST_STATE_TRANSITION (element); -revert: GST_LOG_OBJECT (thread, "grabbing lock"); g_mutex_lock (thread->lock); @@ -445,22 +443,20 @@ revert: /* do not try to grab the lock if this method is called from the * same thread as the iterate thread, the lock might be held and we * might deadlock */ - if (!is_self && !reverting) + if (!is_self) g_mutex_lock (thread->iterate_lock); - switch (transition) { - case GST_STATE_NULL_TO_READY:{ - GError *err = NULL; + transition = GST_STATE_TRANSITION (element); + switch (transition) { + case GST_STATE_NULL_TO_READY: /* create the thread */ GST_FLAG_UNSET (thread, GST_THREAD_STATE_REAPING); GST_LOG_OBJECT (element, "grabbing lock"); thread->thread_id = g_thread_create_full (gst_thread_main_loop, - thread, STACK_SIZE, FALSE, TRUE, thread->priority, &err); + thread, STACK_SIZE, FALSE, TRUE, thread->priority, NULL); if (!thread->thread_id) { - GST_ERROR_OBJECT (element, "g_thread_create_full failed: %s", - err->message); - g_error_free (err); + GST_ERROR_OBJECT (element, "g_thread_create_full failed"); goto error_out; } GST_LOG_OBJECT (element, "GThread created"); @@ -468,7 +464,6 @@ revert: /* wait for it to 'spin up' */ g_cond_wait (thread->cond, thread->lock); break; - } case GST_STATE_READY_TO_PAUSED: break; case GST_STATE_PAUSED_TO_PLAYING: @@ -534,15 +529,8 @@ revert: GST_LOG_OBJECT (thread, "unlocking lock"); g_mutex_unlock (thread->lock); - if (reverting) { - goto error_out_unlocked; - } else if (GST_ELEMENT_CLASS (parent_class)->change_state) { + if (GST_ELEMENT_CLASS (parent_class)->change_state) { ret = GST_ELEMENT_CLASS (parent_class)->change_state (GST_ELEMENT (thread)); - if (ret == GST_STATE_FAILURE) { - reverting = TRUE; - transition = ((transition & 0xff) << 8) | (transition >> 8); - goto revert; - } } else { ret = GST_STATE_SUCCESS; } @@ -570,7 +558,6 @@ error_out: g_mutex_unlock (thread->lock); -error_out_unlocked: if (!is_self) g_mutex_unlock (thread->iterate_lock); diff --git a/libs/gst/control/dparam.c b/libs/gst/control/dparam.c index 32b67c958c..df3c8c8672 100644 --- a/libs/gst/control/dparam.c +++ b/libs/gst/control/dparam.c @@ -321,7 +321,6 @@ void gst_dparam_attach (GstDParam * dparam, GstDParamManager * manager, GParamSpec * param_spec, gchar * unit_name) { - GValue value = { 0, }; g_return_if_fail (dparam != NULL); g_return_if_fail (GST_IS_DPARAM (dparam)); @@ -340,29 +339,6 @@ gst_dparam_attach (GstDParam * dparam, GstDParamManager * manager, GST_DPARAM_IS_LOG (dparam) = gst_unitconv_unit_is_logarithmic (unit_name); GST_DEBUG ("attaching %s to dparam %p", GST_DPARAM_NAME (dparam), dparam); - // get default value from param-spec and set in dparam - g_value_init (&value, param_spec->value_type); - g_param_value_set_default (param_spec, &value); - switch (G_PARAM_SPEC_VALUE_TYPE (param_spec)) { - case G_TYPE_FLOAT: - dparam->value_float = g_value_get_float (&value); - break; - - case G_TYPE_DOUBLE: - dparam->value_double = g_value_get_double (&value); - break; - - case G_TYPE_INT: - dparam->value_int = g_value_get_int (&value); - break; - - case G_TYPE_INT64: - dparam->value_int64 = g_value_get_int64 (&value); - break; - - default: - break; - } } /** diff --git a/libs/gst/control/dparammanager.c b/libs/gst/control/dparammanager.c index 60deb39168..15686dd44d 100644 --- a/libs/gst/control/dparammanager.c +++ b/libs/gst/control/dparammanager.c @@ -674,7 +674,7 @@ gst_dpman_bypass_dparam (GstDParamManager * dpman, const gchar * dparam_name) g_return_if_fail (dpwrap != NULL); if (dpwrap->dparam != NULL) { - GST_WARNING ("Bypassing attached dparam '%s'. It will be detached", + g_warning ("Bypassing attached dparam '%s'. It will be detached", dparam_name); gst_dpman_detach_dparam (dpman, dparam_name); } @@ -860,7 +860,7 @@ gst_dpman_preprocess_asynchronous (GstDParamManager * dpman, guint frames, if (GST_DPMAN_RATE (dpman) == 0) { - GST_WARNING ("The element hasn't given GstDParamManager a frame rate"); + g_warning ("The element hasn't given GstDParamManager a frame rate"); return FALSE; } dpman->rate_ratio = (guint) (1000000000LL / (gint64) GST_DPMAN_RATE (dpman)); @@ -975,14 +975,14 @@ gst_dpman_process_asynchronous (GstDParamManager * dpman, guint frame_count) GST_DEBUG ("in gst_dpman_process_asynchronous"); if (frame_count >= dpman->num_frames) { - GST_WARNING ("there is no more buffer to process"); + g_warning ("there is no more buffer to process"); dpman->next_update_frame = dpman->num_frames; dpman->frames_to_process = 0; return FALSE; } if (frame_count != dpwrap->next_update_frame) { - GST_WARNING ("frame count %u does not match update frame %u", + g_warning ("frame count %u does not match update frame %u", frame_count, dpwrap->next_update_frame); } @@ -1065,7 +1065,7 @@ gst_dpman_preprocess_noop (GstDParamManager * dpman, guint frames, static gboolean gst_dpman_process_noop (GstDParamManager * dpman, guint frame_count) { - GST_WARNING + g_warning ("gst_dpman_process_noop should never be called - something might be wrong with your processing loop"); return FALSE; } diff --git a/libs/gst/control/dparammanager.h b/libs/gst/control/dparammanager.h index c5ee0be398..7707e624f7 100644 --- a/libs/gst/control/dparammanager.h +++ b/libs/gst/control/dparammanager.h @@ -134,9 +134,6 @@ struct _GstDParamAsyncToUpdate { (dpman->next_update_frame < dpman->num_frames \ && (GST_DPMAN_PROCESSFUNC(dpman)(dpman, frame_count)))) -/* FIXME: this should pass dpwrap->dparam as the first arg - * the first arg in callback is usually object that triggered the callback - */ #define GST_DPMAN_CALLBACK_UPDATE(dpwrap, value) ((dpwrap->update_func)(value, dpwrap->update_data)) void _gst_dpman_initialize(void); diff --git a/libs/gst/dataprotocol/dataprotocol.c b/libs/gst/dataprotocol/dataprotocol.c index 645d7574a7..27512987ea 100644 --- a/libs/gst/dataprotocol/dataprotocol.c +++ b/libs/gst/dataprotocol/dataprotocol.c @@ -83,7 +83,7 @@ gst_dp_dump_byte_array (guint8 * array, guint length) { int i; int n = 8; /* number of bytes per line */ - gchar *line = g_malloc (3 * n + 1); + gchar *line = g_malloc (3 * n); GST_LOG ("dumping byte array of length %d", length); for (i = 0; i < length; ++i) { diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index b9ade24055..23866344a8 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -657,7 +657,6 @@ restart: GstScheduler *sched; GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "interrupted"); - queue->interrupt = FALSE; GST_QUEUE_MUTEX_UNLOCK; sched = gst_pad_get_scheduler (queue->sinkpad); if (!sched || gst_scheduler_interrupt (sched, GST_ELEMENT (queue))) { @@ -784,7 +783,6 @@ restart: GstScheduler *sched; GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "interrupted"); - queue->interrupt = FALSE; GST_QUEUE_MUTEX_UNLOCK; sched = gst_pad_get_scheduler (queue->srcpad); if (!sched || gst_scheduler_interrupt (sched, GST_ELEMENT (queue))) diff --git a/tools/gst-launch.1.in b/tools/gst-launch.1.in index d605bbf20b..21c2cf2c28 100644 --- a/tools/gst-launch.1.in +++ b/tools/gst-launch.1.in @@ -23,7 +23,7 @@ For a complete description of possible PIPELINE-DESCRIPTIONS see above under .B \-\-help Print help synopsis and available FLAGS .TP 8 -.B \-v, \-\-verbose +.B \-v, \-\-silent Output status information .TP 8 .B \-XTYPE, \-\-exclude=TYPE,