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.
This commit is contained in:
Sebastian Dröge 2008-03-22 14:56:17 +00:00
parent 7fe1bca96a
commit b0346dff44
33 changed files with 311 additions and 134 deletions

View file

@ -1,3 +1,50 @@
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> 2008-03-22 Sebastian Dröge <slomo@circular-chaos.org>
* gst/gstminiobject.c: (gst_value_dup_mini_object), * gst/gstminiobject.c: (gst_value_dup_mini_object),

View file

@ -51,7 +51,7 @@
g_object_class_install_property (gobject_class, PROP_FREQ, g_object_class_install_property (gobject_class, PROP_FREQ,
g_param_spec_double ("freq", "Frequency", "Frequency of test signal", g_param_spec_double ("freq", "Frequency", "Frequency of test signal",
0.0, 20000.0, 440.0, 0.0, 20000.0, 440.0,
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE)); G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
</programlisting> </programlisting>
</sect1> </sect1>

View file

@ -50,7 +50,7 @@ gst_my_filter_class_init (GstMyFilterClass *klass)
g_object_class_install_property (object_class, ARG_SILENT, g_object_class_install_property (object_class, ARG_SILENT,
g_param_spec_boolean ("silent", "Silent", g_param_spec_boolean ("silent", "Silent",
"Whether to be very verbose or not", "Whether to be very verbose or not",
FALSE, G_PARAM_READWRITE)); FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* define virtual function pointers */ /* define virtual function pointers */
object_class->set_property = gst_my_filter_set_property; 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_object_class_install_property (G_OBJECT_CLASS (klass), ARG_TYPE,
g_param_spec_enum ("pattern", "Pattern", g_param_spec_enum ("pattern", "Pattern",
"Type of test pattern to generate", "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> </programlisting>

View file

@ -357,7 +357,8 @@ gst_my_source_class_init (GstMySourceClass *klass)
[..] [..]
g_object_class_install_property (object_class, ARG_SYNC, g_object_class_install_property (object_class, ARG_SYNC,
g_param_spec_boolean ("sync", "Sync", "Synchronize to clock", g_param_spec_boolean ("sync", "Sync", "Synchronize to clock",
FALSE, G_PARAM_READWRITE)); FALSE, G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
[..] [..]
} }

View file

@ -32,6 +32,11 @@
G_BEGIN_DECLS 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 G_END_DECLS
#endif /* __GST_GLIB_COMPAT_H__ */ #endif /* __GST_GLIB_COMPAT_H__ */

View file

@ -402,7 +402,7 @@ gst_bin_class_init (GstBinClass * klass)
g_object_class_install_property (gobject_class, PROP_ASYNC_HANDLING, g_object_class_install_property (gobject_class, PROP_ASYNC_HANDLING,
g_param_spec_boolean ("async-handling", "Async Handling", g_param_spec_boolean ("async-handling", "Async Handling",
"The bin will handle Asynchronous state changes", "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: * GstBin::element-added:

View file

@ -600,19 +600,21 @@ gst_clock_class_init (GstClockClass * klass)
g_object_class_install_property (gobject_class, PROP_STATS, g_object_class_install_property (gobject_class, PROP_STATS,
g_param_spec_boolean ("stats", "Stats", g_param_spec_boolean ("stats", "Stats",
"Enable clock stats (unimplemented)", DEFAULT_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_object_class_install_property (gobject_class, PROP_WINDOW_SIZE,
g_param_spec_int ("window-size", "Window size", g_param_spec_int ("window-size", "Window size",
"The size of the window used to calculate rate and offset", 2, 1024, "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_object_class_install_property (gobject_class, PROP_WINDOW_THRESHOLD,
g_param_spec_int ("window-threshold", "Window threshold", g_param_spec_int ("window-threshold", "Window threshold",
"The threshold to start calculating rate and offset", 2, 1024, "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_object_class_install_property (gobject_class, PROP_TIMEOUT,
g_param_spec_uint64 ("timeout", "Timeout", g_param_spec_uint64 ("timeout", "Timeout",
"The amount of time, in nanoseconds, to sample master and slave clocks", "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 static void

View file

@ -177,7 +177,8 @@ gst_index_class_init (GstIndexClass * klass)
g_object_class_install_property (gobject_class, ARG_RESOLVER, g_object_class_install_property (gobject_class, ARG_RESOLVER,
g_param_spec_enum ("resolver", "Resolver", g_param_spec_enum ("resolver", "Resolver",
"Select a predefined object to string mapper", "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 static void

View file

@ -205,7 +205,8 @@ gst_object_class_init (GstObjectClass * klass)
g_object_class_install_property (gobject_class, ARG_NAME, g_object_class_install_property (gobject_class, ARG_NAME,
g_param_spec_string ("name", "Name", "The name of the object", 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: * GstObject::parent-set:

View file

@ -308,16 +308,16 @@ gst_pad_class_init (GstPadClass * klass)
g_object_class_install_property (gobject_class, PAD_PROP_CAPS, g_object_class_install_property (gobject_class, PAD_PROP_CAPS,
g_param_spec_boxed ("caps", "Caps", "The capabilities of the pad", 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_object_class_install_property (gobject_class, PAD_PROP_DIRECTION,
g_param_spec_enum ("direction", "Direction", "The direction of the pad", g_param_spec_enum ("direction", "Direction", "The direction of the pad",
GST_TYPE_PAD_DIRECTION, GST_PAD_UNKNOWN, 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. */ /* FIXME, Make G_PARAM_CONSTRUCT_ONLY when we fix ghostpads. */
g_object_class_install_property (gobject_class, PAD_PROP_TEMPLATE, g_object_class_install_property (gobject_class, PAD_PROP_TEMPLATE,
g_param_spec_object ("template", "Template", g_param_spec_object ("template", "Template",
"The GstPadTemplate of this pad", GST_TYPE_PAD_TEMPLATE, "The GstPadTemplate of this pad", GST_TYPE_PAD_TEMPLATE,
G_PARAM_READWRITE)); G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
#ifndef GST_DISABLE_LOADSAVE #ifndef GST_DISABLE_LOADSAVE
gstobject_class->save_thyself = GST_DEBUG_FUNCPTR (gst_pad_save_thyself); gstobject_class->save_thyself = GST_DEBUG_FUNCPTR (gst_pad_save_thyself);

View file

@ -209,7 +209,7 @@ gst_pipeline_class_init (gpointer g_class, gpointer class_data)
g_param_spec_uint64 ("delay", "Delay", g_param_spec_uint64 ("delay", "Delay",
"Expected delay needed for elements " "Expected delay needed for elements "
"to spin up to PLAYING in nanoseconds", 0, G_MAXUINT64, DEFAULT_DELAY, "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: * 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", g_param_spec_boolean ("auto-flush-bus", "Auto Flush Bus",
"Whether to automatically flush the pipeline's bus when going " "Whether to automatically flush the pipeline's bus when going "
"from READY into NULL state", DEFAULT_AUTO_FLUSH_BUS, "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); gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_pipeline_dispose);

View file

@ -340,22 +340,23 @@ gst_base_sink_class_init (GstBaseSinkClass * klass)
g_object_class_install_property (gobject_class, PROP_PREROLL_QUEUE_LEN, g_object_class_install_property (gobject_class, PROP_PREROLL_QUEUE_LEN,
g_param_spec_uint ("preroll-queue-len", "Preroll queue length", g_param_spec_uint ("preroll-queue-len", "Preroll queue length",
"Number of buffers to queue during preroll", 0, G_MAXUINT, "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_object_class_install_property (gobject_class, PROP_SYNC,
g_param_spec_boolean ("sync", "Sync", "Sync on the clock", DEFAULT_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_object_class_install_property (gobject_class, PROP_MAX_LATENESS,
g_param_spec_int64 ("max-lateness", "Max Lateness", g_param_spec_int64 ("max-lateness", "Max Lateness",
"Maximum number of nanoseconds that a buffer can be late before it " "Maximum number of nanoseconds that a buffer can be late before it "
"is dropped (-1 unlimited)", -1, G_MAXINT64, DEFAULT_MAX_LATENESS, "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_object_class_install_property (gobject_class, PROP_QOS,
g_param_spec_boolean ("qos", "Qos", g_param_spec_boolean ("qos", "Qos",
"Generate Quality-of-Service events upstream", DEFAULT_QOS, "Generate Quality-of-Service events upstream", DEFAULT_QOS,
G_PARAM_READWRITE)); G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstBaseSink:async * GstBaseSink:async
* *
@ -368,7 +369,8 @@ gst_base_sink_class_init (GstBaseSinkClass * klass)
*/ */
g_object_class_install_property (gobject_class, PROP_ASYNC, g_object_class_install_property (gobject_class, PROP_ASYNC,
g_param_spec_boolean ("async", "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 * 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_object_class_install_property (gobject_class, PROP_TS_OFFSET,
g_param_spec_int64 ("ts-offset", "TS Offset", g_param_spec_int64 ("ts-offset", "TS Offset",
"Timestamp offset in nanoseconds", G_MININT64, G_MAXINT64, "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 * GstBaseSink:last-buffer
@ -395,7 +397,7 @@ gst_base_sink_class_init (GstBaseSinkClass * klass)
g_object_class_install_property (gobject_class, PROP_LAST_BUFFER, g_object_class_install_property (gobject_class, PROP_LAST_BUFFER,
gst_param_spec_mini_object ("last-buffer", "Last Buffer", gst_param_spec_mini_object ("last-buffer", "Last Buffer",
"The last buffer received in the sink", GST_TYPE_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 = gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_base_sink_change_state); GST_DEBUG_FUNCPTR (gst_base_sink_change_state);

View file

@ -345,19 +345,19 @@ gst_base_src_class_init (GstBaseSrcClass * klass)
g_object_class_install_property (gobject_class, PROP_BLOCKSIZE, g_object_class_install_property (gobject_class, PROP_BLOCKSIZE,
g_param_spec_ulong ("blocksize", "Block size", g_param_spec_ulong ("blocksize", "Block size",
"Size in bytes to read per buffer (0 = default)", 0, G_MAXULONG, "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_object_class_install_property (gobject_class, PROP_NUM_BUFFERS,
g_param_spec_int ("num-buffers", "num-buffers", g_param_spec_int ("num-buffers", "num-buffers",
"Number of buffers to output before sending EOS", -1, G_MAXINT, "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_object_class_install_property (gobject_class, PROP_TYPEFIND,
g_param_spec_boolean ("typefind", "Typefind", g_param_spec_boolean ("typefind", "Typefind",
"Run typefind before negotiating", DEFAULT_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_object_class_install_property (gobject_class, PROP_DO_TIMESTAMP,
g_param_spec_boolean ("do-timestamp", "Do timestamp", g_param_spec_boolean ("do-timestamp", "Do timestamp",
"Apply current stream time to buffers", DEFAULT_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 = gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_base_src_change_state); GST_DEBUG_FUNCPTR (gst_base_src_change_state);

View file

@ -335,7 +335,7 @@ gst_base_transform_class_init (GstBaseTransformClass * klass)
g_object_class_install_property (gobject_class, PROP_QOS, g_object_class_install_property (gobject_class, PROP_QOS,
g_param_spec_boolean ("qos", "QoS", "Handle Quality-of-Service events", 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); gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_base_transform_finalize);

View file

@ -172,16 +172,16 @@ gst_data_queue_class_init (GstDataQueueClass * klass)
g_object_class_install_property (gobject_class, ARG_CUR_LEVEL_BYTES, g_object_class_install_property (gobject_class, ARG_CUR_LEVEL_BYTES,
g_param_spec_uint ("current-level-bytes", "Current level (kB)", g_param_spec_uint ("current-level-bytes", "Current level (kB)",
"Current amount of data in the queue (bytes)", "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_object_class_install_property (gobject_class, ARG_CUR_LEVEL_VISIBLE,
g_param_spec_uint ("current-level-visible", g_param_spec_uint ("current-level-visible",
"Current level (visible items)", "Current level (visible items)",
"Current number of visible items in the queue", 0, G_MAXUINT, 0, "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_object_class_install_property (gobject_class, ARG_CUR_LEVEL_TIME,
g_param_spec_uint64 ("current-level-time", "Current level (ns)", g_param_spec_uint64 ("current-level-time", "Current level (ns)",
"Current amount of data in the queue (in ns)", 0, G_MAXUINT64, 0, "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 */ /* set several parent class virtual functions */
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_data_queue_finalize); gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_data_queue_finalize);

View file

@ -28,6 +28,10 @@
* inside the 'check' directories of various GStreamer packages. * inside the 'check' directories of various GStreamer packages.
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstcheck.h" #include "gstcheck.h"
GST_DEBUG_CATEGORY (check_debug); GST_DEBUG_CATEGORY (check_debug);
@ -82,6 +86,88 @@ static void gst_check_log_critical_func
_gst_check_raised_warning = TRUE; _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 */ /* initialize GStreamer testing */
void void
gst_check_init (int *argc, char **argv[]) gst_check_init (int *argc, char **argv[])
@ -106,6 +192,10 @@ gst_check_init (int *argc, char **argv[])
check_cond = g_cond_new (); check_cond = g_cond_new ();
check_mutex = g_mutex_new (); check_mutex = g_mutex_new ();
#if defined(G_OS_UNIX) && defined(HAVE_EXECINFO_H)
_gst_check_fault_handler_setup ();
#endif
} }
/* message checking */ /* message checking */

View file

@ -917,7 +917,8 @@ _gst_controller_class_init (GstControllerClass * klass)
g_param_spec_uint64 ("control-rate", g_param_spec_uint64 ("control-rate",
"control rate", "control rate",
"Controlled properties will be updated at least every control-rate nanoseconds", "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 */ /* register signals */
/* set defaults for overridable methods */ /* set defaults for overridable methods */

View file

@ -1026,7 +1026,8 @@ gst_lfo_control_source_class_init (GstLFOControlSourceClass * klass)
**/ **/
g_object_class_install_property (gobject_class, PROP_WAVEFORM, g_object_class_install_property (gobject_class, PROP_WAVEFORM,
g_param_spec_enum ("waveform", "Waveform", "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 * GstLFOControlSource:frequency
@ -1039,7 +1040,7 @@ gst_lfo_control_source_class_init (GstLFOControlSourceClass * klass)
g_object_class_install_property (gobject_class, PROP_FREQUENCY, g_object_class_install_property (gobject_class, PROP_FREQUENCY,
g_param_spec_double ("frequency", "Frequency", g_param_spec_double ("frequency", "Frequency",
"Frequency of the waveform", 0.0, G_MAXDOUBLE, 1.0, "Frequency of the waveform", 0.0, G_MAXDOUBLE, 1.0,
G_PARAM_READWRITE)); G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstLFOControlSource:timeshift * GstLFOControlSource:timeshift
@ -1054,7 +1055,7 @@ gst_lfo_control_source_class_init (GstLFOControlSourceClass * klass)
g_object_class_install_property (gobject_class, PROP_TIMESHIFT, g_object_class_install_property (gobject_class, PROP_TIMESHIFT,
g_param_spec_uint64 ("timeshift", "Timeshift", g_param_spec_uint64 ("timeshift", "Timeshift",
"Timeshift of the waveform to the right", 0, G_MAXUINT64, 0, "Timeshift of the waveform to the right", 0, G_MAXUINT64, 0,
G_PARAM_READWRITE)); G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstLFOControlSource:amplitude * GstLFOControlSource:amplitude
@ -1066,7 +1067,7 @@ gst_lfo_control_source_class_init (GstLFOControlSourceClass * klass)
**/ **/
g_object_class_install_property (gobject_class, PROP_AMPLITUDE, g_object_class_install_property (gobject_class, PROP_AMPLITUDE,
g_param_spec_boxed ("amplitude", "Amplitude", "Amplitude of the waveform", 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 * GstLFOControlSource:offset
@ -1078,5 +1079,5 @@ gst_lfo_control_source_class_init (GstLFOControlSourceClass * klass)
**/ **/
g_object_class_install_property (gobject_class, PROP_OFFSET, g_object_class_install_property (gobject_class, PROP_OFFSET,
g_param_spec_boxed ("offset", "Offset", "Offset of the waveform", 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));
} }

View file

@ -139,11 +139,12 @@ gst_net_client_clock_class_init (GstNetClientClockClass * klass)
g_object_class_install_property (gobject_class, PROP_ADDRESS, g_object_class_install_property (gobject_class, PROP_ADDRESS,
g_param_spec_string ("address", "address", g_param_spec_string ("address", "address",
"The address of the machine providing a time server, " "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_object_class_install_property (gobject_class, PROP_PORT,
g_param_spec_int ("port", "port", g_param_spec_int ("port", "port",
"The port on which the remote server is listening", 0, G_MAXUINT16, "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 static void

View file

@ -147,19 +147,19 @@ gst_net_time_provider_class_init (GstNetTimeProviderClass * klass)
g_object_class_install_property (gobject_class, PROP_PORT, g_object_class_install_property (gobject_class, PROP_PORT,
g_param_spec_int ("port", "port", g_param_spec_int ("port", "port",
"The port to receive the packets from, 0=allocate", 0, G_MAXUINT16, "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_object_class_install_property (gobject_class, PROP_ADDRESS,
g_param_spec_string ("address", "address", g_param_spec_string ("address", "address",
"The address to bind on, as a dotted quad (x.x.x.x)", "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_object_class_install_property (gobject_class, PROP_CLOCK,
g_param_spec_object ("clock", "Clock", g_param_spec_object ("clock", "Clock",
"The clock to export over the network", GST_TYPE_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_object_class_install_property (gobject_class, PROP_ACTIVE,
g_param_spec_boolean ("active", "Active", g_param_spec_boolean ("active", "Active",
"TRUE if the clock will respond to queries over the network", TRUE, "TRUE if the clock will respond to queries over the network", TRUE,
G_PARAM_READWRITE)); G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
} }
static void static void

View file

@ -109,7 +109,8 @@ gst_capsfilter_class_init (GstCapsFilterClass * klass)
g_param_spec_boxed ("caps", _("Filter caps"), g_param_spec_boxed ("caps", _("Filter caps"),
_("Restrict the possible allowed capabilities (NULL means ANY). " _("Restrict the possible allowed capabilities (NULL means ANY). "
"Setting this property takes a reference to the supplied GstCaps " "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 = GST_BASE_TRANSFORM_CLASS (klass);
trans_class->transform_caps = gst_capsfilter_transform_caps; trans_class->transform_caps = gst_capsfilter_transform_caps;

View file

@ -157,38 +157,38 @@ gst_fake_sink_class_init (GstFakeSinkClass * klass)
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_fake_sink_get_property); gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_fake_sink_get_property);
g_object_class_install_property (gobject_class, PROP_STATE_ERROR, 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, "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_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, "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_object_class_install_property (gobject_class, PROP_SIGNAL_HANDOFFS,
g_param_spec_boolean ("signal-handoffs", "Signal handoffs", g_param_spec_boolean ("signal-handoffs", "Signal handoffs",
"Send a signal before unreffing the buffer", DEFAULT_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_object_class_install_property (gobject_class, PROP_SILENT,
g_param_spec_boolean ("silent", "Silent", g_param_spec_boolean ("silent", "Silent",
"Don't produce last_message events", DEFAULT_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_object_class_install_property (gobject_class, PROP_DUMP,
g_param_spec_boolean ("dump", "Dump", "Dump buffer contents to stdout", 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, g_object_class_install_property (gobject_class,
PROP_CAN_ACTIVATE_PUSH, PROP_CAN_ACTIVATE_PUSH,
g_param_spec_boolean ("can-activate-push", "Can activate push", g_param_spec_boolean ("can-activate-push", "Can activate push",
"Can activate in push mode", DEFAULT_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, g_object_class_install_property (gobject_class,
PROP_CAN_ACTIVATE_PULL, PROP_CAN_ACTIVATE_PULL,
g_param_spec_boolean ("can-activate-pull", "Can activate pull", g_param_spec_boolean ("can-activate-pull", "Can activate pull",
"Can activate in pull mode", DEFAULT_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_object_class_install_property (gobject_class, PROP_NUM_BUFFERS,
g_param_spec_int ("num-buffers", "num-buffers", g_param_spec_int ("num-buffers", "num-buffers",
"Number of buffers to accept going EOS", -1, G_MAXINT, "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: * GstFakeSink::handoff:

View file

@ -265,63 +265,66 @@ gst_fake_src_class_init (GstFakeSrcClass * klass)
*/ */
g_object_class_install_property (gobject_class, PROP_DATA, g_object_class_install_property (gobject_class, PROP_DATA,
g_param_spec_enum ("data", "data", "Data allocation method", 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_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SIZETYPE,
g_param_spec_enum ("sizetype", "sizetype", g_param_spec_enum ("sizetype", "sizetype",
"How to determine buffer sizes", GST_TYPE_FAKE_SRC_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_object_class_install_property (gobject_class, PROP_SIZEMIN,
g_param_spec_int ("sizemin", "sizemin", "Minimum buffer size", 0, 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_object_class_install_property (gobject_class, PROP_SIZEMAX,
g_param_spec_int ("sizemax", "sizemax", "Maximum buffer size", 0, 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_object_class_install_property (gobject_class, PROP_PARENTSIZE,
g_param_spec_int ("parentsize", "parentsize", g_param_spec_int ("parentsize", "parentsize",
"Size of parent buffer for sub-buffered allocation", 0, G_MAXINT, "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_object_class_install_property (gobject_class, PROP_FILLTYPE,
g_param_spec_enum ("filltype", "filltype", g_param_spec_enum ("filltype", "filltype",
"How to fill the buffer, if at all", GST_TYPE_FAKE_SRC_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, g_object_class_install_property (gobject_class, PROP_DATARATE,
g_param_spec_int ("datarate", "Datarate", g_param_spec_int ("datarate", "Datarate",
"Timestamps buffers with number of bytes per second (0 = none)", 0, "Timestamps buffers with number of bytes per second (0 = none)", 0,
G_MAXINT, DEFAULT_DATARATE, G_PARAM_READWRITE)); G_MAXINT, DEFAULT_DATARATE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SYNC, g_object_class_install_property (gobject_class, PROP_SYNC,
g_param_spec_boolean ("sync", "Sync", "Sync to the clock to the datarate", g_param_spec_boolean ("sync", "Sync", "Sync to the clock to the datarate",
DEFAULT_SYNC, G_PARAM_READWRITE)); DEFAULT_SYNC, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PATTERN, g_object_class_install_property (gobject_class, PROP_PATTERN,
g_param_spec_string ("pattern", "pattern", "pattern", DEFAULT_PATTERN, g_param_spec_string ("pattern", "pattern", "pattern", DEFAULT_PATTERN,
G_PARAM_READWRITE)); G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_LAST_MESSAGE, 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 last status message", NULL, G_PARAM_READABLE)); "The last status message", NULL,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SILENT, g_object_class_install_property (gobject_class, PROP_SILENT,
g_param_spec_boolean ("silent", "Silent", g_param_spec_boolean ("silent", "Silent",
"Don't produce last_message events", DEFAULT_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_SIGNAL_HANDOFFS, g_object_class_install_property (gobject_class, PROP_SIGNAL_HANDOFFS,
g_param_spec_boolean ("signal-handoffs", "Signal handoffs", g_param_spec_boolean ("signal-handoffs", "Signal handoffs",
"Send a signal before pushing the buffer", DEFAULT_SIGNAL_HANDOFFS, "Send a signal before pushing the buffer", DEFAULT_SIGNAL_HANDOFFS,
G_PARAM_READWRITE)); G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_DUMP, g_object_class_install_property (gobject_class, PROP_DUMP,
g_param_spec_boolean ("dump", "Dump", "Dump buffer contents to stdout", 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, g_object_class_install_property (gobject_class, PROP_CAN_ACTIVATE_PUSH,
PROP_CAN_ACTIVATE_PUSH,
g_param_spec_boolean ("can-activate-push", "Can activate push", g_param_spec_boolean ("can-activate-push", "Can activate push",
"Can activate in push mode", DEFAULT_CAN_ACTIVATE_PUSH, "Can activate in push mode", DEFAULT_CAN_ACTIVATE_PUSH,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, g_object_class_install_property (gobject_class, PROP_CAN_ACTIVATE_PULL,
PROP_CAN_ACTIVATE_PULL,
g_param_spec_boolean ("can-activate-pull", "Can activate pull", g_param_spec_boolean ("can-activate-pull", "Can activate pull",
"Can activate in pull mode", DEFAULT_CAN_ACTIVATE_PULL, "Can activate in pull mode", DEFAULT_CAN_ACTIVATE_PULL,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_IS_LIVE, g_object_class_install_property (gobject_class, PROP_IS_LIVE,
g_param_spec_boolean ("is-live", "Is this a live source", g_param_spec_boolean ("is-live", "Is this a live source",
"True if the element cannot produce data in PAUSED", FALSE, "True if the element cannot produce data in PAUSED", FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
/** /**
* GstFakeSrc::handoff: * GstFakeSrc::handoff:

View file

@ -149,7 +149,7 @@ gst_fd_sink_class_init (GstFdSinkClass * klass)
g_object_class_install_property (gobject_class, ARG_FD, g_object_class_install_property (gobject_class, ARG_FD,
g_param_spec_int ("fd", "fd", "An open file descriptor to write to", g_param_spec_int ("fd", "fd", "An open file descriptor to write to",
0, G_MAXINT, 1, G_PARAM_READWRITE)); 0, G_MAXINT, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
} }
static void static void

View file

@ -136,7 +136,7 @@ gst_fd_src_class_init (GstFdSrcClass * klass)
g_object_class_install_property (gobject_class, PROP_FD, g_object_class_install_property (gobject_class, PROP_FD,
g_param_spec_int ("fd", "fd", "An open file descriptor to read from", g_param_spec_int ("fd", "fd", "An open file descriptor to read from",
0, G_MAXINT, 0, G_PARAM_READWRITE)); 0, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_fd_src_start); gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_fd_src_start);
gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_fd_src_stop); gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_fd_src_stop);

View file

@ -159,17 +159,19 @@ gst_file_sink_class_init (GstFileSinkClass * klass)
g_object_class_install_property (gobject_class, PROP_LOCATION, g_object_class_install_property (gobject_class, PROP_LOCATION,
g_param_spec_string ("location", "File Location", g_param_spec_string ("location", "File Location",
"Location of the file to write", NULL, G_PARAM_READWRITE)); "Location of the file to write", NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_BUFFER_MODE, g_object_class_install_property (gobject_class, PROP_BUFFER_MODE,
g_param_spec_enum ("buffer-mode", "Buffering mode", g_param_spec_enum ("buffer-mode", "Buffering mode",
"The buffering mode to use", GST_TYPE_BUFFER_MODE, "The buffering mode to use", GST_TYPE_BUFFER_MODE,
DEFAULT_BUFFER_MODE, G_PARAM_READWRITE)); DEFAULT_BUFFER_MODE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_BUFFER_SIZE, g_object_class_install_property (gobject_class, PROP_BUFFER_SIZE,
g_param_spec_uint ("buffer-size", "Buffering size", g_param_spec_uint ("buffer-size", "Buffering size",
"Size of buffer in number of bytes for line or full buffer-mode", 0, "Size of buffer in number of bytes for line or full buffer-mode", 0,
G_MAXUINT, DEFAULT_BUFFER_SIZE, G_PARAM_READWRITE)); G_MAXUINT, DEFAULT_BUFFER_SIZE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gstbasesink_class->get_times = NULL; gstbasesink_class->get_times = NULL;
gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_file_sink_start); gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_file_sink_start);

View file

@ -208,18 +208,19 @@ gst_file_src_class_init (GstFileSrcClass * klass)
g_object_class_install_property (gobject_class, ARG_FD, g_object_class_install_property (gobject_class, ARG_FD,
g_param_spec_int ("fd", "File-descriptor", g_param_spec_int ("fd", "File-descriptor",
"File-descriptor for the file being mmap()d", 0, G_MAXINT, 0, "File-descriptor for the file being mmap()d", 0, G_MAXINT, 0,
G_PARAM_READABLE)); G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_LOCATION, g_object_class_install_property (gobject_class, ARG_LOCATION,
g_param_spec_string ("location", "File Location", g_param_spec_string ("location", "File Location",
"Location of the file to read", NULL, G_PARAM_READWRITE)); "Location of the file to read", NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_MMAPSIZE, g_object_class_install_property (gobject_class, ARG_MMAPSIZE,
g_param_spec_ulong ("mmapsize", "mmap() Block Size", g_param_spec_ulong ("mmapsize", "mmap() Block Size",
"Size in bytes of mmap()d regions", 0, G_MAXULONG, DEFAULT_MMAPSIZE, "Size in bytes of mmap()d regions", 0, G_MAXULONG, DEFAULT_MMAPSIZE,
G_PARAM_READWRITE)); G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_TOUCH, g_object_class_install_property (gobject_class, ARG_TOUCH,
g_param_spec_boolean ("touch", "Touch mapped region read data", g_param_spec_boolean ("touch", "Touch mapped region read data",
"Touch mmapped data regions to force them to be read from disk", "Touch mmapped data regions to force them to be read from disk",
DEFAULT_TOUCH, G_PARAM_READWRITE)); DEFAULT_TOUCH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstFileSrc:use-mmap * GstFileSrc:use-mmap
* *
@ -241,12 +242,12 @@ gst_file_src_class_init (GstFileSrcClass * klass)
g_object_class_install_property (gobject_class, ARG_USEMMAP, g_object_class_install_property (gobject_class, ARG_USEMMAP,
g_param_spec_boolean ("use-mmap", "Use mmap to read data", g_param_spec_boolean ("use-mmap", "Use mmap to read data",
"Whether to use mmap() instead of read()", "Whether to use mmap() instead of read()",
DEFAULT_USEMMAP, G_PARAM_READWRITE)); DEFAULT_USEMMAP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_SEQUENTIAL, g_object_class_install_property (gobject_class, ARG_SEQUENTIAL,
g_param_spec_boolean ("sequential", "Optimise for sequential mmap access", g_param_spec_boolean ("sequential", "Optimise for sequential mmap access",
"Whether to use madvise to hint to the kernel that access to " "Whether to use madvise to hint to the kernel that access to "
"mmap pages will be sequential", "mmap pages will be sequential",
DEFAULT_SEQUENTIAL, G_PARAM_READWRITE)); DEFAULT_SEQUENTIAL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_file_src_finalize); gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_file_src_finalize);

View file

@ -184,52 +184,57 @@ gst_identity_class_init (GstIdentityClass * klass)
g_object_class_install_property (gobject_class, PROP_SLEEP_TIME, g_object_class_install_property (gobject_class, PROP_SLEEP_TIME,
g_param_spec_uint ("sleep-time", "Sleep time", g_param_spec_uint ("sleep-time", "Sleep time",
"Microseconds to sleep between processing", 0, G_MAXUINT, "Microseconds to sleep between processing", 0, G_MAXUINT,
DEFAULT_SLEEP_TIME, G_PARAM_READWRITE)); DEFAULT_SLEEP_TIME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_ERROR_AFTER, g_object_class_install_property (gobject_class, PROP_ERROR_AFTER,
g_param_spec_int ("error_after", "Error After", "Error after N buffers", g_param_spec_int ("error-after", "Error After", "Error after N buffers",
G_MININT, G_MAXINT, DEFAULT_ERROR_AFTER, G_PARAM_READWRITE)); G_MININT, G_MAXINT, DEFAULT_ERROR_AFTER,
g_object_class_install_property (gobject_class, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
PROP_DROP_PROBABILITY, g_param_spec_float ("drop_probability", g_object_class_install_property (gobject_class, PROP_DROP_PROBABILITY,
"Drop Probability", g_param_spec_float ("drop-probability", "Drop Probability",
"The Probability a buffer is dropped", 0.0, 1.0, "The Probability a buffer is dropped", 0.0, 1.0,
DEFAULT_DROP_PROBABILITY, G_PARAM_READWRITE)); DEFAULT_DROP_PROBABILITY,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_DATARATE, g_object_class_install_property (gobject_class, PROP_DATARATE,
g_param_spec_int ("datarate", "Datarate", g_param_spec_int ("datarate", "Datarate",
"(Re)timestamps buffers with number of bytes per second (0 = inactive)", "(Re)timestamps buffers with number of bytes per second (0 = inactive)",
0, G_MAXINT, DEFAULT_DATARATE, G_PARAM_READWRITE)); 0, G_MAXINT, DEFAULT_DATARATE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SILENT, g_object_class_install_property (gobject_class, PROP_SILENT,
g_param_spec_boolean ("silent", "silent", "silent", DEFAULT_SILENT, g_param_spec_boolean ("silent", "silent", "silent", DEFAULT_SILENT,
G_PARAM_READWRITE)); G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SINGLE_SEGMENT, g_object_class_install_property (gobject_class, PROP_SINGLE_SEGMENT,
g_param_spec_boolean ("single-segment", "Single Segment", g_param_spec_boolean ("single-segment", "Single Segment",
"Timestamp buffers and eat newsegments so as to appear as one segment", "Timestamp buffers and eat newsegments so as to appear as one segment",
DEFAULT_SINGLE_SEGMENT, G_PARAM_READWRITE)); DEFAULT_SINGLE_SEGMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_LAST_MESSAGE, g_object_class_install_property (gobject_class, PROP_LAST_MESSAGE,
g_param_spec_string ("last-message", "last-message", "last-message", NULL, g_param_spec_string ("last-message", "last-message", "last-message", NULL,
G_PARAM_READABLE)); G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_DUMP, g_object_class_install_property (gobject_class, PROP_DUMP,
g_param_spec_boolean ("dump", "Dump", "Dump buffer contents to stdout", 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_SYNC, g_object_class_install_property (gobject_class, PROP_SYNC,
g_param_spec_boolean ("sync", "Synchronize", g_param_spec_boolean ("sync", "Synchronize",
"Synchronize to pipeline clock", DEFAULT_SYNC, G_PARAM_READWRITE)); "Synchronize to pipeline clock", DEFAULT_SYNC,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_CHECK_PERFECT, g_object_class_install_property (gobject_class, PROP_CHECK_PERFECT,
g_param_spec_boolean ("check-perfect", "Check For Perfect Stream", g_param_spec_boolean ("check-perfect", "Check For Perfect Stream",
"Verify that the stream is time- and data-contiguous. " "Verify that the stream is time- and data-contiguous. "
"This only logs in the debug log. This will be deprecated in favor " "This only logs in the debug log. This will be deprecated in favor "
"of the check-imperfect-timestamp/offset properties.", "of the check-imperfect-timestamp/offset properties.",
DEFAULT_CHECK_PERFECT, G_PARAM_READWRITE)); DEFAULT_CHECK_PERFECT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, g_object_class_install_property (gobject_class,
PROP_CHECK_IMPERFECT_TIMESTAMP, PROP_CHECK_IMPERFECT_TIMESTAMP,
g_param_spec_boolean ("check-imperfect-timestamp", g_param_spec_boolean ("check-imperfect-timestamp",
"Check for discontiguous timestamps", "Check for discontiguous timestamps",
"Send element messages if timestamps and durations do not match up", "Send element messages if timestamps and durations do not match up",
DEFAULT_CHECK_IMPERFECT_TIMESTAMP, G_PARAM_READWRITE)); DEFAULT_CHECK_IMPERFECT_TIMESTAMP,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_CHECK_IMPERFECT_OFFSET, g_object_class_install_property (gobject_class, PROP_CHECK_IMPERFECT_OFFSET,
g_param_spec_boolean ("check-imperfect-offset", g_param_spec_boolean ("check-imperfect-offset",
"Check for discontiguous offset", "Check for discontiguous offset",
"Send element messages if offset and offset_end do not match up", "Send element messages if offset and offset_end do not match up",
DEFAULT_CHECK_IMPERFECT_OFFSET, G_PARAM_READWRITE)); DEFAULT_CHECK_IMPERFECT_OFFSET,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstIdentity:signal-handoffs * GstIdentity:signal-handoffs
@ -242,7 +247,7 @@ gst_identity_class_init (GstIdentityClass * klass)
g_object_class_install_property (gobject_class, PROP_SIGNAL_HANDOFFS, g_object_class_install_property (gobject_class, PROP_SIGNAL_HANDOFFS,
g_param_spec_boolean ("signal-handoffs", g_param_spec_boolean ("signal-handoffs",
"Signal handoffs", "Send a signal before pushing the buffer", "Signal handoffs", "Send a signal before pushing the buffer",
DEFAULT_SIGNAL_HANDOFFS, G_PARAM_READWRITE)); DEFAULT_SIGNAL_HANDOFFS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstIdentity::handoff: * GstIdentity::handoff:

View file

@ -287,28 +287,33 @@ gst_multi_queue_class_init (GstMultiQueueClass * klass)
g_object_class_install_property (gobject_class, ARG_MAX_SIZE_BYTES, g_object_class_install_property (gobject_class, ARG_MAX_SIZE_BYTES,
g_param_spec_uint ("max-size-bytes", "Max. size (kB)", g_param_spec_uint ("max-size-bytes", "Max. size (kB)",
"Max. amount of data in the queue (bytes, 0=disable)", "Max. amount of data in the queue (bytes, 0=disable)",
0, G_MAXUINT, DEFAULT_MAX_SIZE_BYTES, G_PARAM_READWRITE)); 0, G_MAXUINT, DEFAULT_MAX_SIZE_BYTES,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_MAX_SIZE_BUFFERS, g_object_class_install_property (gobject_class, ARG_MAX_SIZE_BUFFERS,
g_param_spec_uint ("max-size-buffers", "Max. size (buffers)", g_param_spec_uint ("max-size-buffers", "Max. size (buffers)",
"Max. number of buffers in the queue (0=disable)", "Max. number of buffers in the queue (0=disable)", 0, G_MAXUINT,
0, G_MAXUINT, DEFAULT_MAX_SIZE_BUFFERS, G_PARAM_READWRITE)); DEFAULT_MAX_SIZE_BUFFERS,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_MAX_SIZE_TIME, g_object_class_install_property (gobject_class, ARG_MAX_SIZE_TIME,
g_param_spec_uint64 ("max-size-time", "Max. size (ns)", g_param_spec_uint64 ("max-size-time", "Max. size (ns)",
"Max. amount of data in the queue (in ns, 0=disable)", "Max. amount of data in the queue (in ns, 0=disable)", 0, G_MAXUINT64,
0, G_MAXUINT64, DEFAULT_MAX_SIZE_TIME, G_PARAM_READWRITE)); DEFAULT_MAX_SIZE_TIME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_EXTRA_SIZE_BYTES, g_object_class_install_property (gobject_class, ARG_EXTRA_SIZE_BYTES,
g_param_spec_uint ("extra-size-bytes", "Extra Size (kB)", g_param_spec_uint ("extra-size-bytes", "Extra Size (kB)",
"Amount of data the queues can grow if one of them is empty (bytes, 0=disable)", "Amount of data the queues can grow if one of them is empty (bytes, 0=disable)",
0, G_MAXUINT, DEFAULT_EXTRA_SIZE_BYTES, G_PARAM_READWRITE)); 0, G_MAXUINT, DEFAULT_EXTRA_SIZE_BYTES,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_EXTRA_SIZE_BUFFERS, g_object_class_install_property (gobject_class, ARG_EXTRA_SIZE_BUFFERS,
g_param_spec_uint ("extra-size-buffers", "Extra Size (buffers)", g_param_spec_uint ("extra-size-buffers", "Extra Size (buffers)",
"Amount of buffers the queues can grow if one of them is empty (0=disable)", "Amount of buffers the queues can grow if one of them is empty (0=disable)",
0, G_MAXUINT, DEFAULT_EXTRA_SIZE_BUFFERS, G_PARAM_READWRITE)); 0, G_MAXUINT, DEFAULT_EXTRA_SIZE_BUFFERS,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_EXTRA_SIZE_TIME, g_object_class_install_property (gobject_class, ARG_EXTRA_SIZE_TIME,
g_param_spec_uint64 ("extra-size-time", "Extra Size (ns)", g_param_spec_uint64 ("extra-size-time", "Extra Size (ns)",
"Amount of time the queues can grow if one of them is empty (in ns, 0=disable)", "Amount of time the queues can grow if one of them is empty (in ns, 0=disable)",
0, G_MAXUINT64, DEFAULT_EXTRA_SIZE_TIME, G_PARAM_READWRITE)); 0, G_MAXUINT64, DEFAULT_EXTRA_SIZE_TIME,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_multi_queue_finalize); gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_multi_queue_finalize);

View file

@ -310,46 +310,49 @@ gst_queue_class_init (GstQueueClass * klass)
g_object_class_install_property (gobject_class, ARG_CUR_LEVEL_BYTES, g_object_class_install_property (gobject_class, ARG_CUR_LEVEL_BYTES,
g_param_spec_uint ("current-level-bytes", "Current level (kB)", g_param_spec_uint ("current-level-bytes", "Current level (kB)",
"Current amount of data in the queue (bytes)", "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_BUFFERS, g_object_class_install_property (gobject_class, ARG_CUR_LEVEL_BUFFERS,
g_param_spec_uint ("current-level-buffers", "Current level (buffers)", g_param_spec_uint ("current-level-buffers", "Current level (buffers)",
"Current number of buffers in the queue", "Current number of buffers in the queue",
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_TIME, g_object_class_install_property (gobject_class, ARG_CUR_LEVEL_TIME,
g_param_spec_uint64 ("current-level-time", "Current level (ns)", g_param_spec_uint64 ("current-level-time", "Current level (ns)",
"Current amount of data in the queue (in ns)", "Current amount of data in the queue (in ns)",
0, G_MAXUINT64, 0, G_PARAM_READABLE)); 0, G_MAXUINT64, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_MAX_SIZE_BYTES, g_object_class_install_property (gobject_class, ARG_MAX_SIZE_BYTES,
g_param_spec_uint ("max-size-bytes", "Max. size (kB)", g_param_spec_uint ("max-size-bytes", "Max. size (kB)",
"Max. amount of data in the queue (bytes, 0=disable)", "Max. amount of data in the queue (bytes, 0=disable)",
0, G_MAXUINT, DEFAULT_MAX_SIZE_BYTES, G_PARAM_READWRITE)); 0, G_MAXUINT, DEFAULT_MAX_SIZE_BYTES,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_MAX_SIZE_BUFFERS, g_object_class_install_property (gobject_class, ARG_MAX_SIZE_BUFFERS,
g_param_spec_uint ("max-size-buffers", "Max. size (buffers)", g_param_spec_uint ("max-size-buffers", "Max. size (buffers)",
"Max. number of buffers in the queue (0=disable)", "Max. number of buffers in the queue (0=disable)", 0, G_MAXUINT,
0, G_MAXUINT, DEFAULT_MAX_SIZE_BUFFERS, G_PARAM_READWRITE)); DEFAULT_MAX_SIZE_BUFFERS,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_MAX_SIZE_TIME, g_object_class_install_property (gobject_class, ARG_MAX_SIZE_TIME,
g_param_spec_uint64 ("max-size-time", "Max. size (ns)", g_param_spec_uint64 ("max-size-time", "Max. size (ns)",
"Max. amount of data in the queue (in ns, 0=disable)", "Max. amount of data in the queue (in ns, 0=disable)", 0, G_MAXUINT64,
0, G_MAXUINT64, DEFAULT_MAX_SIZE_TIME, G_PARAM_READWRITE)); DEFAULT_MAX_SIZE_TIME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_MIN_THRESHOLD_BYTES, g_object_class_install_property (gobject_class, ARG_MIN_THRESHOLD_BYTES,
g_param_spec_uint ("min-threshold-bytes", "Min. threshold (kB)", g_param_spec_uint ("min-threshold-bytes", "Min. threshold (kB)",
"Min. amount of data in the queue to allow reading (bytes, 0=disable)", "Min. amount of data in the queue to allow reading (bytes, 0=disable)",
0, G_MAXUINT, 0, G_PARAM_READWRITE)); 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_MIN_THRESHOLD_BUFFERS, g_object_class_install_property (gobject_class, ARG_MIN_THRESHOLD_BUFFERS,
g_param_spec_uint ("min-threshold-buffers", "Min. threshold (buffers)", g_param_spec_uint ("min-threshold-buffers", "Min. threshold (buffers)",
"Min. number of buffers in the queue to allow reading (0=disable)", "Min. number of buffers in the queue to allow reading (0=disable)",
0, G_MAXUINT, 0, G_PARAM_READWRITE)); 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_MIN_THRESHOLD_TIME, g_object_class_install_property (gobject_class, ARG_MIN_THRESHOLD_TIME,
g_param_spec_uint64 ("min-threshold-time", "Min. threshold (ns)", g_param_spec_uint64 ("min-threshold-time", "Min. threshold (ns)",
"Min. amount of data in the queue to allow reading (in ns, 0=disable)", "Min. amount of data in the queue to allow reading (in ns, 0=disable)",
0, G_MAXUINT64, 0, G_PARAM_READWRITE)); 0, G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_LEAKY, g_object_class_install_property (gobject_class, ARG_LEAKY,
g_param_spec_enum ("leaky", "Leaky", g_param_spec_enum ("leaky", "Leaky",
"Where the queue leaks, if at all", "Where the queue leaks, if at all",
GST_TYPE_QUEUE_LEAKY, GST_QUEUE_NO_LEAK, G_PARAM_READWRITE)); GST_TYPE_QUEUE_LEAKY, GST_QUEUE_NO_LEAK,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* set several parent class virtual functions */ /* set several parent class virtual functions */
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_queue_finalize); gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_queue_finalize);

View file

@ -166,27 +166,29 @@ gst_tee_class_init (GstTeeClass * klass)
g_object_class_install_property (gobject_class, PROP_NUM_SRC_PADS, g_object_class_install_property (gobject_class, PROP_NUM_SRC_PADS,
g_param_spec_int ("num-src-pads", "Num Src Pads", g_param_spec_int ("num-src-pads", "Num Src Pads",
"The number of source pads", 0, G_MAXINT, DEFAULT_PROP_NUM_SRC_PADS, "The number of source pads", 0, G_MAXINT, DEFAULT_PROP_NUM_SRC_PADS,
G_PARAM_READABLE)); G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_HAS_SINK_LOOP, g_object_class_install_property (gobject_class, PROP_HAS_SINK_LOOP,
g_param_spec_boolean ("has-sink-loop", "Has Sink Loop", g_param_spec_boolean ("has-sink-loop", "Has Sink Loop",
"If the element should spawn a thread (unimplemented and deprecated)", "If the element should spawn a thread (unimplemented and deprecated)",
DEFAULT_PROP_HAS_SINK_LOOP, G_PARAM_CONSTRUCT | G_PARAM_READWRITE)); DEFAULT_PROP_HAS_SINK_LOOP,
G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_HAS_CHAIN, g_object_class_install_property (gobject_class, PROP_HAS_CHAIN,
g_param_spec_boolean ("has-chain", "Has Chain", g_param_spec_boolean ("has-chain", "Has Chain",
"If the element can operate in push mode", "If the element can operate in push mode", DEFAULT_PROP_HAS_CHAIN,
DEFAULT_PROP_HAS_CHAIN, G_PARAM_CONSTRUCT | G_PARAM_READWRITE)); G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SILENT, g_object_class_install_property (gobject_class, PROP_SILENT,
g_param_spec_boolean ("silent", "Silent", g_param_spec_boolean ("silent", "Silent",
"Don't produce last_message events", DEFAULT_PROP_SILENT, "Don't produce last_message events", DEFAULT_PROP_SILENT,
G_PARAM_CONSTRUCT | G_PARAM_READWRITE)); G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_LAST_MESSAGE, 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_PROP_LAST_MESSAGE, "The message describing current status", DEFAULT_PROP_LAST_MESSAGE,
G_PARAM_READABLE)); G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PULL_MODE, g_object_class_install_property (gobject_class, PROP_PULL_MODE,
g_param_spec_enum ("pull-mode", "Pull mode", g_param_spec_enum ("pull-mode", "Pull mode",
"Behavior of tee in pull mode", GST_TYPE_TEE_PULL_MODE, "Behavior of tee in pull mode", GST_TYPE_TEE_PULL_MODE,
DEFAULT_PULL_MODE, G_PARAM_CONSTRUCT | G_PARAM_READWRITE)); DEFAULT_PULL_MODE,
G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gstelement_class->request_new_pad = gstelement_class->request_new_pad =
GST_DEBUG_FUNCPTR (gst_tee_request_new_pad); GST_DEBUG_FUNCPTR (gst_tee_request_new_pad);

View file

@ -191,16 +191,17 @@ gst_type_find_element_class_init (GstTypeFindElementClass * typefind_class)
g_object_class_install_property (gobject_class, ARG_CAPS, g_object_class_install_property (gobject_class, ARG_CAPS,
g_param_spec_boxed ("caps", _("caps"), g_param_spec_boxed ("caps", _("caps"),
_("detected capabilities in stream"), gst_caps_get_type (), _("detected capabilities in stream"), gst_caps_get_type (),
G_PARAM_READABLE)); G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_MINIMUM, g_object_class_install_property (gobject_class, ARG_MINIMUM,
g_param_spec_uint ("minimum", _("minimum"), g_param_spec_uint ("minimum", _("minimum"),
"minimum probability required to accept caps", GST_TYPE_FIND_MINIMUM, "minimum probability required to accept caps", GST_TYPE_FIND_MINIMUM,
GST_TYPE_FIND_MAXIMUM, GST_TYPE_FIND_MINIMUM, G_PARAM_READWRITE)); GST_TYPE_FIND_MAXIMUM, GST_TYPE_FIND_MINIMUM,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_MAXIMUM, g_object_class_install_property (gobject_class, ARG_MAXIMUM,
g_param_spec_uint ("maximum", _("maximum"), g_param_spec_uint ("maximum", _("maximum"),
"probability to stop typefinding (deprecated; non-functional)", "probability to stop typefinding (deprecated; non-functional)",
GST_TYPE_FIND_MINIMUM, GST_TYPE_FIND_MAXIMUM, GST_TYPE_FIND_MAXIMUM, GST_TYPE_FIND_MINIMUM, GST_TYPE_FIND_MAXIMUM, GST_TYPE_FIND_MAXIMUM,
G_PARAM_READWRITE)); G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/** /**
* GstTypeFindElement::have-type: * GstTypeFindElement::have-type:
* @typefind: the typefind instance * @typefind: the typefind instance

View file

@ -192,7 +192,8 @@ gst_file_index_class_init (GstFileIndexClass * klass)
g_object_class_install_property (gobject_class, ARG_LOCATION, g_object_class_install_property (gobject_class, ARG_LOCATION,
g_param_spec_string ("location", "File Location", g_param_spec_string ("location", "File Location",
"Location of the index file", NULL, G_PARAM_READWRITE)); "Location of the index file", NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
} }
static void static void