GNOME Bugzilla – Bug 642878
encoding-profile: add a function to create a profile from a discoverer info
Last modified: 2011-10-03 09:51:54 UTC
Created attachment 181465 [details] [review] encoding-profile: add a function to create a profile from a discoverer info This will be useful when we want to remux a file in whatever container it came from, for instance.
Review of attachment 181465 [details] [review]: ::: 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.
Created attachment 193754 [details] [review] encoding-profile: add a function to create a profile from a discoverer info Only A/V streams are added at the moment, there does not seem to be a similar way to add other streams (eg, subtitles).
Oops, this had slipped betewen the cracks. Comments applied.
Documentation is missing, other than that looks good
Created attachment 198066 [details] [review] encoding-profile: add a function to create a profile from a discoverer info Only A/V streams are added at the moment, there does not seem to be a similar way to add other streams (eg, subtitles).
Created attachment 198067 [details] [review] encoding-profile: add a function to create a profile from a discoverer info Only A/V streams are added at the moment, there does not seem to be a similar way to add other streams (eg, subtitles).
commit 93900d47edfa358e7189d002445db060e2bb3f42 Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Fri Feb 18 11:48:37 2011 +0000 encoding-profile: add a function to create a profile from a discoverer info Only A/V streams are added at the moment, there does not seem to be a similar way to add other streams (eg, subtitles). https://bugzilla.gnome.org/show_bug.cgi?id=642878