summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2011-08-26 14:37:54 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2011-08-26 14:37:54 +0200
commit5cf8e689440493c51cfc94e178af94f25b04e526 (patch)
treefcffdf4cf6ef72bff97316f527e5c72d8182d580
parentd924c30f5b881677c32e10b63c844c20d41d526a (diff)
parent185ab7f325da9b8ff3f9c9e16b47d2bea2fc3636 (diff)
Merge branch 'master' into 0.11
Conflicts: gst/gstmessage.c gst/gstquery.c gst/gstregistrychunks.c gst/gstsegment.c libs/gst/base/gstbasetransform.c libs/gst/base/gstbasetransform.h libs/gst/base/gsttypefindhelper.c plugins/elements/gsttypefindelement.c
-rw-r--r--gst/gstformat.c4
-rw-r--r--gst/gstindex.c2
-rw-r--r--gst/gstinfo.c2
-rw-r--r--gst/gstmessage.c25
-rw-r--r--gst/gstpad.c2
-rw-r--r--gst/gstpad.h2
-rw-r--r--gst/gstpadtemplate.c6
-rw-r--r--gst/gstquery.c31
-rw-r--r--gst/gstregistrychunks.c4
-rw-r--r--gst/gstsegment.c2
-rw-r--r--gst/gstsystemclock.c4
-rw-r--r--gst/gsttask.c2
-rw-r--r--gst/gsttrace.c2
-rw-r--r--gst/gsttrace.h8
-rw-r--r--gst/gsttypefind.h10
-rw-r--r--gst/gstutils.c2
-rw-r--r--gst/gstvalue.c2
-rw-r--r--libs/gst/base/gstbaseparse.c7
-rw-r--r--libs/gst/base/gstbasetransform.c5
-rw-r--r--libs/gst/base/gsttypefindhelper.c14
-rw-r--r--libs/gst/controller/gstlfocontrolsource.c3
-rw-r--r--plugins/elements/gsttypefindelement.c2
-rw-r--r--plugins/indexers/gstfileindex.c6
-rw-r--r--tests/examples/stepping/framestep1.c2
24 files changed, 86 insertions, 63 deletions
diff --git a/gst/gstformat.c b/gst/gstformat.c
index 0006e2ceb..1664ba84e 100644
--- a/gst/gstformat.c
+++ b/gst/gstformat.c
@@ -49,7 +49,7 @@ static GstFormatDefinition standard_definitions[] = {
{GST_FORMAT_TIME, "time", "Time", 0},
{GST_FORMAT_BUFFERS, "buffers", "Buffers", 0},
{GST_FORMAT_PERCENT, "percent", "Percent", 0},
- {0, NULL, NULL, 0}
+ {GST_FORMAT_UNDEFINED, NULL, NULL, 0}
};
void
@@ -153,7 +153,7 @@ gst_format_register (const gchar * nick, const gchar * description)
g_static_mutex_lock (&mutex);
format = g_slice_new (GstFormatDefinition);
- format->value = _n_values;
+ format->value = (GstFormat) _n_values;
format->nick = g_strdup (nick);
format->description = g_strdup (description);
format->quark = g_quark_from_static_string (format->nick);
diff --git a/gst/gstindex.c b/gst/gstindex.c
index 27d4b8b59..d168eee6c 100644
--- a/gst/gstindex.c
+++ b/gst/gstindex.c
@@ -253,7 +253,7 @@ gst_index_set_property (GObject * object, guint prop_id,
switch (prop_id) {
case ARG_RESOLVER:
- index->method = g_value_get_enum (value);
+ index->method = (GstIndexResolverMethod) g_value_get_enum (value);
index->resolver = resolvers[index->method].resolver;
index->resolver_user_data = resolvers[index->method].user_data;
break;
diff --git a/gst/gstinfo.c b/gst/gstinfo.c
index ca4c003e7..1a62b83b8 100644
--- a/gst/gstinfo.c
+++ b/gst/gstinfo.c
@@ -1479,7 +1479,7 @@ gst_debug_category_reset_threshold (GstDebugCategory * category)
GstDebugLevel
gst_debug_category_get_threshold (GstDebugCategory * category)
{
- return g_atomic_int_get (&category->threshold);
+ return (GstDebugLevel) g_atomic_int_get (&category->threshold);
}
/**
diff --git a/gst/gstmessage.c b/gst/gstmessage.c
index 634bfd175..47cf60217 100644
--- a/gst/gstmessage.c
+++ b/gst/gstmessage.c
@@ -1093,7 +1093,8 @@ gst_message_parse_buffering_stats (GstMessage * message,
structure = GST_MESSAGE_STRUCTURE (message);
if (mode)
- *mode = g_value_get_enum (gst_structure_id_get_value (structure,
+ *mode = (GstBufferingMode)
+ g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (BUFFERING_MODE)));
if (avg_in)
*avg_in = g_value_get_int (gst_structure_id_get_value (structure,
@@ -1148,15 +1149,16 @@ gst_message_parse_state_changed (GstMessage * message,
structure = GST_MESSAGE_STRUCTURE (message);
if (oldstate)
- *oldstate =
+ *oldstate = (GstState)
g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (OLD_STATE)));
if (newstate)
- *newstate =
+ *newstate = (GstState)
g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (NEW_STATE)));
if (pending)
- *pending = g_value_get_enum (gst_structure_id_get_value (structure,
+ *pending = (GstState)
+ g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (PENDING_STATE)));
}
@@ -1283,7 +1285,8 @@ gst_message_parse_structure_change (GstMessage * message,
g_return_if_fail (G_VALUE_TYPE (owner_gvalue) == GST_TYPE_ELEMENT);
if (type)
- *type = g_value_get_enum (gst_structure_id_get_value (structure,
+ *type = (GstStructureChangeType)
+ g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (TYPE)));
if (owner)
*owner = (GstElement *) g_value_get_object (owner_gvalue);
@@ -1455,7 +1458,7 @@ gst_message_parse_segment_start (GstMessage * message, GstFormat * format,
structure = GST_MESSAGE_STRUCTURE (message);
if (format)
- *format =
+ *format = (GstFormat)
g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (FORMAT)));
if (position)
@@ -1485,7 +1488,7 @@ gst_message_parse_segment_done (GstMessage * message, GstFormat * format,
structure = GST_MESSAGE_STRUCTURE (message);
if (format)
- *format =
+ *format = (GstFormat)
g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (FORMAT)));
if (position)
@@ -1518,7 +1521,7 @@ gst_message_parse_duration (GstMessage * message, GstFormat * format,
structure = GST_MESSAGE_STRUCTURE (message);
if (format)
- *format =
+ *format = (GstFormat)
g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (FORMAT)));
if (duration)
@@ -1572,7 +1575,8 @@ gst_message_parse_request_state (GstMessage * message, GstState * state)
structure = GST_MESSAGE_STRUCTURE (message);
if (state)
- *state = g_value_get_enum (gst_structure_id_get_value (structure,
+ *state = (GstState)
+ g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (NEW_STATE)));
}
@@ -1635,7 +1639,8 @@ gst_message_parse_stream_status (GstMessage * message,
g_return_if_fail (owner_gvalue != NULL);
if (type)
- *type = g_value_get_enum (gst_structure_id_get_value (structure,
+ *type = (GstStreamStatusType)
+ g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (TYPE)));
if (owner)
*owner = (GstElement *) g_value_get_object (owner_gvalue);
diff --git a/gst/gstpad.c b/gst/gstpad.c
index ced0649dc..f489b77f3 100644
--- a/gst/gstpad.c
+++ b/gst/gstpad.c
@@ -488,7 +488,7 @@ gst_pad_set_property (GObject * object, guint prop_id,
switch (prop_id) {
case PAD_PROP_DIRECTION:
- GST_PAD_DIRECTION (object) = g_value_get_enum (value);
+ GST_PAD_DIRECTION (object) = (GstPadDirection) g_value_get_enum (value);
break;
case PAD_PROP_TEMPLATE:
gst_pad_set_pad_template (GST_PAD_CAST (object),
diff --git a/gst/gstpad.h b/gst/gstpad.h
index 51e30a7bc..7470a5c0f 100644
--- a/gst/gstpad.h
+++ b/gst/gstpad.h
@@ -209,7 +209,7 @@ typedef enum {
*
* Since: 0.10.30
*/
-#define GST_PAD_LINK_CHECK_DEFAULT (GST_PAD_LINK_CHECK_HIERARCHY | GST_PAD_LINK_CHECK_CAPS)
+#define GST_PAD_LINK_CHECK_DEFAULT ((GstPadLinkCheck) (GST_PAD_LINK_CHECK_HIERARCHY | GST_PAD_LINK_CHECK_CAPS))
/**
* GstActivateMode:
diff --git a/gst/gstpadtemplate.c b/gst/gstpadtemplate.c
index e6c8c0b3f..bf8d57689 100644
--- a/gst/gstpadtemplate.c
+++ b/gst/gstpadtemplate.c
@@ -415,10 +415,12 @@ gst_pad_template_set_property (GObject * object, guint prop_id,
GST_PAD_TEMPLATE_NAME_TEMPLATE (object) = g_value_dup_string (value);
break;
case PROP_DIRECTION:
- GST_PAD_TEMPLATE_DIRECTION (object) = g_value_get_enum (value);
+ GST_PAD_TEMPLATE_DIRECTION (object) =
+ (GstPadDirection) g_value_get_enum (value);
break;
case PROP_PRESENCE:
- GST_PAD_TEMPLATE_PRESENCE (object) = g_value_get_enum (value);
+ GST_PAD_TEMPLATE_PRESENCE (object) =
+ (GstPadPresence) g_value_get_enum (value);
break;
case PROP_CAPS:
GST_PAD_TEMPLATE_CAPS (object) = g_value_dup_boxed (value);
diff --git a/gst/gstquery.c b/gst/gstquery.c
index 90cf81a78..e398e150e 100644
--- a/gst/gstquery.c
+++ b/gst/gstquery.c
@@ -105,7 +105,7 @@ static GstQueryTypeDefinition standard_definitions[] = {
{GST_QUERY_URI, "uri", "URI of the source or sink", 0},
{GST_QUERY_ALLOCATION, "allocation", "Allocation properties", 0},
{GST_QUERY_SCHEDULING, "scheduling", "Scheduling properties", 0},
- {0, NULL, NULL, 0}
+ {GST_QUERY_NONE, NULL, NULL, 0}
};
void
@@ -211,7 +211,7 @@ gst_query_type_register (const gchar * nick, const gchar * description)
return lookup;
query = g_slice_new (GstQueryTypeDefinition);
- query->value = _n_values;
+ query->value = (GstQueryType) _n_values;
query->nick = g_strdup (nick);
query->description = g_strdup (description);
query->quark = g_quark_from_static_string (query->nick);
@@ -445,7 +445,8 @@ gst_query_parse_position (GstQuery * query, GstFormat * format, gint64 * cur)
structure = GST_QUERY_STRUCTURE (query);
if (format)
- *format = g_value_get_enum (gst_structure_id_get_value (structure,
+ *format =
+ (GstFormat) g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (FORMAT)));
if (cur)
*cur = g_value_get_int64 (gst_structure_id_get_value (structure,
@@ -522,7 +523,8 @@ gst_query_parse_duration (GstQuery * query, GstFormat * format,
structure = GST_QUERY_STRUCTURE (query);
if (format)
- *format = g_value_get_enum (gst_structure_id_get_value (structure,
+ *format =
+ (GstFormat) g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (FORMAT)));
if (duration)
*duration = g_value_get_int64 (gst_structure_id_get_value (structure,
@@ -699,13 +701,15 @@ gst_query_parse_convert (GstQuery * query, GstFormat * src_format,
structure = GST_QUERY_STRUCTURE (query);
if (src_format)
- *src_format = g_value_get_enum (gst_structure_id_get_value (structure,
+ *src_format =
+ (GstFormat) g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (SRC_FORMAT)));
if (src_value)
*src_value = g_value_get_int64 (gst_structure_id_get_value (structure,
GST_QUARK (SRC_VALUE)));
if (dest_format)
- *dest_format = g_value_get_enum (gst_structure_id_get_value (structure,
+ *dest_format =
+ (GstFormat) g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (DEST_FORMAT)));
if (dest_value)
*dest_value = g_value_get_int64 (gst_structure_id_get_value (structure,
@@ -804,7 +808,8 @@ gst_query_parse_segment (GstQuery * query, gdouble * rate, GstFormat * format,
*rate = g_value_get_double (gst_structure_id_get_value (structure,
GST_QUARK (RATE)));
if (format)
- *format = g_value_get_enum (gst_structure_id_get_value (structure,
+ *format =
+ (GstFormat) g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (FORMAT)));
if (start_value)
*start_value = g_value_get_int64 (gst_structure_id_get_value (structure,
@@ -950,7 +955,8 @@ gst_query_parse_seeking (GstQuery * query, GstFormat * format,
structure = GST_QUERY_STRUCTURE (query);
if (format)
- *format = g_value_get_enum (gst_structure_id_get_value (structure,
+ *format =
+ (GstFormat) g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (FORMAT)));
if (seekable)
*seekable = g_value_get_boolean (gst_structure_id_get_value (structure,
@@ -1120,7 +1126,8 @@ gst_query_parse_nth_format (GstQuery * query, guint nth, GstFormat * format)
*format = GST_FORMAT_UNDEFINED;
} else {
if (nth < gst_value_list_get_size (list)) {
- *format = g_value_get_enum (gst_value_list_get_value (list, nth));
+ *format =
+ (GstFormat) g_value_get_enum (gst_value_list_get_value (list, nth));
} else
*format = GST_FORMAT_UNDEFINED;
}
@@ -1271,7 +1278,8 @@ gst_query_parse_buffering_stats (GstQuery * query,
structure = GST_QUERY_STRUCTURE (query);
if (mode)
- *mode = g_value_get_enum (gst_structure_id_get_value (structure,
+ *mode = (GstBufferingMode)
+ g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (BUFFERING_MODE)));
if (avg_in)
*avg_in = g_value_get_int (gst_structure_id_get_value (structure,
@@ -1341,7 +1349,8 @@ gst_query_parse_buffering_range (GstQuery * query, GstFormat * format,
structure = GST_QUERY_STRUCTURE (query);
if (format)
- *format = g_value_get_enum (gst_structure_id_get_value (structure,
+ *format =
+ (GstFormat) g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (FORMAT)));
if (start)
*start = g_value_get_int64 (gst_structure_id_get_value (structure,
diff --git a/gst/gstregistrychunks.c b/gst/gstregistrychunks.c
index c9877c1c8..bc1ca6b21 100644
--- a/gst/gstregistrychunks.c
+++ b/gst/gstregistrychunks.c
@@ -502,7 +502,7 @@ gst_registry_chunks_load_pad_template (GstElementFactory * factory, gchar ** in,
template = g_slice_new (GstStaticPadTemplate);
template->presence = pt->presence;
- template->direction = pt->direction;
+ template->direction = (GstPadDirection) pt->direction;
template->static_caps.caps.mini_object.refcount = 0;
/* unpack pad template strings */
@@ -737,7 +737,7 @@ gst_registry_chunks_load_plugin_dep (GstPlugin * plugin, gchar ** in,
dep->env_hash = d->env_hash;
dep->stat_hash = d->stat_hash;
- dep->flags = d->flags;
+ dep->flags = (GstPluginDependencyFlags) d->flags;
dep->names = gst_registry_chunks_load_plugin_dep_strv (in, end, d->n_names);
dep->paths = gst_registry_chunks_load_plugin_dep_strv (in, end, d->n_paths);
diff --git a/gst/gstsegment.c b/gst/gstsegment.c
index 46894515d..456bed5c9 100644
--- a/gst/gstsegment.c
+++ b/gst/gstsegment.c
@@ -175,7 +175,7 @@ gst_segment_init (GstSegment * segment, GstFormat format)
{
g_return_if_fail (segment != NULL);
- segment->flags = 0;
+ segment->flags = GST_SEEK_FLAG_NONE;
segment->rate = 1.0;
segment->applied_rate = 1.0;
segment->format = format;
diff --git a/gst/gstsystemclock.c b/gst/gstsystemclock.c
index 893e072f8..b59281301 100644
--- a/gst/gstsystemclock.c
+++ b/gst/gstsystemclock.c
@@ -55,7 +55,7 @@
# define EWOULDBLOCK EAGAIN /* This is just to placate gcc */
#endif /* G_OS_WIN32 */
-#define GET_ENTRY_STATUS(e) (g_atomic_int_get(&GST_CLOCK_ENTRY_STATUS(e)))
+#define GET_ENTRY_STATUS(e) ((GstClockReturn) g_atomic_int_get(&GST_CLOCK_ENTRY_STATUS(e)))
#define SET_ENTRY_STATUS(e,val) (g_atomic_int_set(&GST_CLOCK_ENTRY_STATUS(e),(val)))
#define CAS_ENTRY_STATUS(e,old,val) (G_ATOMIC_INT_COMPARE_AND_EXCHANGE(\
(&GST_CLOCK_ENTRY_STATUS(e)), (old), (val)))
@@ -237,7 +237,7 @@ gst_system_clock_set_property (GObject * object, guint prop_id,
switch (prop_id) {
case PROP_CLOCK_TYPE:
- sysclock->priv->clock_type = g_value_get_enum (value);
+ sysclock->priv->clock_type = (GstClockType) g_value_get_enum (value);
GST_CAT_DEBUG (GST_CAT_CLOCK, "clock-type set to %d",
sysclock->priv->clock_type);
break;
diff --git a/gst/gsttask.c b/gst/gsttask.c
index 961f816b4..aac6b7a25 100644
--- a/gst/gsttask.c
+++ b/gst/gsttask.c
@@ -83,7 +83,7 @@ GST_DEBUG_CATEGORY_STATIC (task_debug);
#define GST_CAT_DEFAULT (task_debug)
#define SET_TASK_STATE(t,s) (g_atomic_int_set (&GST_TASK_STATE(t), (s)))
-#define GET_TASK_STATE(t) (g_atomic_int_get (&GST_TASK_STATE(t)))
+#define GET_TASK_STATE(t) ((GstTaskState) g_atomic_int_get (&GST_TASK_STATE(t)))
#define GST_TASK_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_TASK, GstTaskPrivate))
diff --git a/gst/gsttrace.c b/gst/gsttrace.c
index 0a176c32d..b857458b8 100644
--- a/gst/gsttrace.c
+++ b/gst/gsttrace.c
@@ -262,7 +262,7 @@ _gst_trace_add_entry (GstTrace * trace, guint32 seq, guint32 data, gchar * msg)
/* global flags */
-static GstAllocTraceFlags _gst_trace_flags = 0;
+static GstAllocTraceFlags _gst_trace_flags = GST_ALLOC_TRACE_NONE;
/* list of registered tracers */
static GList *_gst_alloc_tracers = NULL;
diff --git a/gst/gsttrace.h b/gst/gsttrace.h
index 1de63faae..817ae1f76 100644
--- a/gst/gsttrace.h
+++ b/gst/gsttrace.h
@@ -30,13 +30,15 @@ G_BEGIN_DECLS
/**
* GstAllocTraceFlags:
- * @GST_ALLOC_TRACE_LIVE: Trace number of non-freed memory
- * @GST_ALLOC_TRACE_MEM_LIVE: trace pointers of unfreed memory
+ * @GST_ALLOC_TRACE_NONE: No tracing specified or desired. Since 0.10.36.
+ * @GST_ALLOC_TRACE_LIVE: Trace number of non-freed memory.
+ * @GST_ALLOC_TRACE_MEM_LIVE: Trace pointers of unfreed memory.
*
* Flags indicating which tracing feature to enable.
*/
typedef enum {
- GST_ALLOC_TRACE_LIVE = (1 << 0),
+ GST_ALLOC_TRACE_NONE = 0,
+ GST_ALLOC_TRACE_LIVE = (1 << 0),
GST_ALLOC_TRACE_MEM_LIVE = (1 << 1)
} GstAllocTraceFlags;
diff --git a/gst/gsttypefind.h b/gst/gsttypefind.h
index 036148c7a..27c7e32d0 100644
--- a/gst/gsttypefind.h
+++ b/gst/gsttypefind.h
@@ -44,16 +44,18 @@ typedef void (* GstTypeFindFunction) (GstTypeFind *find, gpointer data);
/**
* GstTypeFindProbability:
- * @GST_TYPE_FIND_MINIMUM: unlikely typefind
- * @GST_TYPE_FIND_POSSIBLE: possible type detected
- * @GST_TYPE_FIND_LIKELY: likely a type was detected
- * @GST_TYPE_FIND_NEARLY_CERTAIN: nearly certain that a type was detected
+ * @GST_TYPE_FIND_NONE: type undetected. Since 0.10.36.
+ * @GST_TYPE_FIND_MINIMUM: unlikely typefind.
+ * @GST_TYPE_FIND_POSSIBLE: possible type detected.
+ * @GST_TYPE_FIND_LIKELY: likely a type was detected.
+ * @GST_TYPE_FIND_NEARLY_CERTAIN: nearly certain that a type was detected.
* @GST_TYPE_FIND_MAXIMUM: very certain a type was detected.
*
* The probability of the typefind function. Higher values have more certainty
* in doing a reliable typefind.
*/
typedef enum {
+ GST_TYPE_FIND_NONE = 0,
GST_TYPE_FIND_MINIMUM = 1,
GST_TYPE_FIND_POSSIBLE = 50,
GST_TYPE_FIND_LIKELY = 80,
diff --git a/gst/gstutils.c b/gst/gstutils.c
index 8e4ab45b9..5d96a33c8 100644
--- a/gst/gstutils.c
+++ b/gst/gstutils.c
@@ -2616,7 +2616,7 @@ gst_element_class_install_std_props (GstElementClass * klass,
while (name) {
int arg_id = va_arg (args, int);
- int flags = va_arg (args, int);
+ GParamFlags flags = (GParamFlags) va_arg (args, int);
gst_element_populate_std_props ((GObjectClass *) klass, name, arg_id,
flags);
diff --git a/gst/gstvalue.c b/gst/gstvalue.c
index 7073484d5..e3f404ddb 100644
--- a/gst/gstvalue.c
+++ b/gst/gstvalue.c
@@ -2252,7 +2252,7 @@ gst_value_serialize_enum (const GValue * value)
if (G_UNLIKELY (en == NULL && G_VALUE_TYPE (value) == GST_TYPE_FORMAT)) {
const GstFormatDefinition *format_def;
- format_def = gst_format_get_details (g_value_get_enum (value));
+ format_def = gst_format_get_details ((GstFormat) g_value_get_enum (value));
g_return_val_if_fail (format_def != NULL, NULL);
return g_strdup (format_def->description);
}
diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c
index b87a5c833..ed4c89033 100644
--- a/libs/gst/base/gstbaseparse.c
+++ b/libs/gst/base/gstbaseparse.c
@@ -216,7 +216,7 @@ static const GstFormat fmtlist[] = {
GST_FORMAT_DEFAULT,
GST_FORMAT_BYTES,
GST_FORMAT_TIME,
- 0
+ GST_FORMAT_UNDEFINED
};
#define GST_BASE_PARSE_GET_PRIVATE(obj) \
@@ -3142,7 +3142,7 @@ gst_base_parse_get_querytypes (GstPad * pad)
GST_QUERY_FORMATS,
GST_QUERY_SEEKING,
GST_QUERY_CONVERT,
- 0
+ GST_QUERY_NONE
};
return list;
@@ -3737,6 +3737,7 @@ gst_base_parse_handle_seek (GstBaseParse * parse, GstEvent * event)
} else {
GstEvent *new_event;
GstBaseParseSeek *seek;
+ GstSeekFlags flags = (flush ? GST_SEEK_FLAG_FLUSH : GST_SEEK_FLAG_NONE);
/* The only thing we need to do in PUSH-mode is to send the
seek event (in bytes) to upstream. Segment / flush handling happens
@@ -3744,7 +3745,7 @@ gst_base_parse_handle_seek (GstBaseParse * parse, GstEvent * event)
GST_DEBUG_OBJECT (parse, "seek in PUSH mode");
if (seekstop >= 0 && seekstop <= seekpos)
seekstop = seekpos;
- new_event = gst_event_new_seek (rate, GST_FORMAT_BYTES, flush,
+ new_event = gst_event_new_seek (rate, GST_FORMAT_BYTES, flags,
GST_SEEK_TYPE_SET, seekpos, stop_type, seekstop);
/* store segment info so its precise details can be reconstructed when
diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c
index 5828a7452..2aa4ca7a9 100644
--- a/libs/gst/base/gstbasetransform.c
+++ b/libs/gst/base/gstbasetransform.c
@@ -1307,9 +1307,8 @@ gst_base_transform_default_query (GstBaseTransform * trans,
GstPadDirection direction, GstQuery * query)
{
gboolean ret = FALSE;
- GstPad *pad, *otherpad;
+ GstPad *otherpad;
- pad = (direction == GST_PAD_SRC) ? trans->srcpad : trans->sinkpad;
otherpad = (direction == GST_PAD_SRC) ? trans->sinkpad : trans->srcpad;
switch (GST_QUERY_TYPE (query)) {
@@ -1353,7 +1352,7 @@ gst_base_transform_default_query (GstBaseTransform * trans,
gint64 pos;
ret = TRUE;
- if ((pad == trans->sinkpad)
+ if ((direction == GST_PAD_SINK)
|| (trans->priv->position_out == GST_CLOCK_TIME_NONE)) {
pos =
gst_segment_to_stream_time (&trans->segment, GST_FORMAT_TIME,
diff --git a/libs/gst/base/gsttypefindhelper.c b/libs/gst/base/gsttypefindhelper.c
index 1f2c01ae9..bfd1556c9 100644
--- a/libs/gst/base/gsttypefindhelper.c
+++ b/libs/gst/base/gsttypefindhelper.c
@@ -51,7 +51,7 @@ typedef struct
guint64 size;
guint64 last_offset;
GstTypeFindHelperGetRangeFunction func;
- guint best_probability;
+ GstTypeFindProbability best_probability;
GstCaps *caps;
GstTypeFindFactory *factory; /* for logging */
GstObject *obj; /* for logging */
@@ -196,7 +196,8 @@ error:
* If given @probability is higher, replace previously store caps.
*/
static void
-helper_find_suggest (gpointer data, guint probability, const GstCaps * caps)
+helper_find_suggest (gpointer data, GstTypeFindProbability probability,
+ const GstCaps * caps)
{
GstTypeFindHelper *helper = (GstTypeFindHelper *) data;
@@ -273,7 +274,7 @@ gst_type_find_helper_get_range_ext (GstObject * obj,
helper.size = size;
helper.last_offset = 0;
helper.func = func;
- helper.best_probability = 0;
+ helper.best_probability = GST_TYPE_FIND_NONE;
helper.caps = NULL;
helper.obj = obj;
@@ -418,7 +419,7 @@ typedef struct
{
const guint8 *data; /* buffer data */
gsize size;
- guint best_probability;
+ GstTypeFindProbability best_probability;
GstCaps *caps;
GstTypeFindFactory *factory; /* for logging */
GstObject *obj; /* for logging */
@@ -468,7 +469,8 @@ buf_helper_find_peek (gpointer data, gint64 off, guint size)
* If given @probability is higher, replace previously store caps.
*/
static void
-buf_helper_find_suggest (gpointer data, guint probability, const GstCaps * caps)
+buf_helper_find_suggest (gpointer data, GstTypeFindProbability probability,
+ const GstCaps * caps)
{
GstTypeFindBufHelper *helper = (GstTypeFindBufHelper *) data;
@@ -524,7 +526,7 @@ gst_type_find_helper_for_data (GstObject * obj, const guint8 * data, gsize size,
helper.data = data;
helper.size = size;
- helper.best_probability = 0;
+ helper.best_probability = GST_TYPE_FIND_NONE;
helper.caps = NULL;
helper.obj = obj;
diff --git a/libs/gst/controller/gstlfocontrolsource.c b/libs/gst/controller/gstlfocontrolsource.c
index f2c6d6b2b..46061e4b9 100644
--- a/libs/gst/controller/gstlfocontrolsource.c
+++ b/libs/gst/controller/gstlfocontrolsource.c
@@ -969,7 +969,8 @@ gst_lfo_control_source_set_property (GObject * object, guint prop_id,
switch (prop_id) {
case PROP_WAVEFORM:
g_mutex_lock (self->lock);
- gst_lfo_control_source_set_waveform (self, g_value_get_enum (value));
+ gst_lfo_control_source_set_waveform (self,
+ (GstLFOWaveform) g_value_get_enum (value));
g_mutex_unlock (self->lock);
break;
case PROP_FREQUENCY:{
diff --git a/plugins/elements/gsttypefindelement.c b/plugins/elements/gsttypefindelement.c
index 0757abf3d..9ed0bdfd3 100644
--- a/plugins/elements/gsttypefindelement.c
+++ b/plugins/elements/gsttypefindelement.c
@@ -884,7 +884,7 @@ gst_type_find_element_activate_src_pull (GstPad * pad, gboolean active)
static gboolean
gst_type_find_element_activate (GstPad * pad)
{
- GstTypeFindProbability probability = 0;
+ GstTypeFindProbability probability = GST_TYPE_FIND_NONE;
GstCaps *found_caps = NULL;
GstTypeFindElement *typefind;
GstQuery *query;
diff --git a/plugins/indexers/gstfileindex.c b/plugins/indexers/gstfileindex.c
index 727f6ca01..c8c8fb1f5 100644
--- a/plugins/indexers/gstfileindex.c
+++ b/plugins/indexers/gstfileindex.c
@@ -770,7 +770,7 @@ gst_file_index_add_association (GstIndex * index, GstIndexEntry * entry)
}
/* this is a hack, we should use a private structure instead */
- sample.format = 0;
+ sample.format = GST_FORMAT_UNDEFINED;
sample.value = GST_INDEX_ASSOC_VALUE (entry, 0);
exact =
@@ -903,7 +903,7 @@ gst_file_index_get_assoc_entry (GstIndex * index,
}
/* this is a hack, we should use a private structure instead */
- sample.format = formatx;
+ sample.format = (GstFormat) formatx;
sample.value = value;
exact = _fc_bsearch (id_index->array, ARRAY_ROW_SIZE (id_index),
@@ -953,7 +953,7 @@ gst_file_index_get_assoc_entry (GstIndex * index,
{
gint32 flags_be = ARRAY_ROW_FLAGS (row_data);
- GST_INDEX_ASSOC_FLAGS (entry) = GINT32_FROM_BE (flags_be);
+ GST_INDEX_ASSOC_FLAGS (entry) = (GstAssocFlags) GINT32_FROM_BE (flags_be);
for (xx = 0; xx < id_index->nformats; xx++) {
gint64 val_be = ARRAY_ROW_VALUE (row_data, xx);
diff --git a/tests/examples/stepping/framestep1.c b/tests/examples/stepping/framestep1.c
index 3b1e687d1..6eb188102 100644
--- a/tests/examples/stepping/framestep1.c
+++ b/tests/examples/stepping/framestep1.c
@@ -11,7 +11,7 @@ event_loop (GstElement * pipe)
bus = gst_element_get_bus (GST_ELEMENT (pipe));
while (running) {
- message = gst_bus_timed_pop_filtered (bus, GST_MESSAGE_ANY, -1);
+ message = gst_bus_timed_pop_filtered (bus, -1, GST_MESSAGE_ANY);
g_assert (message != NULL);