av1parse: Use descriptive profile name instead of numeric

As per AV1 specification Annex A, AV1 profiles have explicit and
descriptive names for each seq_profile.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1456>
This commit is contained in:
Seungha Yang 2021-12-19 21:44:19 +09:00
parent ac978099c6
commit 40213b5c75
2 changed files with 7 additions and 7 deletions

View file

@ -373,11 +373,11 @@ gst_av1_parse_profile_to_string (GstAV1Profile profile)
{
switch (profile) {
case GST_AV1_PROFILE_0:
return "0";
return "main";
case GST_AV1_PROFILE_1:
return "1";
return "high";
case GST_AV1_PROFILE_2:
return "2";
return "professional";
default:
break;
}
@ -391,11 +391,11 @@ gst_av1_parse_profile_from_string (const gchar * profile)
if (!profile)
return GST_AV1_PROFILE_UNDEFINED;
if (g_strcmp0 (profile, "0") == 0)
if (g_strcmp0 (profile, "main") == 0)
return GST_AV1_PROFILE_0;
else if (g_strcmp0 (profile, "1") == 0)
else if (g_strcmp0 (profile, "high") == 0)
return GST_AV1_PROFILE_1;
else if (g_strcmp0 (profile, "2") == 0)
else if (g_strcmp0 (profile, "professional") == 0)
return GST_AV1_PROFILE_2;
return GST_AV1_PROFILE_UNDEFINED;

View file

@ -63,7 +63,7 @@ check_caps_event (GstHarness * h)
fail_unless_equals_int (width, 400);
fail_unless_equals_int (height, 300);
fail_unless_equals_int (depth, 8);
fail_unless_equals_string (profile, "0");
fail_unless_equals_string (profile, "main");
gst_caps_unref (caps);
}