mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 11:29:55 +00:00
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:
parent
7fe1bca96a
commit
b0346dff44
33 changed files with 311 additions and 134 deletions
47
ChangeLog
47
ChangeLog
|
@ -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>
|
||||
|
||||
* 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,
|
||||
g_param_spec_int ("datarate", "Datarate",
|
||||
"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_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_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_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_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_SIGNAL_HANDOFFS,
|
||||
g_param_spec_boolean ("signal-handoffs", "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_param_spec_boolean ("dump", "Dump", "Dump buffer contents to stdout",
|
||||
DEFAULT_DUMP, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_CAN_ACTIVATE_PUSH,
|
||||
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_CONSTRUCT));
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_CAN_ACTIVATE_PULL,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | 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_CONSTRUCT));
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, PROP_IS_LIVE,
|
||||
g_param_spec_boolean ("is-live", "Is this a live source",
|
||||
"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:
|
||||
|
|
|
@ -149,7 +149,7 @@ gst_fd_sink_class_init (GstFdSinkClass * klass)
|
|||
|
||||
g_object_class_install_property (gobject_class, ARG_FD,
|
||||
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
|
||||
|
|
|
@ -136,7 +136,7 @@ gst_fd_src_class_init (GstFdSrcClass * klass)
|
|||
|
||||
g_object_class_install_property (gobject_class, PROP_FD,
|
||||
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->stop = GST_DEBUG_FUNCPTR (gst_fd_src_stop);
|
||||
|
|
|
@ -159,17 +159,19 @@ gst_file_sink_class_init (GstFileSinkClass * klass)
|
|||
|
||||
g_object_class_install_property (gobject_class, PROP_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_param_spec_enum ("buffer-mode", "Buffering 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_param_spec_uint ("buffer-size", "Buffering size",
|
||||
"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->start = GST_DEBUG_FUNCPTR (gst_file_sink_start);
|
||||
|
|
|
@ -208,18 +208,19 @@ gst_file_src_class_init (GstFileSrcClass * klass)
|
|||
g_object_class_install_property (gobject_class, ARG_FD,
|
||||
g_param_spec_int ("fd", "File-descriptor",
|
||||
"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_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_param_spec_ulong ("mmapsize", "mmap() Block Size",
|
||||
"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_param_spec_boolean ("touch", "Touch mapped region read data",
|
||||
"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
|
||||
*
|
||||
|
@ -241,12 +242,12 @@ gst_file_src_class_init (GstFileSrcClass * klass)
|
|||
g_object_class_install_property (gobject_class, ARG_USEMMAP,
|
||||
g_param_spec_boolean ("use-mmap", "Use mmap to read data",
|
||||
"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_param_spec_boolean ("sequential", "Optimise for sequential mmap access",
|
||||
"Whether to use madvise to hint to the kernel that access to "
|
||||
"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);
|
||||
|
||||
|
|
|
@ -184,52 +184,57 @@ gst_identity_class_init (GstIdentityClass * klass)
|
|||
g_object_class_install_property (gobject_class, PROP_SLEEP_TIME,
|
||||
g_param_spec_uint ("sleep-time", "Sleep time",
|
||||
"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_param_spec_int ("error_after", "Error After", "Error after N buffers",
|
||||
G_MININT, G_MAXINT, DEFAULT_ERROR_AFTER, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_DROP_PROBABILITY, g_param_spec_float ("drop_probability",
|
||||
"Drop Probability",
|
||||
g_param_spec_int ("error-after", "Error After", "Error after N buffers",
|
||||
G_MININT, G_MAXINT, DEFAULT_ERROR_AFTER,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, PROP_DROP_PROBABILITY,
|
||||
g_param_spec_float ("drop-probability", "Drop Probability",
|
||||
"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_param_spec_int ("datarate", "Datarate",
|
||||
"(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_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_param_spec_boolean ("single-segment", "Single 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_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_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_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_param_spec_boolean ("check-perfect", "Check For Perfect Stream",
|
||||
"Verify that the stream is time- and data-contiguous. "
|
||||
"This only logs in the debug log. This will be deprecated in favor "
|
||||
"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,
|
||||
PROP_CHECK_IMPERFECT_TIMESTAMP,
|
||||
g_param_spec_boolean ("check-imperfect-timestamp",
|
||||
"Check for discontiguous timestamps",
|
||||
"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_param_spec_boolean ("check-imperfect-offset",
|
||||
"Check for discontiguous offset",
|
||||
"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
|
||||
|
@ -242,7 +247,7 @@ gst_identity_class_init (GstIdentityClass * klass)
|
|||
g_object_class_install_property (gobject_class, PROP_SIGNAL_HANDOFFS,
|
||||
g_param_spec_boolean ("signal-handoffs",
|
||||
"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:
|
||||
|
|
|
@ -287,28 +287,33 @@ gst_multi_queue_class_init (GstMultiQueueClass * klass)
|
|||
g_object_class_install_property (gobject_class, ARG_MAX_SIZE_BYTES,
|
||||
g_param_spec_uint ("max-size-bytes", "Max. size (kB)",
|
||||
"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_param_spec_uint ("max-size-buffers", "Max. size (buffers)",
|
||||
"Max. number of buffers in the queue (0=disable)",
|
||||
0, G_MAXUINT, DEFAULT_MAX_SIZE_BUFFERS, G_PARAM_READWRITE));
|
||||
"Max. number of buffers in the queue (0=disable)", 0, G_MAXUINT,
|
||||
DEFAULT_MAX_SIZE_BUFFERS,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, ARG_MAX_SIZE_TIME,
|
||||
g_param_spec_uint64 ("max-size-time", "Max. size (ns)",
|
||||
"Max. amount of data in the queue (in ns, 0=disable)",
|
||||
0, G_MAXUINT64, DEFAULT_MAX_SIZE_TIME, G_PARAM_READWRITE));
|
||||
"Max. amount of data in the queue (in ns, 0=disable)", 0, G_MAXUINT64,
|
||||
DEFAULT_MAX_SIZE_TIME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
g_object_class_install_property (gobject_class, ARG_EXTRA_SIZE_BYTES,
|
||||
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)",
|
||||
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_param_spec_uint ("extra-size-buffers", "Extra Size (buffers)",
|
||||
"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_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)",
|
||||
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);
|
||||
|
||||
|
|
|
@ -310,46 +310,49 @@ gst_queue_class_init (GstQueueClass * 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_BUFFERS,
|
||||
g_param_spec_uint ("current-level-buffers", "Current level (buffers)",
|
||||
"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_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));
|
||||
0, G_MAXUINT64, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
g_object_class_install_property (gobject_class, ARG_MAX_SIZE_BYTES,
|
||||
g_param_spec_uint ("max-size-bytes", "Max. size (kB)",
|
||||
"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_param_spec_uint ("max-size-buffers", "Max. size (buffers)",
|
||||
"Max. number of buffers in the queue (0=disable)",
|
||||
0, G_MAXUINT, DEFAULT_MAX_SIZE_BUFFERS, G_PARAM_READWRITE));
|
||||
"Max. number of buffers in the queue (0=disable)", 0, G_MAXUINT,
|
||||
DEFAULT_MAX_SIZE_BUFFERS,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, ARG_MAX_SIZE_TIME,
|
||||
g_param_spec_uint64 ("max-size-time", "Max. size (ns)",
|
||||
"Max. amount of data in the queue (in ns, 0=disable)",
|
||||
0, G_MAXUINT64, DEFAULT_MAX_SIZE_TIME, G_PARAM_READWRITE));
|
||||
"Max. amount of data in the queue (in ns, 0=disable)", 0, G_MAXUINT64,
|
||||
DEFAULT_MAX_SIZE_TIME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
g_object_class_install_property (gobject_class, ARG_MIN_THRESHOLD_BYTES,
|
||||
g_param_spec_uint ("min-threshold-bytes", "Min. threshold (kB)",
|
||||
"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_param_spec_uint ("min-threshold-buffers", "Min. threshold (buffers)",
|
||||
"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_param_spec_uint64 ("min-threshold-time", "Min. threshold (ns)",
|
||||
"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_param_spec_enum ("leaky", "Leaky",
|
||||
"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 */
|
||||
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_queue_finalize);
|
||||
|
|
|
@ -166,27 +166,29 @@ gst_tee_class_init (GstTeeClass * klass)
|
|||
g_object_class_install_property (gobject_class, PROP_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,
|
||||
G_PARAM_READABLE));
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, PROP_HAS_SINK_LOOP,
|
||||
g_param_spec_boolean ("has-sink-loop", "Has Sink Loop",
|
||||
"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_param_spec_boolean ("has-chain", "Has Chain",
|
||||
"If the element can operate in push mode",
|
||||
DEFAULT_PROP_HAS_CHAIN, G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
|
||||
"If the element can operate in push mode", DEFAULT_PROP_HAS_CHAIN,
|
||||
G_PARAM_CONSTRUCT | 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_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_param_spec_string ("last_message", "Last Message",
|
||||
g_param_spec_string ("last-message", "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_param_spec_enum ("pull-mode", "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 =
|
||||
GST_DEBUG_FUNCPTR (gst_tee_request_new_pad);
|
||||
|
|
|
@ -191,16 +191,17 @@ gst_type_find_element_class_init (GstTypeFindElementClass * typefind_class)
|
|||
g_object_class_install_property (gobject_class, ARG_CAPS,
|
||||
g_param_spec_boxed ("caps", _("caps"),
|
||||
_("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_param_spec_uint ("minimum", _("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_param_spec_uint ("maximum", _("maximum"),
|
||||
"probability to stop typefinding (deprecated; non-functional)",
|
||||
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:
|
||||
* @typefind: the typefind instance
|
||||
|
|
|
@ -192,7 +192,8 @@ gst_file_index_class_init (GstFileIndexClass * klass)
|
|||
|
||||
g_object_class_install_property (gobject_class, ARG_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
|
||||
|
|
Loading…
Reference in a new issue