mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
av1enc: Update for newly designed AV1 profile signalling
Accept named AV1 profiles (i.e., main, high, and professional) as well Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1456>
This commit is contained in:
parent
91484ce2ac
commit
796007f75d
1 changed files with 18 additions and 4 deletions
|
@ -589,10 +589,24 @@ gst_av1_enc_get_downstream_profile (GstAV1Enc * av1enc)
|
|||
if (profile_str) {
|
||||
gchar *endptr = NULL;
|
||||
|
||||
profile = g_ascii_strtoull (profile_str, &endptr, 10);
|
||||
if (*endptr != '\0' || profile < 0 || profile > 3) {
|
||||
GST_ERROR_OBJECT (av1enc, "Invalid profile '%s'", profile_str);
|
||||
profile = DEFAULT_PROFILE;
|
||||
if (g_strcmp0 (profile_str, "main") == 0) {
|
||||
GST_DEBUG_OBJECT (av1enc, "Downstream profile is \"main\"");
|
||||
profile = 0;
|
||||
} else if (g_strcmp0 (profile_str, "high") == 0) {
|
||||
profile = 1;
|
||||
GST_DEBUG_OBJECT (av1enc, "Downstream profile is \"high\"");
|
||||
} else if (g_strcmp0 (profile_str, "professional") == 0) {
|
||||
profile = 2;
|
||||
GST_DEBUG_OBJECT (av1enc, "Downstream profile is \"professional\"");
|
||||
} else {
|
||||
profile = g_ascii_strtoull (profile_str, &endptr, 10);
|
||||
if (*endptr != '\0' || profile < 0 || profile > 3) {
|
||||
GST_ERROR_OBJECT (av1enc, "Invalid profile '%s'", profile_str);
|
||||
profile = DEFAULT_PROFILE;
|
||||
} else {
|
||||
GST_DEBUG_OBJECT (av1enc,
|
||||
"Downstream profile is \"%s\"", profile_str);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue