diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2013-09-12 13:21:37 +0200 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2013-09-12 13:23:28 +0200 |
commit | 2b94641a421f1aba8c451e718854402b404fe617 (patch) | |
tree | 0a224ed41f45e23c03888aebdec467663184ca55 /sys/androidmedia/gstamcvideodec.c | |
parent | efb27f19ec2790714b06b1f9c1a72f5c376474a8 (diff) | |
download | gstreamer-plugins-bad-2b94641a421f1aba8c451e718854402b404fe617.tar.gz |
amcvideodec: Don't put the level restrictions on the sinkpad caps
They tend to be inaccurate and having them in the sinkpad caps
prevents playback of files that would otherwise play fine.
Diffstat (limited to 'sys/androidmedia/gstamcvideodec.c')
-rw-r--r-- | sys/androidmedia/gstamcvideodec.c | 64 |
1 files changed, 3 insertions, 61 deletions
diff --git a/sys/androidmedia/gstamcvideodec.c b/sys/androidmedia/gstamcvideodec.c index 8abfe5558..f15f6848d 100644 --- a/sys/androidmedia/gstamcvideodec.c +++ b/sys/androidmedia/gstamcvideodec.c @@ -162,13 +162,7 @@ create_sink_caps (const GstAmcCodecInfo * codec_info) if (type->n_profile_levels) { for (j = type->n_profile_levels - 1; j >= 0; j--) { - const gchar *profile, *level; - gint k; - GValue va = { 0, }; - GValue v = { 0, }; - - g_value_init (&va, GST_TYPE_LIST); - g_value_init (&v, G_TYPE_STRING); + const gchar *profile; profile = gst_amc_mpeg4_profile_to_string (type->profile_levels[j].profile); @@ -178,21 +172,8 @@ create_sink_caps (const GstAmcCodecInfo * codec_info) continue; } - for (k = 1; k <= type->profile_levels[j].level && k != 0; k <<= 1) { - level = gst_amc_mpeg4_level_to_string (k); - if (!level) - continue; - - g_value_set_string (&v, level); - gst_value_list_append_value (&va, &v); - g_value_reset (&v); - } - tmp2 = gst_structure_copy (tmp); gst_structure_set (tmp2, "profile", G_TYPE_STRING, profile, NULL); - gst_structure_set_value (tmp2, "level", &va); - g_value_unset (&va); - g_value_unset (&v); ret = gst_caps_merge_structure (ret, tmp2); have_profile_level = TRUE; } @@ -218,13 +199,7 @@ create_sink_caps (const GstAmcCodecInfo * codec_info) if (type->n_profile_levels) { for (j = type->n_profile_levels - 1; j >= 0; j--) { - gint profile, level; - gint k; - GValue va = { 0, }; - GValue v = { 0, }; - - g_value_init (&va, GST_TYPE_LIST); - g_value_init (&v, G_TYPE_UINT); + gint profile; profile = gst_amc_h263_profile_to_gst_id (type->profile_levels[j].profile); @@ -235,20 +210,8 @@ create_sink_caps (const GstAmcCodecInfo * codec_info) continue; } - for (k = 1; k <= type->profile_levels[j].level && k != 0; k <<= 1) { - level = gst_amc_h263_level_to_gst_id (k); - if (level == -1) - continue; - - g_value_set_uint (&v, level); - gst_value_list_append_value (&va, &v); - g_value_reset (&v); - } tmp2 = gst_structure_copy (tmp); gst_structure_set (tmp2, "profile", G_TYPE_UINT, profile, NULL); - gst_structure_set_value (tmp2, "level", &va); - g_value_unset (&va); - g_value_unset (&v); ret = gst_caps_merge_structure (ret, tmp2); have_profile_level = TRUE; } @@ -275,13 +238,7 @@ create_sink_caps (const GstAmcCodecInfo * codec_info) if (type->n_profile_levels) { for (j = type->n_profile_levels - 1; j >= 0; j--) { - const gchar *profile, *alternative = NULL, *level; - gint k; - GValue va = { 0, }; - GValue v = { 0, }; - - g_value_init (&va, GST_TYPE_LIST); - g_value_init (&v, G_TYPE_STRING); + const gchar *profile, *alternative = NULL; profile = gst_amc_avc_profile_to_string (type->profile_levels[j].profile, @@ -293,29 +250,14 @@ create_sink_caps (const GstAmcCodecInfo * codec_info) continue; } - for (k = 1; k <= type->profile_levels[j].level && k != 0; k <<= 1) { - level = gst_amc_avc_level_to_string (k); - if (!level) - continue; - - g_value_set_string (&v, level); - gst_value_list_append_value (&va, &v); - g_value_reset (&v); - } tmp2 = gst_structure_copy (tmp); gst_structure_set (tmp2, "profile", G_TYPE_STRING, profile, NULL); - gst_structure_set_value (tmp2, "level", &va); - if (!alternative) - g_value_unset (&va); - g_value_unset (&v); ret = gst_caps_merge_structure (ret, tmp2); if (alternative) { tmp2 = gst_structure_copy (tmp); gst_structure_set (tmp2, "profile", G_TYPE_STRING, alternative, NULL); - gst_structure_set_value (tmp2, "level", &va); - g_value_unset (&va); ret = gst_caps_merge_structure (ret, tmp2); } have_profile_level = TRUE; |