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
This commit is contained in:
Wim Taymans 2011-08-26 14:37:54 +02:00
commit 5cf8e68944
24 changed files with 86 additions and 63 deletions

View file

@ -49,7 +49,7 @@ static GstFormatDefinition standard_definitions[] = {
{GST_FORMAT_TIME, "time", "Time", 0}, {GST_FORMAT_TIME, "time", "Time", 0},
{GST_FORMAT_BUFFERS, "buffers", "Buffers", 0}, {GST_FORMAT_BUFFERS, "buffers", "Buffers", 0},
{GST_FORMAT_PERCENT, "percent", "Percent", 0}, {GST_FORMAT_PERCENT, "percent", "Percent", 0},
{0, NULL, NULL, 0} {GST_FORMAT_UNDEFINED, NULL, NULL, 0}
}; };
void void
@ -153,7 +153,7 @@ gst_format_register (const gchar * nick, const gchar * description)
g_static_mutex_lock (&mutex); g_static_mutex_lock (&mutex);
format = g_slice_new (GstFormatDefinition); format = g_slice_new (GstFormatDefinition);
format->value = _n_values; format->value = (GstFormat) _n_values;
format->nick = g_strdup (nick); format->nick = g_strdup (nick);
format->description = g_strdup (description); format->description = g_strdup (description);
format->quark = g_quark_from_static_string (format->nick); format->quark = g_quark_from_static_string (format->nick);

View file

@ -253,7 +253,7 @@ gst_index_set_property (GObject * object, guint prop_id,
switch (prop_id) { switch (prop_id) {
case ARG_RESOLVER: 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 = resolvers[index->method].resolver;
index->resolver_user_data = resolvers[index->method].user_data; index->resolver_user_data = resolvers[index->method].user_data;
break; break;

View file

@ -1479,7 +1479,7 @@ gst_debug_category_reset_threshold (GstDebugCategory * category)
GstDebugLevel GstDebugLevel
gst_debug_category_get_threshold (GstDebugCategory * category) gst_debug_category_get_threshold (GstDebugCategory * category)
{ {
return g_atomic_int_get (&category->threshold); return (GstDebugLevel) g_atomic_int_get (&category->threshold);
} }
/** /**

View file

@ -1093,7 +1093,8 @@ gst_message_parse_buffering_stats (GstMessage * message,
structure = GST_MESSAGE_STRUCTURE (message); structure = GST_MESSAGE_STRUCTURE (message);
if (mode) 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))); GST_QUARK (BUFFERING_MODE)));
if (avg_in) if (avg_in)
*avg_in = g_value_get_int (gst_structure_id_get_value (structure, *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); structure = GST_MESSAGE_STRUCTURE (message);
if (oldstate) if (oldstate)
*oldstate = *oldstate = (GstState)
g_value_get_enum (gst_structure_id_get_value (structure, g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (OLD_STATE))); GST_QUARK (OLD_STATE)));
if (newstate) if (newstate)
*newstate = *newstate = (GstState)
g_value_get_enum (gst_structure_id_get_value (structure, g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (NEW_STATE))); GST_QUARK (NEW_STATE)));
if (pending) 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))); 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); g_return_if_fail (G_VALUE_TYPE (owner_gvalue) == GST_TYPE_ELEMENT);
if (type) 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))); GST_QUARK (TYPE)));
if (owner) if (owner)
*owner = (GstElement *) g_value_get_object (owner_gvalue); *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); structure = GST_MESSAGE_STRUCTURE (message);
if (format) if (format)
*format = *format = (GstFormat)
g_value_get_enum (gst_structure_id_get_value (structure, g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (FORMAT))); GST_QUARK (FORMAT)));
if (position) if (position)
@ -1485,7 +1488,7 @@ gst_message_parse_segment_done (GstMessage * message, GstFormat * format,
structure = GST_MESSAGE_STRUCTURE (message); structure = GST_MESSAGE_STRUCTURE (message);
if (format) if (format)
*format = *format = (GstFormat)
g_value_get_enum (gst_structure_id_get_value (structure, g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (FORMAT))); GST_QUARK (FORMAT)));
if (position) if (position)
@ -1518,7 +1521,7 @@ gst_message_parse_duration (GstMessage * message, GstFormat * format,
structure = GST_MESSAGE_STRUCTURE (message); structure = GST_MESSAGE_STRUCTURE (message);
if (format) if (format)
*format = *format = (GstFormat)
g_value_get_enum (gst_structure_id_get_value (structure, g_value_get_enum (gst_structure_id_get_value (structure,
GST_QUARK (FORMAT))); GST_QUARK (FORMAT)));
if (duration) if (duration)
@ -1572,7 +1575,8 @@ gst_message_parse_request_state (GstMessage * message, GstState * state)
structure = GST_MESSAGE_STRUCTURE (message); structure = GST_MESSAGE_STRUCTURE (message);
if (state) 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))); GST_QUARK (NEW_STATE)));
} }
@ -1635,7 +1639,8 @@ gst_message_parse_stream_status (GstMessage * message,
g_return_if_fail (owner_gvalue != NULL); g_return_if_fail (owner_gvalue != NULL);
if (type) 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))); GST_QUARK (TYPE)));
if (owner) if (owner)
*owner = (GstElement *) g_value_get_object (owner_gvalue); *owner = (GstElement *) g_value_get_object (owner_gvalue);

View file

@ -488,7 +488,7 @@ gst_pad_set_property (GObject * object, guint prop_id,
switch (prop_id) { switch (prop_id) {
case PAD_PROP_DIRECTION: case PAD_PROP_DIRECTION:
GST_PAD_DIRECTION (object) = g_value_get_enum (value); GST_PAD_DIRECTION (object) = (GstPadDirection) g_value_get_enum (value);
break; break;
case PAD_PROP_TEMPLATE: case PAD_PROP_TEMPLATE:
gst_pad_set_pad_template (GST_PAD_CAST (object), gst_pad_set_pad_template (GST_PAD_CAST (object),

View file

@ -209,7 +209,7 @@ typedef enum {
* *
* Since: 0.10.30 * 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: * GstActivateMode:

View file

@ -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); GST_PAD_TEMPLATE_NAME_TEMPLATE (object) = g_value_dup_string (value);
break; break;
case PROP_DIRECTION: 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; break;
case PROP_PRESENCE: 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; break;
case PROP_CAPS: case PROP_CAPS:
GST_PAD_TEMPLATE_CAPS (object) = g_value_dup_boxed (value); GST_PAD_TEMPLATE_CAPS (object) = g_value_dup_boxed (value);

View file

@ -105,7 +105,7 @@ static GstQueryTypeDefinition standard_definitions[] = {
{GST_QUERY_URI, "uri", "URI of the source or sink", 0}, {GST_QUERY_URI, "uri", "URI of the source or sink", 0},
{GST_QUERY_ALLOCATION, "allocation", "Allocation properties", 0}, {GST_QUERY_ALLOCATION, "allocation", "Allocation properties", 0},
{GST_QUERY_SCHEDULING, "scheduling", "Scheduling properties", 0}, {GST_QUERY_SCHEDULING, "scheduling", "Scheduling properties", 0},
{0, NULL, NULL, 0} {GST_QUERY_NONE, NULL, NULL, 0}
}; };
void void
@ -211,7 +211,7 @@ gst_query_type_register (const gchar * nick, const gchar * description)
return lookup; return lookup;
query = g_slice_new (GstQueryTypeDefinition); query = g_slice_new (GstQueryTypeDefinition);
query->value = _n_values; query->value = (GstQueryType) _n_values;
query->nick = g_strdup (nick); query->nick = g_strdup (nick);
query->description = g_strdup (description); query->description = g_strdup (description);
query->quark = g_quark_from_static_string (query->nick); 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); structure = GST_QUERY_STRUCTURE (query);
if (format) 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))); GST_QUARK (FORMAT)));
if (cur) if (cur)
*cur = g_value_get_int64 (gst_structure_id_get_value (structure, *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); structure = GST_QUERY_STRUCTURE (query);
if (format) 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))); GST_QUARK (FORMAT)));
if (duration) if (duration)
*duration = g_value_get_int64 (gst_structure_id_get_value (structure, *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); structure = GST_QUERY_STRUCTURE (query);
if (src_format) 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))); GST_QUARK (SRC_FORMAT)));
if (src_value) if (src_value)
*src_value = g_value_get_int64 (gst_structure_id_get_value (structure, *src_value = g_value_get_int64 (gst_structure_id_get_value (structure,
GST_QUARK (SRC_VALUE))); GST_QUARK (SRC_VALUE)));
if (dest_format) 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))); GST_QUARK (DEST_FORMAT)));
if (dest_value) if (dest_value)
*dest_value = g_value_get_int64 (gst_structure_id_get_value (structure, *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, *rate = g_value_get_double (gst_structure_id_get_value (structure,
GST_QUARK (RATE))); GST_QUARK (RATE)));
if (format) 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))); GST_QUARK (FORMAT)));
if (start_value) if (start_value)
*start_value = g_value_get_int64 (gst_structure_id_get_value (structure, *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); structure = GST_QUERY_STRUCTURE (query);
if (format) 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))); GST_QUARK (FORMAT)));
if (seekable) if (seekable)
*seekable = g_value_get_boolean (gst_structure_id_get_value (structure, *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; *format = GST_FORMAT_UNDEFINED;
} else { } else {
if (nth < gst_value_list_get_size (list)) { 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 } else
*format = GST_FORMAT_UNDEFINED; *format = GST_FORMAT_UNDEFINED;
} }
@ -1271,7 +1278,8 @@ gst_query_parse_buffering_stats (GstQuery * query,
structure = GST_QUERY_STRUCTURE (query); structure = GST_QUERY_STRUCTURE (query);
if (mode) 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))); GST_QUARK (BUFFERING_MODE)));
if (avg_in) if (avg_in)
*avg_in = g_value_get_int (gst_structure_id_get_value (structure, *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); structure = GST_QUERY_STRUCTURE (query);
if (format) 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))); GST_QUARK (FORMAT)));
if (start) if (start)
*start = g_value_get_int64 (gst_structure_id_get_value (structure, *start = g_value_get_int64 (gst_structure_id_get_value (structure,

View file

@ -502,7 +502,7 @@ gst_registry_chunks_load_pad_template (GstElementFactory * factory, gchar ** in,
template = g_slice_new (GstStaticPadTemplate); template = g_slice_new (GstStaticPadTemplate);
template->presence = pt->presence; template->presence = pt->presence;
template->direction = pt->direction; template->direction = (GstPadDirection) pt->direction;
template->static_caps.caps.mini_object.refcount = 0; template->static_caps.caps.mini_object.refcount = 0;
/* unpack pad template strings */ /* 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->env_hash = d->env_hash;
dep->stat_hash = d->stat_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->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); dep->paths = gst_registry_chunks_load_plugin_dep_strv (in, end, d->n_paths);

View file

@ -175,7 +175,7 @@ gst_segment_init (GstSegment * segment, GstFormat format)
{ {
g_return_if_fail (segment != NULL); g_return_if_fail (segment != NULL);
segment->flags = 0; segment->flags = GST_SEEK_FLAG_NONE;
segment->rate = 1.0; segment->rate = 1.0;
segment->applied_rate = 1.0; segment->applied_rate = 1.0;
segment->format = format; segment->format = format;

View file

@ -55,7 +55,7 @@
# define EWOULDBLOCK EAGAIN /* This is just to placate gcc */ # define EWOULDBLOCK EAGAIN /* This is just to placate gcc */
#endif /* G_OS_WIN32 */ #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 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(\ #define CAS_ENTRY_STATUS(e,old,val) (G_ATOMIC_INT_COMPARE_AND_EXCHANGE(\
(&GST_CLOCK_ENTRY_STATUS(e)), (old), (val))) (&GST_CLOCK_ENTRY_STATUS(e)), (old), (val)))
@ -237,7 +237,7 @@ gst_system_clock_set_property (GObject * object, guint prop_id,
switch (prop_id) { switch (prop_id) {
case PROP_CLOCK_TYPE: 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", GST_CAT_DEBUG (GST_CAT_CLOCK, "clock-type set to %d",
sysclock->priv->clock_type); sysclock->priv->clock_type);
break; break;

View file

@ -83,7 +83,7 @@ GST_DEBUG_CATEGORY_STATIC (task_debug);
#define GST_CAT_DEFAULT (task_debug) #define GST_CAT_DEFAULT (task_debug)
#define SET_TASK_STATE(t,s) (g_atomic_int_set (&GST_TASK_STATE(t), (s))) #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) \ #define GST_TASK_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_TASK, GstTaskPrivate)) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_TASK, GstTaskPrivate))

View file

@ -262,7 +262,7 @@ _gst_trace_add_entry (GstTrace * trace, guint32 seq, guint32 data, gchar * msg)
/* global flags */ /* global flags */
static GstAllocTraceFlags _gst_trace_flags = 0; static GstAllocTraceFlags _gst_trace_flags = GST_ALLOC_TRACE_NONE;
/* list of registered tracers */ /* list of registered tracers */
static GList *_gst_alloc_tracers = NULL; static GList *_gst_alloc_tracers = NULL;

View file

@ -30,13 +30,15 @@ G_BEGIN_DECLS
/** /**
* GstAllocTraceFlags: * GstAllocTraceFlags:
* @GST_ALLOC_TRACE_LIVE: Trace number of non-freed memory * @GST_ALLOC_TRACE_NONE: No tracing specified or desired. Since 0.10.36.
* @GST_ALLOC_TRACE_MEM_LIVE: trace pointers of unfreed memory * @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. * Flags indicating which tracing feature to enable.
*/ */
typedef enum { 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) GST_ALLOC_TRACE_MEM_LIVE = (1 << 1)
} GstAllocTraceFlags; } GstAllocTraceFlags;

View file

@ -44,16 +44,18 @@ typedef void (* GstTypeFindFunction) (GstTypeFind *find, gpointer data);
/** /**
* GstTypeFindProbability: * GstTypeFindProbability:
* @GST_TYPE_FIND_MINIMUM: unlikely typefind * @GST_TYPE_FIND_NONE: type undetected. Since 0.10.36.
* @GST_TYPE_FIND_POSSIBLE: possible type detected * @GST_TYPE_FIND_MINIMUM: unlikely typefind.
* @GST_TYPE_FIND_LIKELY: likely a type was detected * @GST_TYPE_FIND_POSSIBLE: possible type detected.
* @GST_TYPE_FIND_NEARLY_CERTAIN: nearly certain that a type was 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. * @GST_TYPE_FIND_MAXIMUM: very certain a type was detected.
* *
* The probability of the typefind function. Higher values have more certainty * The probability of the typefind function. Higher values have more certainty
* in doing a reliable typefind. * in doing a reliable typefind.
*/ */
typedef enum { typedef enum {
GST_TYPE_FIND_NONE = 0,
GST_TYPE_FIND_MINIMUM = 1, GST_TYPE_FIND_MINIMUM = 1,
GST_TYPE_FIND_POSSIBLE = 50, GST_TYPE_FIND_POSSIBLE = 50,
GST_TYPE_FIND_LIKELY = 80, GST_TYPE_FIND_LIKELY = 80,

View file

@ -2616,7 +2616,7 @@ gst_element_class_install_std_props (GstElementClass * klass,
while (name) { while (name) {
int arg_id = va_arg (args, int); 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, gst_element_populate_std_props ((GObjectClass *) klass, name, arg_id,
flags); flags);

View file

@ -2252,7 +2252,7 @@ gst_value_serialize_enum (const GValue * value)
if (G_UNLIKELY (en == NULL && G_VALUE_TYPE (value) == GST_TYPE_FORMAT)) { if (G_UNLIKELY (en == NULL && G_VALUE_TYPE (value) == GST_TYPE_FORMAT)) {
const GstFormatDefinition *format_def; 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); g_return_val_if_fail (format_def != NULL, NULL);
return g_strdup (format_def->description); return g_strdup (format_def->description);
} }

View file

@ -216,7 +216,7 @@ static const GstFormat fmtlist[] = {
GST_FORMAT_DEFAULT, GST_FORMAT_DEFAULT,
GST_FORMAT_BYTES, GST_FORMAT_BYTES,
GST_FORMAT_TIME, GST_FORMAT_TIME,
0 GST_FORMAT_UNDEFINED
}; };
#define GST_BASE_PARSE_GET_PRIVATE(obj) \ #define GST_BASE_PARSE_GET_PRIVATE(obj) \
@ -3142,7 +3142,7 @@ gst_base_parse_get_querytypes (GstPad * pad)
GST_QUERY_FORMATS, GST_QUERY_FORMATS,
GST_QUERY_SEEKING, GST_QUERY_SEEKING,
GST_QUERY_CONVERT, GST_QUERY_CONVERT,
0 GST_QUERY_NONE
}; };
return list; return list;
@ -3737,6 +3737,7 @@ gst_base_parse_handle_seek (GstBaseParse * parse, GstEvent * event)
} else { } else {
GstEvent *new_event; GstEvent *new_event;
GstBaseParseSeek *seek; 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 /* The only thing we need to do in PUSH-mode is to send the
seek event (in bytes) to upstream. Segment / flush handling happens 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"); GST_DEBUG_OBJECT (parse, "seek in PUSH mode");
if (seekstop >= 0 && seekstop <= seekpos) if (seekstop >= 0 && seekstop <= seekpos)
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); GST_SEEK_TYPE_SET, seekpos, stop_type, seekstop);
/* store segment info so its precise details can be reconstructed when /* store segment info so its precise details can be reconstructed when

View file

@ -1307,9 +1307,8 @@ gst_base_transform_default_query (GstBaseTransform * trans,
GstPadDirection direction, GstQuery * query) GstPadDirection direction, GstQuery * query)
{ {
gboolean ret = FALSE; 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; otherpad = (direction == GST_PAD_SRC) ? trans->sinkpad : trans->srcpad;
switch (GST_QUERY_TYPE (query)) { switch (GST_QUERY_TYPE (query)) {
@ -1353,7 +1352,7 @@ gst_base_transform_default_query (GstBaseTransform * trans,
gint64 pos; gint64 pos;
ret = TRUE; ret = TRUE;
if ((pad == trans->sinkpad) if ((direction == GST_PAD_SINK)
|| (trans->priv->position_out == GST_CLOCK_TIME_NONE)) { || (trans->priv->position_out == GST_CLOCK_TIME_NONE)) {
pos = pos =
gst_segment_to_stream_time (&trans->segment, GST_FORMAT_TIME, gst_segment_to_stream_time (&trans->segment, GST_FORMAT_TIME,

View file

@ -51,7 +51,7 @@ typedef struct
guint64 size; guint64 size;
guint64 last_offset; guint64 last_offset;
GstTypeFindHelperGetRangeFunction func; GstTypeFindHelperGetRangeFunction func;
guint best_probability; GstTypeFindProbability best_probability;
GstCaps *caps; GstCaps *caps;
GstTypeFindFactory *factory; /* for logging */ GstTypeFindFactory *factory; /* for logging */
GstObject *obj; /* for logging */ GstObject *obj; /* for logging */
@ -196,7 +196,8 @@ error:
* If given @probability is higher, replace previously store caps. * If given @probability is higher, replace previously store caps.
*/ */
static void 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; GstTypeFindHelper *helper = (GstTypeFindHelper *) data;
@ -273,7 +274,7 @@ gst_type_find_helper_get_range_ext (GstObject * obj,
helper.size = size; helper.size = size;
helper.last_offset = 0; helper.last_offset = 0;
helper.func = func; helper.func = func;
helper.best_probability = 0; helper.best_probability = GST_TYPE_FIND_NONE;
helper.caps = NULL; helper.caps = NULL;
helper.obj = obj; helper.obj = obj;
@ -418,7 +419,7 @@ typedef struct
{ {
const guint8 *data; /* buffer data */ const guint8 *data; /* buffer data */
gsize size; gsize size;
guint best_probability; GstTypeFindProbability best_probability;
GstCaps *caps; GstCaps *caps;
GstTypeFindFactory *factory; /* for logging */ GstTypeFindFactory *factory; /* for logging */
GstObject *obj; /* 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. * If given @probability is higher, replace previously store caps.
*/ */
static void 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; 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.data = data;
helper.size = size; helper.size = size;
helper.best_probability = 0; helper.best_probability = GST_TYPE_FIND_NONE;
helper.caps = NULL; helper.caps = NULL;
helper.obj = obj; helper.obj = obj;

View file

@ -969,7 +969,8 @@ gst_lfo_control_source_set_property (GObject * object, guint prop_id,
switch (prop_id) { switch (prop_id) {
case PROP_WAVEFORM: case PROP_WAVEFORM:
g_mutex_lock (self->lock); 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); g_mutex_unlock (self->lock);
break; break;
case PROP_FREQUENCY:{ case PROP_FREQUENCY:{

View file

@ -884,7 +884,7 @@ gst_type_find_element_activate_src_pull (GstPad * pad, gboolean active)
static gboolean static gboolean
gst_type_find_element_activate (GstPad * pad) gst_type_find_element_activate (GstPad * pad)
{ {
GstTypeFindProbability probability = 0; GstTypeFindProbability probability = GST_TYPE_FIND_NONE;
GstCaps *found_caps = NULL; GstCaps *found_caps = NULL;
GstTypeFindElement *typefind; GstTypeFindElement *typefind;
GstQuery *query; GstQuery *query;

View file

@ -770,7 +770,7 @@ gst_file_index_add_association (GstIndex * index, GstIndexEntry * entry)
} }
/* this is a hack, we should use a private structure instead */ /* 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); sample.value = GST_INDEX_ASSOC_VALUE (entry, 0);
exact = exact =
@ -903,7 +903,7 @@ gst_file_index_get_assoc_entry (GstIndex * index,
} }
/* this is a hack, we should use a private structure instead */ /* this is a hack, we should use a private structure instead */
sample.format = formatx; sample.format = (GstFormat) formatx;
sample.value = value; sample.value = value;
exact = _fc_bsearch (id_index->array, ARRAY_ROW_SIZE (id_index), 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); 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++) { for (xx = 0; xx < id_index->nformats; xx++) {
gint64 val_be = ARRAY_ROW_VALUE (row_data, xx); gint64 val_be = ARRAY_ROW_VALUE (row_data, xx);

View file

@ -11,7 +11,7 @@ event_loop (GstElement * pipe)
bus = gst_element_get_bus (GST_ELEMENT (pipe)); bus = gst_element_get_bus (GST_ELEMENT (pipe));
while (running) { 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); g_assert (message != NULL);