Commit b0346dff authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Define G_PARAM_STATIC_STRINGS if it's undefined (GLib < 2.13.0) and use it...

Define G_PARAM_STATIC_STRINGS if it's undefined (GLib < 2.13.0) and use it everywhere for GParamSpecs that use static...

Original commit message from CVS:
* docs/pwg/advanced-dparams.xml:
* docs/pwg/building-props.xml:
* docs/pwg/other-source.xml:
* gst/glib-compat.h:
* gst/gstbin.c: (gst_bin_class_init):
* gst/gstclock.c: (gst_clock_class_init):
* gst/gstindex.c: (gst_index_class_init):
* gst/gstobject.c: (gst_object_class_init):
* gst/gstpad.c: (gst_pad_class_init):
* gst/gstpipeline.c: (gst_pipeline_class_init):
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init):
* libs/gst/base/gstbasesrc.c: (gst_base_src_class_init):
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_class_init):
* libs/gst/base/gstdataqueue.c: (gst_data_queue_class_init):
* libs/gst/check/gstcheck.c: (_gst_check_fault_handler_restore),
(_gst_check_fault_handler_sighandler),
(_gst_check_fault_handler_setup), (gst_check_init):
* libs/gst/controller/gstcontroller.c:
(_gst_controller_class_init):
* libs/gst/controller/gstlfocontrolsource.c:
(gst_lfo_control_source_class_init):
* libs/gst/net/gstnetclientclock.c:
(gst_net_client_clock_class_init):
* libs/gst/net/gstnettimeprovider.c:
(gst_net_time_provider_class_init):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_class_init):
* plugins/elements/gstfakesink.c: (gst_fake_sink_class_init):
* plugins/elements/gstfakesrc.c: (gst_fake_src_class_init):
* plugins/elements/gstfdsink.c: (gst_fd_sink_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_class_init):
* plugins/elements/gstfilesink.c: (gst_file_sink_class_init):
* plugins/elements/gstfilesrc.c: (gst_file_src_class_init):
* plugins/elements/gstidentity.c: (gst_identity_class_init):
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_class_init):
* plugins/elements/gstqueue.c: (gst_queue_class_init):
* plugins/elements/gsttee.c: (gst_tee_class_init):
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_class_init):
* plugins/indexers/gstfileindex.c: (gst_file_index_class_init):
Define G_PARAM_STATIC_STRINGS if it's undefined (GLib < 2.13.0) and
use it everywhere for GParamSpecs that use static strings (i.e. all).
This gives us less memory usage, fewer allocations and thus less
memory defragmentation. Fixes bug #523806.
parent 7fe1bca9
2008-03-22 Sebastian Dröge <slomo@circular-chaos.org>
* docs/pwg/advanced-dparams.xml:
* docs/pwg/building-props.xml:
* docs/pwg/other-source.xml:
* gst/glib-compat.h:
* gst/gstbin.c: (gst_bin_class_init):
* gst/gstclock.c: (gst_clock_class_init):
* gst/gstindex.c: (gst_index_class_init):
* gst/gstobject.c: (gst_object_class_init):
* gst/gstpad.c: (gst_pad_class_init):
* gst/gstpipeline.c: (gst_pipeline_class_init):
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init):
* libs/gst/base/gstbasesrc.c: (gst_base_src_class_init):
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_class_init):
* libs/gst/base/gstdataqueue.c: (gst_data_queue_class_init):
* libs/gst/check/gstcheck.c: (_gst_check_fault_handler_restore),
(_gst_check_fault_handler_sighandler),
(_gst_check_fault_handler_setup), (gst_check_init):
* libs/gst/controller/gstcontroller.c:
(_gst_controller_class_init):
* libs/gst/controller/gstlfocontrolsource.c:
(gst_lfo_control_source_class_init):
* libs/gst/net/gstnetclientclock.c:
(gst_net_client_clock_class_init):
* libs/gst/net/gstnettimeprovider.c:
(gst_net_time_provider_class_init):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_class_init):
* plugins/elements/gstfakesink.c: (gst_fake_sink_class_init):
* plugins/elements/gstfakesrc.c: (gst_fake_src_class_init):
* plugins/elements/gstfdsink.c: (gst_fd_sink_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_class_init):
* plugins/elements/gstfilesink.c: (gst_file_sink_class_init):
* plugins/elements/gstfilesrc.c: (gst_file_src_class_init):
* plugins/elements/gstidentity.c: (gst_identity_class_init):
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_class_init):
* plugins/elements/gstqueue.c: (gst_queue_class_init):
* plugins/elements/gsttee.c: (gst_tee_class_init):
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_class_init):
* plugins/indexers/gstfileindex.c: (gst_file_index_class_init):
Define G_PARAM_STATIC_STRINGS if it's undefined (GLib < 2.13.0) and
use it everywhere for GParamSpecs that use static strings (i.e. all).
This gives us less memory usage, fewer allocations and thus less
memory defragmentation. Fixes bug #523806.
2008-03-22 Sebastian Dröge <slomo@circular-chaos.org>
* gst/gstminiobject.c: (gst_value_dup_mini_object),
......
......@@ -51,7 +51,7 @@
g_object_class_install_property (gobject_class, PROP_FREQ,
g_param_spec_double ("freq", "Frequency", "Frequency of test signal",
0.0, 20000.0, 440.0,
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE));
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
</programlisting>
</sect1>
......
......@@ -50,7 +50,7 @@ gst_my_filter_class_init (GstMyFilterClass *klass)
g_object_class_install_property (object_class, ARG_SILENT,
g_param_spec_boolean ("silent", "Silent",
"Whether to be very verbose or not",
FALSE, G_PARAM_READWRITE));
FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* define virtual function pointers */
object_class->set_property = gst_my_filter_set_property;
......@@ -153,7 +153,8 @@ gst_videotestsrc_class_init (GstvideotestsrcClass *klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_TYPE,
g_param_spec_enum ("pattern", "Pattern",
"Type of test pattern to generate",
GST_TYPE_VIDEOTESTSRC_PATTERN, 1, G_PARAM_READWRITE));
GST_TYPE_VIDEOTESTSRC_PATTERN, 1, G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
[..]
}
</programlisting>
......
......@@ -357,7 +357,8 @@ gst_my_source_class_init (GstMySourceClass *klass)
[..]
g_object_class_install_property (object_class, ARG_SYNC,
g_param_spec_boolean ("sync", "Sync", "Synchronize to clock",
FALSE, G_PARAM_READWRITE));
FALSE, G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
[..]
}
......
......@@ -32,6 +32,11 @@
G_BEGIN_DECLS
/* FIXME: Remove this once we depend on GLib >= 2.13.0 */
#ifndef G_PARAM_STATIC_STRINGS
#define G_PARAM_STATIC_STRINGS (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)
#endif
G_END_DECLS
#endif /* __GST_GLIB_COMPAT_H__ */
......@@ -402,7 +402,7 @@ gst_bin_class_init (GstBinClass * klass)
g_object_class_install_property (gobject_class, PROP_ASYNC_HANDLING,
g_param_spec_boolean ("async-handling", "Async Handling",
"The bin will handle Asynchronous state changes",
DEFAULT_ASYNC_HANDLING, G_PARAM_READWRITE));
DEFAULT_ASYNC_HANDLING, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstBin::element-added:
......
......@@ -600,19 +600,21 @@ gst_clock_class_init (GstClockClass * klass)
g_object_class_install_property (gobject_class, PROP_STATS,
g_param_spec_boolean ("stats", "Stats",
"Enable clock stats (unimplemented)", DEFAULT_STATS,
G_PARAM_READWRITE));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_WINDOW_SIZE,
g_param_spec_int ("window-size", "Window size",
"The size of the window used to calculate rate and offset", 2, 1024,
DEFAULT_WINDOW_SIZE, G_PARAM_READWRITE));
DEFAULT_WINDOW_SIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_WINDOW_THRESHOLD,
g_param_spec_int ("window-threshold", "Window threshold",
"The threshold to start calculating rate and offset", 2, 1024,
DEFAULT_WINDOW_THRESHOLD, G_PARAM_READWRITE));
DEFAULT_WINDOW_THRESHOLD,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_TIMEOUT,
g_param_spec_uint64 ("timeout", "Timeout",
"The amount of time, in nanoseconds, to sample master and slave clocks",
0, G_MAXUINT64, DEFAULT_TIMEOUT, G_PARAM_READWRITE));
0, G_MAXUINT64, DEFAULT_TIMEOUT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}
static void
......
......@@ -177,7 +177,8 @@ gst_index_class_init (GstIndexClass * klass)
g_object_class_install_property (gobject_class, ARG_RESOLVER,
g_param_spec_enum ("resolver", "Resolver",
"Select a predefined object to string mapper",
GST_TYPE_INDEX_RESOLVER, GST_INDEX_RESOLVER_PATH, G_PARAM_READWRITE));
GST_TYPE_INDEX_RESOLVER, GST_INDEX_RESOLVER_PATH,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}
static void
......
......@@ -205,7 +205,8 @@ gst_object_class_init (GstObjectClass * klass)
g_object_class_install_property (gobject_class, ARG_NAME,
g_param_spec_string ("name", "Name", "The name of the object",
NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
NULL,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
/**
* GstObject::parent-set:
......
......@@ -308,16 +308,16 @@ gst_pad_class_init (GstPadClass * klass)
g_object_class_install_property (gobject_class, PAD_PROP_CAPS,
g_param_spec_boxed ("caps", "Caps", "The capabilities of the pad",
GST_TYPE_CAPS, G_PARAM_READABLE));
GST_TYPE_CAPS, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PAD_PROP_DIRECTION,
g_param_spec_enum ("direction", "Direction", "The direction of the pad",
GST_TYPE_PAD_DIRECTION, GST_PAD_UNKNOWN,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
/* FIXME, Make G_PARAM_CONSTRUCT_ONLY when we fix ghostpads. */
g_object_class_install_property (gobject_class, PAD_PROP_TEMPLATE,
g_param_spec_object ("template", "Template",
"The GstPadTemplate of this pad", GST_TYPE_PAD_TEMPLATE,
G_PARAM_READWRITE));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
#ifndef GST_DISABLE_LOADSAVE
gstobject_class->save_thyself = GST_DEBUG_FUNCPTR (gst_pad_save_thyself);
......
......@@ -209,7 +209,7 @@ gst_pipeline_class_init (gpointer g_class, gpointer class_data)
g_param_spec_uint64 ("delay", "Delay",
"Expected delay needed for elements "
"to spin up to PLAYING in nanoseconds", 0, G_MAXUINT64, DEFAULT_DELAY,
G_PARAM_READWRITE));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstPipeline:auto-flush-bus:
......@@ -224,7 +224,7 @@ gst_pipeline_class_init (gpointer g_class, gpointer class_data)
g_param_spec_boolean ("auto-flush-bus", "Auto Flush Bus",
"Whether to automatically flush the pipeline's bus when going "
"from READY into NULL state", DEFAULT_AUTO_FLUSH_BUS,
G_PARAM_READWRITE));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_pipeline_dispose);
......
......@@ -340,22 +340,23 @@ gst_base_sink_class_init (GstBaseSinkClass * klass)
g_object_class_install_property (gobject_class, PROP_PREROLL_QUEUE_LEN,
g_param_spec_uint ("preroll-queue-len", "Preroll queue length",
"Number of buffers to queue during preroll", 0, G_MAXUINT,
DEFAULT_PREROLL_QUEUE_LEN, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
DEFAULT_PREROLL_QUEUE_LEN,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SYNC,
g_param_spec_boolean ("sync", "Sync", "Sync on the clock", DEFAULT_SYNC,
G_PARAM_READWRITE));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_MAX_LATENESS,
g_param_spec_int64 ("max-lateness", "Max Lateness",
"Maximum number of nanoseconds that a buffer can be late before it "
"is dropped (-1 unlimited)", -1, G_MAXINT64, DEFAULT_MAX_LATENESS,
G_PARAM_READWRITE));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_QOS,
g_param_spec_boolean ("qos", "Qos",
"Generate Quality-of-Service events upstream", DEFAULT_QOS,
G_PARAM_READWRITE));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstBaseSink:async
*
......@@ -368,7 +369,8 @@ gst_base_sink_class_init (GstBaseSinkClass * klass)
*/
g_object_class_install_property (gobject_class, PROP_ASYNC,
g_param_spec_boolean ("async", "Async",
"Go asynchronously to PAUSED", DEFAULT_ASYNC, G_PARAM_READWRITE));
"Go asynchronously to PAUSED", DEFAULT_ASYNC,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstBaseSink:ts-offset
*
......@@ -381,7 +383,7 @@ gst_base_sink_class_init (GstBaseSinkClass * klass)
g_object_class_install_property (gobject_class, PROP_TS_OFFSET,
g_param_spec_int64 ("ts-offset", "TS Offset",
"Timestamp offset in nanoseconds", G_MININT64, G_MAXINT64,
DEFAULT_TS_OFFSET, G_PARAM_READWRITE));
DEFAULT_TS_OFFSET, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstBaseSink:last-buffer
......@@ -395,7 +397,7 @@ gst_base_sink_class_init (GstBaseSinkClass * klass)
g_object_class_install_property (gobject_class, PROP_LAST_BUFFER,
gst_param_spec_mini_object ("last-buffer", "Last Buffer",
"The last buffer received in the sink", GST_TYPE_BUFFER,
G_PARAM_READABLE));
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_base_sink_change_state);
......
......@@ -345,19 +345,19 @@ gst_base_src_class_init (GstBaseSrcClass * klass)
g_object_class_install_property (gobject_class, PROP_BLOCKSIZE,
g_param_spec_ulong ("blocksize", "Block size",
"Size in bytes to read per buffer (0 = default)", 0, G_MAXULONG,
DEFAULT_BLOCKSIZE, G_PARAM_READWRITE));
DEFAULT_BLOCKSIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_NUM_BUFFERS,
g_param_spec_int ("num-buffers", "num-buffers",
"Number of buffers to output before sending EOS", -1, G_MAXINT,
DEFAULT_NUM_BUFFERS, G_PARAM_READWRITE));
DEFAULT_NUM_BUFFERS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_TYPEFIND,
g_param_spec_boolean ("typefind", "Typefind",
"Run typefind before negotiating", DEFAULT_TYPEFIND,
G_PARAM_READWRITE));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_DO_TIMESTAMP,
g_param_spec_boolean ("do-timestamp", "Do timestamp",
"Apply current stream time to buffers", DEFAULT_DO_TIMESTAMP,
G_PARAM_READWRITE));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_base_src_change_state);
......
......@@ -335,7 +335,7 @@ gst_base_transform_class_init (GstBaseTransformClass * klass)
g_object_class_install_property (gobject_class, PROP_QOS,
g_param_spec_boolean ("qos", "QoS", "Handle Quality-of-Service events",
DEFAULT_PROP_QOS, G_PARAM_READWRITE));
DEFAULT_PROP_QOS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_base_transform_finalize);
......
......@@ -172,16 +172,16 @@ gst_data_queue_class_init (GstDataQueueClass * klass)
g_object_class_install_property (gobject_class, ARG_CUR_LEVEL_BYTES,
g_param_spec_uint ("current-level-bytes", "Current level (kB)",
"Current amount of data in the queue (bytes)",
0, G_MAXUINT, 0, G_PARAM_READABLE));
0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_CUR_LEVEL_VISIBLE,
g_param_spec_uint ("current-level-visible",
"Current level (visible items)",
"Current number of visible items in the queue", 0, G_MAXUINT, 0,
G_PARAM_READABLE));
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_CUR_LEVEL_TIME,
g_param_spec_uint64 ("current-level-time", "Current level (ns)",
"Current amount of data in the queue (in ns)", 0, G_MAXUINT64, 0,
G_PARAM_READABLE));
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/* set several parent class virtual functions */
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_data_queue_finalize);
......
......@@ -28,6 +28,10 @@
* inside the 'check' directories of various GStreamer packages.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstcheck.h"
GST_DEBUG_CATEGORY (check_debug);
......@@ -82,6 +86,88 @@ static void gst_check_log_critical_func
_gst_check_raised_warning = TRUE;
}
#if defined(G_OS_UNIX) && defined(HAVE_EXECINFO_H)
#include <signal.h>
#include <execinfo.h>
#include <unistd.h>
static struct sigaction oldaction_segv;
static struct sigaction oldaction_ill;
static struct sigaction oldaction_bus;
static struct sigaction oldaction_abrt;
static gboolean _gst_check_fault_handler_is_setup; /* FALSE */
static void
_gst_check_fault_handler_restore (void)
{
if (!_gst_check_fault_handler_is_setup)
return;
_gst_check_fault_handler_is_setup = FALSE;
sigaction (SIGSEGV, &oldaction_segv, NULL);
sigaction (SIGILL, &oldaction_ill, NULL);
sigaction (SIGBUS, &oldaction_bus, NULL);
sigaction (SIGABRT, &oldaction_abrt, NULL);
}
static void
_gst_check_fault_handler_sighandler (int signum)
{
void *bt_arr[100];
int num;
char *signame;
/* We need to restore the fault handler or we'll keep getting it */
_gst_check_fault_handler_restore ();
switch (signum) {
case SIGSEGV:
signame = "SIGSEGV";
break;
case SIGILL:
signame = "SIGILL";
break;
case SIGBUS:
signame = "SIGBUS";
break;
case SIGABRT:
signame = "SIGABRT";
break;
default:
signame = "Unknown Signal";
break;
}
fprintf (stderr, "\nERROR: Caught signal '%s' while running test.\n",
signame);
fprintf (stderr, "Backtrace:\n");
if ((num = backtrace ((void **) bt_arr, G_N_ELEMENTS (bt_arr))))
backtrace_symbols_fd (bt_arr, num, STDERR_FILENO);
}
static void
_gst_check_fault_handler_setup (void)
{
struct sigaction action;
if (_gst_check_fault_handler_is_setup)
return;
_gst_check_fault_handler_is_setup = TRUE;
memset (&action, 0, sizeof (action));
action.sa_handler = _gst_check_fault_handler_sighandler;
sigaction (SIGSEGV, &action, &oldaction_segv);
sigaction (SIGILL, &action, &oldaction_ill);
sigaction (SIGBUS, &action, &oldaction_bus);
sigaction (SIGABRT, &action, &oldaction_abrt);
}
#endif /* G_OS_UNIX && HAVE_EXECINFO_H */
/* initialize GStreamer testing */
void
gst_check_init (int *argc, char **argv[])
......@@ -106,6 +192,10 @@ gst_check_init (int *argc, char **argv[])
check_cond = g_cond_new ();
check_mutex = g_mutex_new ();
#if defined(G_OS_UNIX) && defined(HAVE_EXECINFO_H)
_gst_check_fault_handler_setup ();
#endif
}
/* message checking */
......
......@@ -917,7 +917,8 @@ _gst_controller_class_init (GstControllerClass * klass)
g_param_spec_uint64 ("control-rate",
"control rate",
"Controlled properties will be updated at least every control-rate nanoseconds",
1, G_MAXUINT, 100 * GST_MSECOND, G_PARAM_READWRITE));
1, G_MAXUINT, 100 * GST_MSECOND,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* register signals */
/* set defaults for overridable methods */
......
......@@ -1026,7 +1026,8 @@ gst_lfo_control_source_class_init (GstLFOControlSourceClass * klass)
**/
g_object_class_install_property (gobject_class, PROP_WAVEFORM,
g_param_spec_enum ("waveform", "Waveform", "Waveform",
GST_TYPE_LFO_WAVEFORM, GST_LFO_WAVEFORM_SINE, G_PARAM_READWRITE));
GST_TYPE_LFO_WAVEFORM, GST_LFO_WAVEFORM_SINE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstLFOControlSource:frequency
......@@ -1039,7 +1040,7 @@ gst_lfo_control_source_class_init (GstLFOControlSourceClass * klass)
g_object_class_install_property (gobject_class, PROP_FREQUENCY,
g_param_spec_double ("frequency", "Frequency",
"Frequency of the waveform", 0.0, G_MAXDOUBLE, 1.0,
G_PARAM_READWRITE));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstLFOControlSource:timeshift
......@@ -1054,7 +1055,7 @@ gst_lfo_control_source_class_init (GstLFOControlSourceClass * klass)
g_object_class_install_property (gobject_class, PROP_TIMESHIFT,
g_param_spec_uint64 ("timeshift", "Timeshift",
"Timeshift of the waveform to the right", 0, G_MAXUINT64, 0,
G_PARAM_READWRITE));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstLFOControlSource:amplitude
......@@ -1066,7 +1067,7 @@ gst_lfo_control_source_class_init (GstLFOControlSourceClass * klass)
**/
g_object_class_install_property (gobject_class, PROP_AMPLITUDE,
g_param_spec_boxed ("amplitude", "Amplitude", "Amplitude of the waveform",
G_TYPE_VALUE, G_PARAM_READWRITE));
G_TYPE_VALUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstLFOControlSource:offset
......@@ -1078,5 +1079,5 @@ gst_lfo_control_source_class_init (GstLFOControlSourceClass * klass)
**/
g_object_class_install_property (gobject_class, PROP_OFFSET,
g_param_spec_boxed ("offset", "Offset", "Offset of the waveform",
G_TYPE_VALUE, G_PARAM_READWRITE));
G_TYPE_VALUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}
......@@ -139,11 +139,12 @@ gst_net_client_clock_class_init (GstNetClientClockClass * klass)
g_object_class_install_property (gobject_class, PROP_ADDRESS,
g_param_spec_string ("address", "address",
"The address of the machine providing a time server, "
"as a dotted quad (x.x.x.x)", DEFAULT_ADDRESS, G_PARAM_READWRITE));
"as a dotted quad (x.x.x.x)", DEFAULT_ADDRESS,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PORT,
g_param_spec_int ("port", "port",
"The port on which the remote server is listening", 0, G_MAXUINT16,
DEFAULT_PORT, G_PARAM_READWRITE));
DEFAULT_PORT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}
static void
......
......@@ -147,19 +147,19 @@ gst_net_time_provider_class_init (GstNetTimeProviderClass * klass)
g_object_class_install_property (gobject_class, PROP_PORT,
g_param_spec_int ("port", "port",
"The port to receive the packets from, 0=allocate", 0, G_MAXUINT16,
DEFAULT_PORT, G_PARAM_READWRITE));
DEFAULT_PORT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_ADDRESS,
g_param_spec_string ("address", "address",
"The address to bind on, as a dotted quad (x.x.x.x)",
DEFAULT_ADDRESS, G_PARAM_READWRITE));
DEFAULT_ADDRESS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_CLOCK,
g_param_spec_object ("clock", "Clock",
"The clock to export over the network", GST_TYPE_CLOCK,
G_PARAM_READWRITE));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_ACTIVE,
g_param_spec_boolean ("active", "Active",
"TRUE if the clock will respond to queries over the network", TRUE,
G_PARAM_READWRITE));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}
static void
......
......@@ -109,7 +109,8 @@ gst_capsfilter_class_init (GstCapsFilterClass * klass)
g_param_spec_boxed ("caps", _("Filter caps"),
_("Restrict the possible allowed capabilities (NULL means ANY). "
"Setting this property takes a reference to the supplied GstCaps "
"object."), GST_TYPE_CAPS, G_PARAM_READWRITE));
"object."), GST_TYPE_CAPS,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
trans_class = GST_BASE_TRANSFORM_CLASS (klass);
trans_class->transform_caps = gst_capsfilter_transform_caps;
......
......@@ -157,38 +157,38 @@ gst_fake_sink_class_init (GstFakeSinkClass * klass)
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_fake_sink_get_property);
g_object_class_install_property (gobject_class, PROP_STATE_ERROR,
g_param_spec_enum ("state_error", "State Error",
g_param_spec_enum ("state-error", "State Error",
"Generate a state change error", GST_TYPE_FAKE_SINK_STATE_ERROR,
DEFAULT_STATE_ERROR, G_PARAM_READWRITE));
DEFAULT_STATE_ERROR, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_LAST_MESSAGE,
g_param_spec_string ("last_message", "Last Message",
g_param_spec_string ("last-message", "Last Message",
"The message describing current status", DEFAULT_LAST_MESSAGE,
G_PARAM_READABLE));
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SIGNAL_HANDOFFS,
g_param_spec_boolean ("signal-handoffs", "Signal handoffs",
"Send a signal before unreffing the buffer", DEFAULT_SIGNAL_HANDOFFS,
G_PARAM_READWRITE));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SILENT,
g_param_spec_boolean ("silent", "Silent",
"Don't produce last_message events", DEFAULT_SILENT,
G_PARAM_READWRITE));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_DUMP,
g_param_spec_boolean ("dump", "Dump", "Dump buffer contents to stdout",
DEFAULT_DUMP, G_PARAM_READWRITE));
DEFAULT_DUMP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_CAN_ACTIVATE_PUSH,
g_param_spec_boolean ("can-activate-push", "Can activate push",
"Can activate in push mode", DEFAULT_CAN_ACTIVATE_PUSH,
G_PARAM_READWRITE));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_CAN_ACTIVATE_PULL,
g_param_spec_boolean ("can-activate-pull", "Can activate pull",
"Can activate in pull mode", DEFAULT_CAN_ACTIVATE_PULL,
G_PARAM_READWRITE));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_NUM_BUFFERS,
g_param_spec_int ("num-buffers", "num-buffers",
"Number of buffers to accept going EOS", -1, G_MAXINT,
DEFAULT_NUM_BUFFERS, G_PARAM_READWRITE));
DEFAULT_NUM_BUFFERS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstFakeSink::handoff:
......
......@@ -265,63 +265,66 @@ gst_fake_src_class_init (GstFakeSrcClass * klass)
*/
g_object_class_install_property (gobject_class, PROP_DATA,
g_param_spec_enum ("data", "data", "Data allocation method",
GST_TYPE_FAKE_SRC_DATA, DEFAULT_DATA, G_PARAM_READWRITE));
GST_TYPE_FAKE_SRC_DATA, DEFAULT_DATA,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SIZETYPE,
g_param_spec_enum ("sizetype", "sizetype",
"How to determine buffer sizes", GST_TYPE_FAKE_SRC_SIZETYPE,
DEFAULT_SIZETYPE, G_PARAM_READWRITE));
DEFAULT_SIZETYPE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SIZEMIN,
g_param_spec_int ("sizemin", "sizemin", "Minimum buffer size", 0,
G_MAXINT, DEFAULT_SIZEMIN, G_PARAM_READWRITE));
G_MAXINT, DEFAULT_SIZEMIN,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SIZEMAX,
g_param_spec_int ("sizemax", "sizemax", "Maximum buffer size", 0,
G_MAXINT, DEFAULT_SIZEMAX, G_PARAM_READWRITE));
G_MAXINT, DEFAULT_SIZEMAX,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PARENTSIZE,
g_param_spec_int ("parentsize", "parentsize",
"Size of parent buffer for sub-buffered allocation", 0, G_MAXINT,
DEFAULT_PARENTSIZE, G_PARAM_READWRITE));
DEFAULT_PARENTSIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_FILLTYPE,
g_param_spec_enum ("filltype", "filltype",
"How to fill the buffer, if at all", GST_TYPE_FAKE_SRC_FILLTYPE,
DEFAULT_FILLTYPE, G_PARAM_READWRITE));
DEFAULT_FILLTYPE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_DATARATE,