After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 642878 - encoding-profile: add a function to create a profile from a discoverer info
encoding-profile: add a function to create a profile from a discoverer info
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal enhancement
: 0.10.36
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-02-21 15:06 UTC by Vincent Penquerc'h
Modified: 2011-10-03 09:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
encoding-profile: add a function to create a profile from a discoverer info (3.89 KB, patch)
2011-02-21 15:06 UTC, Vincent Penquerc'h
needs-work Details | Review
encoding-profile: add a function to create a profile from a discoverer info (3.58 KB, patch)
2011-08-13 10:55 UTC, Vincent Penquerc'h
none Details | Review
encoding-profile: add a function to create a profile from a discoverer info (4.51 KB, patch)
2011-10-03 09:43 UTC, Vincent Penquerc'h
none Details | Review
encoding-profile: add a function to create a profile from a discoverer info (5.01 KB, patch)
2011-10-03 09:50 UTC, Vincent Penquerc'h
committed Details | Review

Description Vincent Penquerc'h 2011-02-21 15:06:37 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.
Comment 1 Edward Hervey 2011-03-08 16:11:06 UTC
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.
Comment 2 Vincent Penquerc'h 2011-08-13 10:55:07 UTC
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).
Comment 3 Vincent Penquerc'h 2011-08-13 10:56:05 UTC
Oops, this had slipped betewen the cracks.
Comments applied.
Comment 4 Sebastian Dröge (slomo) 2011-10-03 09:24:42 UTC
Documentation is missing, other than that looks good
Comment 5 Vincent Penquerc'h 2011-10-03 09:43:39 UTC
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).
Comment 6 Vincent Penquerc'h 2011-10-03 09:50:10 UTC
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).
Comment 7 Sebastian Dröge (slomo) 2011-10-03 09:51:49 UTC
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