mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 14:36:24 +00:00
encoding-profile: Recurse into nested container profiles and only add the final audio/video streams
If we e.g. have AVI with DV container with video/audio inside the DV container, we can't handle this at this point with an encoding profile. Instead of erroring out, flatten the container hierarchy. https://bugzilla.gnome.org/show_bug.cgi?id=765708
This commit is contained in:
parent
4c2e7ae051
commit
e2bde252a6
1 changed files with 15 additions and 0 deletions
|
@ -1517,6 +1517,21 @@ add_stream_to_profile (GstEncodingContainerProfile * profile,
|
|||
sprofile =
|
||||
(GstEncodingProfile *) gst_encoding_video_profile_new (caps, NULL,
|
||||
NULL, 0);
|
||||
} else if (GST_IS_DISCOVERER_CONTAINER_INFO (sinfo)) {
|
||||
GList *streams, *stream;
|
||||
guint n_streams = 0;
|
||||
|
||||
streams =
|
||||
gst_discoverer_container_info_get_streams (GST_DISCOVERER_CONTAINER_INFO
|
||||
(sinfo));
|
||||
for (stream = streams; stream; stream = stream->next) {
|
||||
if (add_stream_to_profile (profile,
|
||||
(GstDiscovererStreamInfo *) stream->data))
|
||||
n_streams++;
|
||||
}
|
||||
gst_discoverer_stream_info_list_free (streams);
|
||||
|
||||
return n_streams != 0;
|
||||
} else {
|
||||
GST_WARNING ("Ignoring stream of type '%s'",
|
||||
g_type_name (G_OBJECT_TYPE (sinfo)));
|
||||
|
|
Loading…
Reference in a new issue