[Bug 642878] encoding-profile: add a function to create a profile from a discoverer info

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Mar 8 08:11:13 PST 2011


https://bugzilla.gnome.org/show_bug.cgi?id=642878
  GStreamer | gst-plugins-base | git

Edward Hervey <bilboed> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #181465|none                        |needs-work
             status|                            |

--- Comment #1 from Edward Hervey <bilboed at gmail.com> 2011-03-08 16:11:06 UTC ---
Review of attachment 181465:
 --> (https://bugzilla.gnome.org/review?bug=642878&attachment=181465)

::: gst-libs/gst/pbutils/encoding-profile.c
@@ +987,3 @@
+  caps = gst_discoverer_stream_info_get_caps (sinfo);
+  scaps = gst_caps_to_string (caps);
+  GST_LOG ("Container: %s\n", scaps);

no need to generate strings.

Use the GST_PTR_FORMAT modifier.

Ex: "lala : %"GST_PTR_FORMAT, caps

@@ +988,3 @@
+  scaps = gst_caps_to_string (caps);
+  GST_LOG ("Container: %s\n", scaps);
+  profile = gst_encoding_container_profile_new ("", "", caps, NULL);

might want to use a name specifying it was created automatically.
"auto-generated", "Created from GstDiscovererInfo"

Or something like that.

@@ +1006,3 @@
+    scaps = gst_caps_to_string (caps);
+    GST_LOG ("Stream: %s\n", scaps);
+    if (!strncmp (gst_structure_get_name (gst_caps_get_structure (caps, 0)),

Use GST_IS_DISCOVERER_{AUDIO|VIDEO}_INFO instead. Less code, more reliable.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list