[0.11] gst-plugins-bad: h263parse: make level and profile fields in caps strings

Tim Müller tpm at kemper.freedesktop.org
Sun Jan 22 11:29:54 PST 2012


Module: gst-plugins-bad
Branch: 0.11
Commit: 5791ed71ada0fec58554a342065cf3bf93f37aef
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=5791ed71ada0fec58554a342065cf3bf93f37aef

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Sun Jan 22 19:11:21 2012 +0000

h263parse: make level and profile fields in caps strings

For consistency with other caps.

https://bugzilla.gnome.org/show_bug.cgi?id=658438

---

 gst/videoparsers/gsth263parse.c |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/gst/videoparsers/gsth263parse.c b/gst/videoparsers/gsth263parse.c
index dba1f89..5b369ac 100644
--- a/gst/videoparsers/gsth263parse.c
+++ b/gst/videoparsers/gsth263parse.c
@@ -234,14 +234,23 @@ gst_h263_parse_set_src_caps (GstH263Parse * h263parse,
         NULL);
 
     h263parse->profile = gst_h263_parse_get_profile (params);
-    if (h263parse->profile != -1)
-      gst_caps_set_simple (caps, "profile", G_TYPE_UINT, h263parse->profile,
-          NULL);
+    if (h263parse->profile != -1) {
+      gchar *profile_str;
+
+      profile_str = g_strdup_printf ("%u", h263parse->profile);
+      gst_caps_set_simple (caps, "profile", G_TYPE_STRING, profile_str, NULL);
+      g_free (profile_str);
+    }
 
     h263parse->level = gst_h263_parse_get_level (params, h263parse->profile,
         h263parse->bitrate, fr_num, fr_denom);
-    if (h263parse->level != -1)
-      gst_caps_set_simple (caps, "level", G_TYPE_UINT, h263parse->level, NULL);
+    if (h263parse->level != -1) {
+      gchar *level_str;
+
+      level_str = g_strdup_printf ("%u", h263parse->level);
+      gst_caps_set_simple (caps, "level", G_TYPE_STRING, level_str, NULL);
+      g_free (level_str);
+    }
   }
 
   gst_pad_set_caps (GST_BASE_PARSE_SRC_PAD (GST_BASE_PARSE (h263parse)), caps);



More information about the gstreamer-commits mailing list