Merge branch 'master' into 0.11

This commit is contained in:
Wim Taymans 2011-05-08 13:14:55 +02:00
commit 24573211c6
2 changed files with 32 additions and 19 deletions

View file

@ -341,20 +341,6 @@ void gst_debug_add_log_function (GstLogFunction func,
guint gst_debug_remove_log_function (GstLogFunction func);
guint gst_debug_remove_log_function_by_data (gpointer data);
#define gst_debug_add_log_function(func,data) \
G_STMT_START{ \
if (func == gst_debug_log_default) { \
gst_debug_add_log_function(NULL,data); \
} else { \
gst_debug_add_log_function(func,data); \
} \
}G_STMT_END
#define gst_debug_remove_log_function(func) \
(func == gst_debug_log_default) ? \
gst_debug_remove_log_function(NULL) : \
gst_debug_remove_log_function(func)
void gst_debug_set_active (gboolean active);
gboolean gst_debug_is_active (void);
@ -387,6 +373,20 @@ gint gst_debug_construct_win_color (guint colorinfo);
#ifndef GST_DISABLE_GST_DEBUG
#define gst_debug_add_log_function(func,data) \
G_STMT_START{ \
if (func == gst_debug_log_default) { \
gst_debug_add_log_function(NULL,data); \
} else { \
gst_debug_add_log_function(func,data); \
} \
}G_STMT_END
#define gst_debug_remove_log_function(func) \
(func == gst_debug_log_default) ? \
gst_debug_remove_log_function(NULL) : \
gst_debug_remove_log_function(func)
/**
* GST_DEBUG_CATEGORY:
* @cat: the category
@ -497,7 +497,7 @@ extern gboolean __gst_debug_enabled;
/* since 0.10.7, the min debug level, used for quickly discarding debug
* messages that fall under the threshold. */
GST_EXPORT GstDebugLevel __gst_debug_min;
GST_EXPORT GstDebugLevel __gst_debug_min;
/**
* GST_CAT_LEVEL_LOG:

View file

@ -1233,27 +1233,40 @@ static void
gst_base_parse_post_bitrates (GstBaseParse * parse, gboolean post_min,
gboolean post_avg, gboolean post_max)
{
GstTagList *taglist = gst_tag_list_new ();
GstTagList *taglist = NULL;
if (post_min && parse->priv->post_min_bitrate) {
taglist = gst_tag_list_new ();
if (post_min && parse->priv->post_min_bitrate)
gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE,
GST_TAG_MINIMUM_BITRATE, parse->priv->min_bitrate, NULL);
}
if (post_avg && parse->priv->post_avg_bitrate) {
if (taglist == NULL)
taglist = gst_tag_list_new ();
parse->priv->posted_avg_bitrate = parse->priv->avg_bitrate;
gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, GST_TAG_BITRATE,
parse->priv->avg_bitrate, NULL);
}
if (post_max && parse->priv->post_max_bitrate)
if (post_max && parse->priv->post_max_bitrate) {
if (taglist == NULL)
taglist = gst_tag_list_new ();
gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE,
GST_TAG_MAXIMUM_BITRATE, parse->priv->max_bitrate, NULL);
}
GST_DEBUG_OBJECT (parse, "Updated bitrates. Min: %u, Avg: %u, Max: %u",
parse->priv->min_bitrate, parse->priv->avg_bitrate,
parse->priv->max_bitrate);
gst_element_found_tags_for_pad (GST_ELEMENT (parse), parse->srcpad, taglist);
if (taglist != NULL) {
gst_element_found_tags_for_pad (GST_ELEMENT_CAST (parse), parse->srcpad,
taglist);
}
}
/* gst_base_parse_update_bitrates: