mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-18 04:05:34 +00:00
Correct all relevant warnings found by the sparse semantic code analyzer. This include marking several symbols static...
Original commit message from CVS: * gst/gstconfig.h.in: * libs/gst/base/gstcollectpads.c: (gst_collect_pads_read_buffer): * libs/gst/check/gstcheck.c: (gst_check_log_message_func), (gst_check_log_critical_func), (gst_check_drop_buffers), (gst_check_element_push_buffer_list): * libs/gst/controller/gstcontroller.c: (gst_controller_get), (gst_controller_get_type): * libs/gst/controller/gsthelper.c: (gst_object_control_properties), (gst_object_get_controller), (gst_object_get_control_source): * libs/gst/controller/gstinterpolationcontrolsource.c: (gst_interpolation_control_source_new): * libs/gst/controller/gstlfocontrolsource.c: (gst_lfo_control_source_new): * libs/gst/dataprotocol/dataprotocol.c: (gst_dp_event_from_packet_0_2): * plugins/elements/gstfdsrc.c: * plugins/elements/gstmultiqueue.c: * plugins/elements/gsttee.c: * plugins/elements/gsttypefindelement.c: * plugins/indexers/gstfileindex.c: (_file_index_id_save_xml), (gst_file_index_add_association): * plugins/indexers/gstmemindex.c: * tests/benchmarks/gstpollstress.c: (mess_some_more): * tests/check/elements/queue.c: (setup_queue): * tests/check/gst/gstpipeline.c: * tests/check/libs/collectpads.c: (setup), (teardown), (gst_collect_pads_suite): * tests/examples/adapter/adapter_test.c: * tests/examples/metadata/read-metadata.c: (make_pipeline): * tests/examples/xml/createxml.c: * tests/examples/xml/runxml.c: * tools/gst-inspect.c: * tools/gst-run.c: Correct all relevant warnings found by the sparse semantic code analyzer. This include marking several symbols static, using NULL instead of 0 for pointers, not using variable sized arrays on the stack, moving variable declarations to the beginning of a block and using "foo (void)" instead of "foo ()" for declarations.
This commit is contained in:
parent
c483eb5489
commit
b997b0545a
25 changed files with 107 additions and 64 deletions
41
ChangeLog
41
ChangeLog
|
@ -1,3 +1,44 @@
|
||||||
|
2008-02-29 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
|
* gst/gstconfig.h.in:
|
||||||
|
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_read_buffer):
|
||||||
|
* libs/gst/check/gstcheck.c: (gst_check_log_message_func),
|
||||||
|
(gst_check_log_critical_func), (gst_check_drop_buffers),
|
||||||
|
(gst_check_element_push_buffer_list):
|
||||||
|
* libs/gst/controller/gstcontroller.c: (gst_controller_get),
|
||||||
|
(gst_controller_get_type):
|
||||||
|
* libs/gst/controller/gsthelper.c: (gst_object_control_properties),
|
||||||
|
(gst_object_get_controller), (gst_object_get_control_source):
|
||||||
|
* libs/gst/controller/gstinterpolationcontrolsource.c:
|
||||||
|
(gst_interpolation_control_source_new):
|
||||||
|
* libs/gst/controller/gstlfocontrolsource.c:
|
||||||
|
(gst_lfo_control_source_new):
|
||||||
|
* libs/gst/dataprotocol/dataprotocol.c:
|
||||||
|
(gst_dp_event_from_packet_0_2):
|
||||||
|
* plugins/elements/gstfdsrc.c:
|
||||||
|
* plugins/elements/gstmultiqueue.c:
|
||||||
|
* plugins/elements/gsttee.c:
|
||||||
|
* plugins/elements/gsttypefindelement.c:
|
||||||
|
* plugins/indexers/gstfileindex.c: (_file_index_id_save_xml),
|
||||||
|
(gst_file_index_add_association):
|
||||||
|
* plugins/indexers/gstmemindex.c:
|
||||||
|
* tests/benchmarks/gstpollstress.c: (mess_some_more):
|
||||||
|
* tests/check/elements/queue.c: (setup_queue):
|
||||||
|
* tests/check/gst/gstpipeline.c:
|
||||||
|
* tests/check/libs/collectpads.c: (setup), (teardown),
|
||||||
|
(gst_collect_pads_suite):
|
||||||
|
* tests/examples/adapter/adapter_test.c:
|
||||||
|
* tests/examples/metadata/read-metadata.c: (make_pipeline):
|
||||||
|
* tests/examples/xml/createxml.c:
|
||||||
|
* tests/examples/xml/runxml.c:
|
||||||
|
* tools/gst-inspect.c:
|
||||||
|
* tools/gst-run.c:
|
||||||
|
Correct all relevant warnings found by the sparse semantic code
|
||||||
|
analyzer. This include marking several symbols static, using
|
||||||
|
NULL instead of 0 for pointers, not using variable sized arrays
|
||||||
|
on the stack, moving variable declarations to the beginning of
|
||||||
|
a block and using "foo (void)" instead of "foo ()" for declarations.
|
||||||
|
|
||||||
2008-02-29 Sebastian Dröge <slomo@circular-chaos.org>
|
2008-02-29 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
* plugins/elements/gstfdsink.c: (gst_fd_sink_update_fd):
|
* plugins/elements/gstfdsink.c: (gst_fd_sink_update_fd):
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
|
|
||||||
/***** default padding of structures *****/
|
/***** default padding of structures *****/
|
||||||
#define GST_PADDING 4
|
#define GST_PADDING 4
|
||||||
#define GST_PADDING_INIT {0}
|
#define GST_PADDING_INIT { NULL }
|
||||||
|
|
||||||
/***** padding for very extensible base classes *****/
|
/***** padding for very extensible base classes *****/
|
||||||
#define GST_PADDING_LARGE 20
|
#define GST_PADDING_LARGE 20
|
||||||
|
|
|
@ -865,9 +865,9 @@ gst_collect_pads_read_buffer (GstCollectPads * pads, GstCollectData * data,
|
||||||
guint readsize;
|
guint readsize;
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer;
|
||||||
|
|
||||||
g_return_val_if_fail (pads != NULL, 0);
|
g_return_val_if_fail (pads != NULL, NULL);
|
||||||
g_return_val_if_fail (GST_IS_COLLECT_PADS (pads), 0);
|
g_return_val_if_fail (GST_IS_COLLECT_PADS (pads), NULL);
|
||||||
g_return_val_if_fail (data != NULL, 0);
|
g_return_val_if_fail (data != NULL, NULL);
|
||||||
|
|
||||||
/* no buffer, must be EOS */
|
/* no buffer, must be EOS */
|
||||||
if ((buffer = data->buffer) == NULL)
|
if ((buffer = data->buffer) == NULL)
|
||||||
|
|
|
@ -48,12 +48,13 @@ GList *buffers = NULL;
|
||||||
GMutex *check_mutex = NULL;
|
GMutex *check_mutex = NULL;
|
||||||
GCond *check_cond = NULL;
|
GCond *check_cond = NULL;
|
||||||
|
|
||||||
|
/* FIXME 0.11: shouldn't _gst_check_debug be static? Not used anywhere */
|
||||||
gboolean _gst_check_debug = FALSE;
|
gboolean _gst_check_debug = FALSE;
|
||||||
gboolean _gst_check_raised_critical = FALSE;
|
gboolean _gst_check_raised_critical = FALSE;
|
||||||
gboolean _gst_check_raised_warning = FALSE;
|
gboolean _gst_check_raised_warning = FALSE;
|
||||||
gboolean _gst_check_expecting_log = FALSE;
|
gboolean _gst_check_expecting_log = FALSE;
|
||||||
|
|
||||||
void gst_check_log_message_func
|
static void gst_check_log_message_func
|
||||||
(const gchar * log_domain, GLogLevelFlags log_level,
|
(const gchar * log_domain, GLogLevelFlags log_level,
|
||||||
const gchar * message, gpointer user_data)
|
const gchar * message, gpointer user_data)
|
||||||
{
|
{
|
||||||
|
@ -62,7 +63,7 @@ void gst_check_log_message_func
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void gst_check_log_critical_func
|
static void gst_check_log_critical_func
|
||||||
(const gchar * log_domain, GLogLevelFlags log_level,
|
(const gchar * log_domain, GLogLevelFlags log_level,
|
||||||
const gchar * message, gpointer user_data)
|
const gchar * message, gpointer user_data)
|
||||||
{
|
{
|
||||||
|
@ -280,7 +281,7 @@ gst_check_teardown_sink_pad (GstElement * element)
|
||||||
* Since: 0.10.18
|
* Since: 0.10.18
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gst_check_drop_buffers ()
|
gst_check_drop_buffers (void)
|
||||||
{
|
{
|
||||||
GstBuffer *temp_buffer;
|
GstBuffer *temp_buffer;
|
||||||
|
|
||||||
|
@ -342,6 +343,7 @@ gst_check_element_push_buffer_list (const gchar * element_name,
|
||||||
GstPad *pad_peer;
|
GstPad *pad_peer;
|
||||||
GstPad *sink_pad = NULL;
|
GstPad *sink_pad = NULL;
|
||||||
GstPad *src_pad;
|
GstPad *src_pad;
|
||||||
|
GstBuffer *buffer;
|
||||||
|
|
||||||
/* check that there are no buffers waiting */
|
/* check that there are no buffers waiting */
|
||||||
gst_check_drop_buffers ();
|
gst_check_drop_buffers ();
|
||||||
|
@ -350,7 +352,7 @@ gst_check_element_push_buffer_list (const gchar * element_name,
|
||||||
fail_if (element == NULL, "failed to create the element '%s'", element_name);
|
fail_if (element == NULL, "failed to create the element '%s'", element_name);
|
||||||
fail_unless (GST_IS_ELEMENT (element), "the element is no element");
|
fail_unless (GST_IS_ELEMENT (element), "the element is no element");
|
||||||
/* create the src pad */
|
/* create the src pad */
|
||||||
GstBuffer *buffer = GST_BUFFER (buffer_in->data);
|
buffer = GST_BUFFER (buffer_in->data);
|
||||||
|
|
||||||
fail_unless (GST_IS_BUFFER (buffer), "There should be a buffer in buffer_in");
|
fail_unless (GST_IS_BUFFER (buffer), "There should be a buffer in buffer_in");
|
||||||
src_caps = GST_BUFFER_CAPS (buffer);
|
src_caps = GST_BUFFER_CAPS (buffer);
|
||||||
|
@ -366,11 +368,13 @@ gst_check_element_push_buffer_list (const gchar * element_name,
|
||||||
GST_DEBUG ("src pad activated");
|
GST_DEBUG ("src pad activated");
|
||||||
/* don't create the sink_pad if there is no buffer_out list */
|
/* don't create the sink_pad if there is no buffer_out list */
|
||||||
if (buffer_out != NULL) {
|
if (buffer_out != NULL) {
|
||||||
|
gchar *temp;
|
||||||
|
|
||||||
GST_DEBUG ("buffer out detected, creating the sink pad");
|
GST_DEBUG ("buffer out detected, creating the sink pad");
|
||||||
/* get the sink caps */
|
/* get the sink caps */
|
||||||
sink_caps = GST_BUFFER_CAPS (GST_BUFFER (buffer_out->data));
|
sink_caps = GST_BUFFER_CAPS (GST_BUFFER (buffer_out->data));
|
||||||
fail_unless (GST_IS_CAPS (sink_caps), "buffer out don't have caps");
|
fail_unless (GST_IS_CAPS (sink_caps), "buffer out don't have caps");
|
||||||
gchar *temp = gst_caps_to_string (sink_caps);
|
temp = gst_caps_to_string (sink_caps);
|
||||||
|
|
||||||
GST_DEBUG ("sink caps requested by buffer out: '%s'", temp);
|
GST_DEBUG ("sink caps requested by buffer out: '%s'", temp);
|
||||||
g_free (temp);
|
g_free (temp);
|
||||||
|
|
|
@ -604,7 +604,7 @@ gst_controller_get (GstController * self, gchar * property_name,
|
||||||
res = gst_control_source_get_value (prop->csource, timestamp, val);
|
res = gst_control_source_get_value (prop->csource, timestamp, val);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
g_free (val);
|
g_free (val);
|
||||||
val = FALSE;
|
val = NULL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
g_object_get_property (self->object, prop->name, val);
|
g_object_get_property (self->object, prop->name, val);
|
||||||
|
@ -924,7 +924,7 @@ _gst_controller_class_init (GstControllerClass * klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
GType
|
GType
|
||||||
gst_controller_get_type ()
|
gst_controller_get_type (void)
|
||||||
{
|
{
|
||||||
static GType type = 0;
|
static GType type = 0;
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ gst_object_control_properties (GObject * object, ...)
|
||||||
GstController *ctrl;
|
GstController *ctrl;
|
||||||
va_list var_args;
|
va_list var_args;
|
||||||
|
|
||||||
g_return_val_if_fail (G_IS_OBJECT (object), FALSE);
|
g_return_val_if_fail (G_IS_OBJECT (object), NULL);
|
||||||
|
|
||||||
va_start (var_args, object);
|
va_start (var_args, object);
|
||||||
ctrl = gst_controller_new_valist (object, var_args);
|
ctrl = gst_controller_new_valist (object, var_args);
|
||||||
|
@ -115,7 +115,7 @@ gst_object_uncontrol_properties (GObject * object, ...)
|
||||||
GstController *
|
GstController *
|
||||||
gst_object_get_controller (GObject * object)
|
gst_object_get_controller (GObject * object)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (G_IS_OBJECT (object), FALSE);
|
g_return_val_if_fail (G_IS_OBJECT (object), NULL);
|
||||||
|
|
||||||
return (g_object_get_qdata (object, priv_gst_controller_key));
|
return (g_object_get_qdata (object, priv_gst_controller_key));
|
||||||
}
|
}
|
||||||
|
@ -238,12 +238,12 @@ gst_object_get_control_source (GObject * object, gchar * property_name)
|
||||||
{
|
{
|
||||||
GstController *ctrl = NULL;
|
GstController *ctrl = NULL;
|
||||||
|
|
||||||
g_return_val_if_fail (G_IS_OBJECT (object), FALSE);
|
g_return_val_if_fail (G_IS_OBJECT (object), NULL);
|
||||||
|
|
||||||
if ((ctrl = g_object_get_qdata (object, priv_gst_controller_key))) {
|
if ((ctrl = g_object_get_qdata (object, priv_gst_controller_key))) {
|
||||||
return gst_controller_get_control_source (ctrl, property_name);
|
return gst_controller_get_control_source (ctrl, property_name);
|
||||||
}
|
}
|
||||||
return FALSE;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -110,7 +110,7 @@ gst_interpolation_control_source_reset (GstInterpolationControlSource * self)
|
||||||
* Returns: a new, unbound #GstInterpolationControlSource.
|
* Returns: a new, unbound #GstInterpolationControlSource.
|
||||||
*/
|
*/
|
||||||
GstInterpolationControlSource *
|
GstInterpolationControlSource *
|
||||||
gst_interpolation_control_source_new ()
|
gst_interpolation_control_source_new (void)
|
||||||
{
|
{
|
||||||
return g_object_new (GST_TYPE_INTERPOLATION_CONTROL_SOURCE, NULL);
|
return g_object_new (GST_TYPE_INTERPOLATION_CONTROL_SOURCE, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -564,7 +564,7 @@ gst_lfo_control_source_reset (GstLFOControlSource * self)
|
||||||
* Returns: a new, unbound #GstLFOControlSource.
|
* Returns: a new, unbound #GstLFOControlSource.
|
||||||
*/
|
*/
|
||||||
GstLFOControlSource *
|
GstLFOControlSource *
|
||||||
gst_lfo_control_source_new ()
|
gst_lfo_control_source_new (void)
|
||||||
{
|
{
|
||||||
return g_object_new (GST_TYPE_LFO_CONTROL_SOURCE, NULL);
|
return g_object_new (GST_TYPE_LFO_CONTROL_SOURCE, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -654,7 +654,7 @@ gst_dp_event_from_packet_0_2 (guint header_length, const guint8 * header,
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case GST_EVENT_UNKNOWN:
|
case GST_EVENT_UNKNOWN:
|
||||||
GST_WARNING ("Unknown event, ignoring");
|
GST_WARNING ("Unknown event, ignoring");
|
||||||
return FALSE;
|
return NULL;
|
||||||
case GST_EVENT_EOS:
|
case GST_EVENT_EOS:
|
||||||
case GST_EVENT_FLUSH_START:
|
case GST_EVENT_FLUSH_START:
|
||||||
case GST_EVENT_FLUSH_STOP:
|
case GST_EVENT_FLUSH_STOP:
|
||||||
|
@ -690,10 +690,10 @@ gst_dp_event_from_packet_0_2 (guint header_length, const guint8 * header,
|
||||||
case GST_EVENT_NAVIGATION:
|
case GST_EVENT_NAVIGATION:
|
||||||
case GST_EVENT_TAG:
|
case GST_EVENT_TAG:
|
||||||
GST_WARNING ("Unhandled event type %d, ignoring", type);
|
GST_WARNING ("Unhandled event type %d, ignoring", type);
|
||||||
return FALSE;
|
return NULL;
|
||||||
default:
|
default:
|
||||||
GST_WARNING ("Unknown event type %d, ignoring", type);
|
GST_WARNING ("Unknown event type %d, ignoring", type);
|
||||||
return FALSE;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return event;
|
return event;
|
||||||
|
|
|
@ -411,7 +411,7 @@ read_error:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
static gboolean
|
||||||
gst_fd_src_is_seekable (GstBaseSrc * bsrc)
|
gst_fd_src_is_seekable (GstBaseSrc * bsrc)
|
||||||
{
|
{
|
||||||
GstFdSrc *src = GST_FD_SRC (bsrc);
|
GstFdSrc *src = GST_FD_SRC (bsrc);
|
||||||
|
@ -419,7 +419,7 @@ gst_fd_src_is_seekable (GstBaseSrc * bsrc)
|
||||||
return src->seekable_fd;
|
return src->seekable_fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
static gboolean
|
||||||
gst_fd_src_get_size (GstBaseSrc * bsrc, guint64 * size)
|
gst_fd_src_get_size (GstBaseSrc * bsrc, guint64 * size)
|
||||||
{
|
{
|
||||||
GstFdSrc *src = GST_FD_SRC (bsrc);
|
GstFdSrc *src = GST_FD_SRC (bsrc);
|
||||||
|
@ -445,7 +445,7 @@ could_not_stat:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
static gboolean
|
||||||
gst_fd_src_do_seek (GstBaseSrc * bsrc, GstSegment * segment)
|
gst_fd_src_do_seek (GstBaseSrc * bsrc, GstSegment * segment)
|
||||||
{
|
{
|
||||||
gint res;
|
gint res;
|
||||||
|
|
|
@ -438,7 +438,7 @@ gst_multi_queue_get_property (GObject * object, guint prop_id,
|
||||||
GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
|
GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
|
||||||
}
|
}
|
||||||
|
|
||||||
GList *
|
static GList *
|
||||||
gst_multi_queue_get_internal_links (GstPad * pad)
|
gst_multi_queue_get_internal_links (GstPad * pad)
|
||||||
{
|
{
|
||||||
GList *res = NULL;
|
GList *res = NULL;
|
||||||
|
|
|
@ -81,7 +81,7 @@ enum
|
||||||
PROP_PULL_MODE,
|
PROP_PULL_MODE,
|
||||||
};
|
};
|
||||||
|
|
||||||
GstStaticPadTemplate tee_src_template = GST_STATIC_PAD_TEMPLATE ("src%d",
|
static GstStaticPadTemplate tee_src_template = GST_STATIC_PAD_TEMPLATE ("src%d",
|
||||||
GST_PAD_SRC,
|
GST_PAD_SRC,
|
||||||
GST_PAD_REQUEST,
|
GST_PAD_REQUEST,
|
||||||
GST_STATIC_CAPS_ANY);
|
GST_STATIC_CAPS_ANY);
|
||||||
|
|
|
@ -64,13 +64,13 @@ GST_DEBUG_CATEGORY_STATIC (gst_type_find_element_debug);
|
||||||
#define GST_CAT_DEFAULT gst_type_find_element_debug
|
#define GST_CAT_DEFAULT gst_type_find_element_debug
|
||||||
|
|
||||||
/* generic templates */
|
/* generic templates */
|
||||||
GstStaticPadTemplate type_find_element_sink_template =
|
static GstStaticPadTemplate type_find_element_sink_template =
|
||||||
GST_STATIC_PAD_TEMPLATE ("sink",
|
GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS_ANY);
|
GST_STATIC_CAPS_ANY);
|
||||||
|
|
||||||
GstStaticPadTemplate type_find_element_src_template =
|
static GstStaticPadTemplate type_find_element_src_template =
|
||||||
GST_STATIC_PAD_TEMPLATE ("src",
|
GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
GST_PAD_SRC,
|
GST_PAD_SRC,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
|
|
|
@ -144,7 +144,7 @@ static GstIndexEntry *gst_file_index_get_assoc_entry (GstIndex * index, gint id,
|
||||||
|
|
||||||
static GstIndex *parent_class = NULL;
|
static GstIndex *parent_class = NULL;
|
||||||
|
|
||||||
GType
|
static GType
|
||||||
gst_file_index_get_type (void)
|
gst_file_index_get_type (void)
|
||||||
{
|
{
|
||||||
static GType file_index_type = 0;
|
static GType file_index_type = 0;
|
||||||
|
@ -261,7 +261,7 @@ struct fi_find_writer_context
|
||||||
GstFileIndexId *ii;
|
GstFileIndexId *ii;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
static void
|
||||||
_fi_find_writer (gpointer key, gpointer val, gpointer data)
|
_fi_find_writer (gpointer key, gpointer val, gpointer data)
|
||||||
{
|
{
|
||||||
struct fi_find_writer_context *cx = data;
|
struct fi_find_writer_context *cx = data;
|
||||||
|
@ -495,7 +495,7 @@ static void
|
||||||
_file_index_id_save_xml (gpointer _key, GstFileIndexId * ii, xmlNodePtr writers)
|
_file_index_id_save_xml (gpointer _key, GstFileIndexId * ii, xmlNodePtr writers)
|
||||||
{
|
{
|
||||||
const gint bufsize = 16;
|
const gint bufsize = 16;
|
||||||
gchar buf[bufsize];
|
gchar buf[16];
|
||||||
xmlNodePtr writer;
|
xmlNodePtr writer;
|
||||||
xmlNodePtr formats;
|
xmlNodePtr formats;
|
||||||
gint xx;
|
gint xx;
|
||||||
|
@ -807,7 +807,7 @@ gst_file_index_add_association (GstIndex * index, GstIndexEntry * entry)
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
gchar row_data[ARRAY_ROW_SIZE (id_index)];
|
gchar *row_data = (gchar *) g_malloc (ARRAY_ROW_SIZE (id_index));
|
||||||
gint fx;
|
gint fx;
|
||||||
|
|
||||||
gint32 flags_host = GST_INDEX_ASSOC_FLAGS (entry);
|
gint32 flags_host = GST_INDEX_ASSOC_FLAGS (entry);
|
||||||
|
@ -821,6 +821,8 @@ gst_file_index_add_association (GstIndex * index, GstIndexEntry * entry)
|
||||||
}
|
}
|
||||||
|
|
||||||
g_array_insert_vals (id_index->array, mx, row_data, 1);
|
g_array_insert_vals (id_index->array, mx, row_data, 1);
|
||||||
|
|
||||||
|
g_free (row_data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ static GstIndex *parent_class = NULL;
|
||||||
|
|
||||||
/*static guint gst_mem_index_signals[LAST_SIGNAL] = { 0 }; */
|
/*static guint gst_mem_index_signals[LAST_SIGNAL] = { 0 }; */
|
||||||
|
|
||||||
GType
|
static GType
|
||||||
gst_mem_index_get_type (void)
|
gst_mem_index_get_type (void)
|
||||||
{
|
{
|
||||||
static GType mem_index_type = 0;
|
static GType mem_index_type = 0;
|
||||||
|
|
|
@ -29,7 +29,7 @@ static GTimer *timer;
|
||||||
#define MAX_THREADS 100
|
#define MAX_THREADS 100
|
||||||
|
|
||||||
static void
|
static void
|
||||||
mess_some_more ()
|
mess_some_more (void)
|
||||||
{
|
{
|
||||||
GList *walk;
|
GList *walk;
|
||||||
gint random;
|
gint random;
|
||||||
|
@ -107,7 +107,7 @@ mess_some_more ()
|
||||||
g_mutex_unlock (fdlock);
|
g_mutex_unlock (fdlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
static void *
|
||||||
run_test (void *threadid)
|
run_test (void *threadid)
|
||||||
{
|
{
|
||||||
gint id = GPOINTER_TO_INT (threadid);
|
gint id = GPOINTER_TO_INT (threadid);
|
||||||
|
|
|
@ -25,13 +25,13 @@
|
||||||
#include <gst/check/gstcheck.h>
|
#include <gst/check/gstcheck.h>
|
||||||
|
|
||||||
GList *buffers = NULL;
|
GList *buffers = NULL;
|
||||||
gint overrun_count = 0;
|
static gint overrun_count = 0;
|
||||||
gint underrun_count = 0;
|
static gint underrun_count = 0;
|
||||||
|
|
||||||
/* For ease of programming we use globals to keep refs for our floating
|
/* For ease of programming we use globals to keep refs for our floating
|
||||||
* src and sink pads we create; otherwise we always have to do get_pad,
|
* src and sink pads we create; otherwise we always have to do get_pad,
|
||||||
* get_peer, and then remove references in every test function */
|
* get_peer, and then remove references in every test function */
|
||||||
GstPad *mysrcpad, *mysinkpad;
|
static GstPad *mysrcpad, *mysinkpad;
|
||||||
|
|
||||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
|
@ -59,8 +59,8 @@ queue_underrun (GstElement * queue, gpointer user_data)
|
||||||
g_mutex_unlock (check_mutex);
|
g_mutex_unlock (check_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
GstElement *
|
static GstElement *
|
||||||
setup_queue ()
|
setup_queue (void)
|
||||||
{
|
{
|
||||||
GstElement *queue;
|
GstElement *queue;
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ setup_queue ()
|
||||||
return queue;
|
return queue;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
cleanup_queue (GstElement * queue)
|
cleanup_queue (GstElement * queue)
|
||||||
{
|
{
|
||||||
GST_DEBUG ("cleanup_queue");
|
GST_DEBUG ("cleanup_queue");
|
||||||
|
@ -431,7 +431,7 @@ GST_START_TEST (test_time_level)
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
Suite *
|
static Suite *
|
||||||
queue_suite (void)
|
queue_suite (void)
|
||||||
{
|
{
|
||||||
Suite *s = suite_create ("queue");
|
Suite *s = suite_create ("queue");
|
||||||
|
|
|
@ -127,9 +127,9 @@ GST_START_TEST (test_get_bus)
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
GMainLoop *loop = NULL;
|
static GMainLoop *loop = NULL;
|
||||||
|
|
||||||
gboolean
|
static gboolean
|
||||||
message_received (GstBus * bus, GstMessage * message, gpointer data)
|
message_received (GstBus * bus, GstMessage * message, gpointer data)
|
||||||
{
|
{
|
||||||
GstElement *pipeline = GST_ELEMENT (data);
|
GstElement *pipeline = GST_ELEMENT (data);
|
||||||
|
@ -487,7 +487,7 @@ GST_START_TEST (test_base_time)
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
Suite *
|
static Suite *
|
||||||
gst_pipeline_suite (void)
|
gst_pipeline_suite (void)
|
||||||
{
|
{
|
||||||
Suite *s = suite_create ("GstPipeline");
|
Suite *s = suite_create ("GstPipeline");
|
||||||
|
|
|
@ -62,8 +62,8 @@ static GstPad *srcpad1, *srcpad2;
|
||||||
static GstPad *sinkpad1, *sinkpad2;
|
static GstPad *sinkpad1, *sinkpad2;
|
||||||
static TestData *data1, *data2;
|
static TestData *data1, *data2;
|
||||||
|
|
||||||
GMutex *lock;
|
static GMutex *lock;
|
||||||
GCond *cond;
|
static GCond *cond;
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
collected_cb (GstCollectPads * pads, gpointer user_data)
|
collected_cb (GstCollectPads * pads, gpointer user_data)
|
||||||
|
@ -98,7 +98,7 @@ push_event (gpointer user_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
setup ()
|
setup (void)
|
||||||
{
|
{
|
||||||
collect = gst_collect_pads_new ();
|
collect = gst_collect_pads_new ();
|
||||||
gst_collect_pads_set_function (collect, collected_cb, NULL);
|
gst_collect_pads_set_function (collect, collected_cb, NULL);
|
||||||
|
@ -118,7 +118,7 @@ setup ()
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
teardown ()
|
teardown (void)
|
||||||
{
|
{
|
||||||
gst_object_unref (sinkpad1);
|
gst_object_unref (sinkpad1);
|
||||||
gst_object_unref (sinkpad2);
|
gst_object_unref (sinkpad2);
|
||||||
|
@ -328,7 +328,7 @@ GST_START_TEST (test_collect_twice)
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
static Suite *
|
static Suite *
|
||||||
gst_collect_pads_suite ()
|
gst_collect_pads_suite (void)
|
||||||
{
|
{
|
||||||
Suite *suite;
|
Suite *suite;
|
||||||
TCase *general;
|
TCase *general;
|
||||||
|
|
|
@ -17,7 +17,7 @@ struct TestParams
|
||||||
* them out in 'read size' sized pieces, using take and then take_buffer,
|
* them out in 'read size' sized pieces, using take and then take_buffer,
|
||||||
* and prints the timings */
|
* and prints the timings */
|
||||||
|
|
||||||
struct TestParams param_sets[] = {
|
static struct TestParams param_sets[] = {
|
||||||
/* These values put ~256MB in 1MB chunks in an adapter, then reads them out
|
/* These values put ~256MB in 1MB chunks in an adapter, then reads them out
|
||||||
* in 250kb blocks */
|
* in 250kb blocks */
|
||||||
{256000000, 250000, 1000000},
|
{256000000, 250000, 1000000},
|
||||||
|
@ -28,9 +28,9 @@ struct TestParams param_sets[] = {
|
||||||
* in 1000 byte blocks */
|
* in 1000 byte blocks */
|
||||||
{25600000, 1000, 200}
|
{25600000, 1000, 200}
|
||||||
};
|
};
|
||||||
const gint n_tests = sizeof (param_sets) / sizeof (struct TestParams);
|
static const gint n_tests = sizeof (param_sets) / sizeof (struct TestParams);
|
||||||
|
|
||||||
gint ticks_per_sec;
|
static gint ticks_per_sec;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
run_test_take (struct TestParams *params)
|
run_test_take (struct TestParams *params)
|
||||||
|
@ -88,7 +88,7 @@ run_test_take_buffer (struct TestParams *params)
|
||||||
g_object_unref (adapter);
|
g_object_unref (adapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
run_tests (struct TestParams *params)
|
run_tests (struct TestParams *params)
|
||||||
{
|
{
|
||||||
struct tms time_data;
|
struct tms time_data;
|
||||||
|
|
|
@ -32,9 +32,9 @@
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
char *filename = NULL;
|
static char *filename = NULL;
|
||||||
GstElement *pipeline = NULL;
|
static GstElement *pipeline = NULL;
|
||||||
GstElement *source = NULL;
|
static GstElement *source = NULL;
|
||||||
|
|
||||||
#define NEW_PIPE_PER_FILE
|
#define NEW_PIPE_PER_FILE
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ message_loop (GstElement * element, GstTagList ** tags)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
make_pipeline ()
|
make_pipeline (void)
|
||||||
{
|
{
|
||||||
GstElement *decodebin;
|
GstElement *decodebin;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
gboolean playing;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
object_saved (GstObject * object, xmlNodePtr parent, gpointer data)
|
object_saved (GstObject * object, xmlNodePtr parent, gpointer data)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
gboolean playing;
|
|
||||||
|
|
||||||
G_GNUC_UNUSED static void
|
G_GNUC_UNUSED static void
|
||||||
xml_loaded (GstXML * xml, GstObject * object, xmlNodePtr self, gpointer data)
|
xml_loaded (GstXML * xml, GstObject * object, xmlNodePtr self, gpointer data)
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,7 +38,7 @@ static char *_name = NULL;
|
||||||
static int print_element_info (GstElementFactory * factory,
|
static int print_element_info (GstElementFactory * factory,
|
||||||
gboolean print_names);
|
gboolean print_names);
|
||||||
|
|
||||||
void
|
static void
|
||||||
n_print (const char *format, ...)
|
n_print (const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
|
@ -147,7 +147,7 @@ unmangle_libtool (gchar ** dir, gchar ** base)
|
||||||
*
|
*
|
||||||
* The returned string is newly allocated.
|
* The returned string is newly allocated.
|
||||||
*/
|
*/
|
||||||
gchar *
|
static gchar *
|
||||||
get_dir_of_binary (const gchar * binary)
|
get_dir_of_binary (const gchar * binary)
|
||||||
{
|
{
|
||||||
gchar *base, *dir;
|
gchar *base, *dir;
|
||||||
|
@ -192,7 +192,7 @@ get_dir_of_binary (const gchar * binary)
|
||||||
/* Search the given directory for candidate binaries matching the base binary.
|
/* Search the given directory for candidate binaries matching the base binary.
|
||||||
* Return a GHashTable of major/minor -> directory pairs
|
* Return a GHashTable of major/minor -> directory pairs
|
||||||
*/
|
*/
|
||||||
GHashTable *
|
static GHashTable *
|
||||||
get_candidates (const gchar * dir, const gchar * base)
|
get_candidates (const gchar * dir, const gchar * base)
|
||||||
{
|
{
|
||||||
GDir *gdir;
|
GDir *gdir;
|
||||||
|
|
Loading…
Reference in a new issue