From 40213b5c75b3b19cbe7955377ff09bf3c13b609d Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Sun, 19 Dec 2021 21:44:19 +0900 Subject: [PATCH] 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: --- .../gst-plugins-bad/gst/videoparsers/gstav1parse.c | 12 ++++++------ .../gst-plugins-bad/tests/check/elements/av1parse.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/subprojects/gst-plugins-bad/gst/videoparsers/gstav1parse.c b/subprojects/gst-plugins-bad/gst/videoparsers/gstav1parse.c index e2ea2ddf76..106086191f 100644 --- a/subprojects/gst-plugins-bad/gst/videoparsers/gstav1parse.c +++ b/subprojects/gst-plugins-bad/gst/videoparsers/gstav1parse.c @@ -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; diff --git a/subprojects/gst-plugins-bad/tests/check/elements/av1parse.c b/subprojects/gst-plugins-bad/tests/check/elements/av1parse.c index e36149a4d3..868adf4ca9 100644 --- a/subprojects/gst-plugins-bad/tests/check/elements/av1parse.c +++ b/subprojects/gst-plugins-bad/tests/check/elements/av1parse.c @@ -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); }