diff options
author | Thibault Saunier <tsaunier@gnome.org> | 2015-11-02 11:34:56 +0100 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2015-11-02 11:35:55 +0100 |
commit | a7123ebb58cfa6cb935148b5695b69902b464b19 (patch) | |
tree | b5e8ea5402c1e38b3a1052ae83a0db2b69d0d284 | |
parent | 83fa06aab5fc04cf4995ad4576e8dd1e3acb8d94 (diff) |
encoding-profile: Do not force user to provide an encoding profile name
And use the profile called `default` if none provided.
-rw-r--r-- | gst-libs/gst/pbutils/encoding-profile.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gst-libs/gst/pbutils/encoding-profile.c b/gst-libs/gst/pbutils/encoding-profile.c index 93264e08e..ee308e591 100644 --- a/gst-libs/gst/pbutils/encoding-profile.c +++ b/gst-libs/gst/pbutils/encoding-profile.c @@ -1214,7 +1214,8 @@ done: /** * gst_encoding_profile_find: * @targetname: (transfer none): The name of the target - * @profilename: (transfer none): The name of the profile + * @profilename: (transfer none): (allow-none): The name of the profile, if %NULL + * provided, it will default to the encoding profile called `default`. * @category: (transfer none) (allow-none): The target category. Can be %NULL * * Find the #GstEncodingProfile with the specified name and category. @@ -1229,11 +1230,12 @@ gst_encoding_profile_find (const gchar * targetname, const gchar * profilename, GstEncodingTarget *target; g_return_val_if_fail (targetname != NULL, NULL); - g_return_val_if_fail (profilename != NULL, NULL); target = gst_encoding_target_load (targetname, category, NULL); if (target) { - res = gst_encoding_target_get_profile (target, profilename); + res = + gst_encoding_target_get_profile (target, + profilename ? profilename : "default"); gst_encoding_target_unref (target); } |