encoding-profile: don't order profiles by stream ID ..

when creating a profile from a discoverer info.

There is no justification for the existing code, and talking with
Thibault he cannot remember why the sort was in place.

On the other hand, this allows GES users to not have to implement
a callback for the select-tracks-for-object callback when using
it to trim a single clip, which the output profile was built from:
track elements will be placed in the appropriate track by default,
that is the one that will be connected to the matching profile.

For multi-clip timelines, the situation doesn't change, users will
still have to implement a callback and do the leg work of placing
track elements (if any) in a matching track (if any).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1549>
This commit is contained in:
Mathieu Duponchelle 2022-01-21 00:57:16 +01:00 committed by GStreamer Marge Bot
parent 0f85a46148
commit 62c303c2e0

View file

@ -2258,13 +2258,6 @@ create_stream_profile_recurse (GstEncodingProfile * toplevel,
return toplevel;
}
static gint
_compare_profile_names (const GstEncodingProfile * a,
const GstEncodingProfile * b)
{
return g_strcmp0 (a->name, b->name);
}
/**
* gst_encoding_profile_from_discoverer:
* @info: (transfer none): The #GstDiscovererInfo to read from
@ -2296,11 +2289,6 @@ gst_encoding_profile_from_discoverer (GstDiscovererInfo * info)
g_object_unref (profile);
return NULL;
}
/* Sort by stream ID */
GST_ENCODING_CONTAINER_PROFILE (profile)->encodingprofiles =
g_list_sort (GST_ENCODING_CONTAINER_PROFILE (profile)->encodingprofiles,
(GCompareFunc) _compare_profile_names);
}
return (GstEncodingProfile *) profile;