Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[media] Add codec util test for IAMF #4188

Merged
merged 5 commits into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions starboard/shared/starboard/media/codec_util_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,20 @@ TEST(CodecUtilTest, DoesNotParse1AsPcmForNonWavSubtypes) {
EXPECT_EQ(GetAudioCodecFromString("1", "webm"), kSbMediaAudioCodecNone);
}

#if SB_API_VERSION >= 15
TEST(CodecUtilTest, ParsesIamfCodec) {
EXPECT_EQ(GetAudioCodecFromString("iamf", ""), kSbMediaAudioCodecIamf);
EXPECT_EQ(GetAudioCodecFromString("iamf.000.000.Opus", ""),
osagie98 marked this conversation as resolved.
Show resolved Hide resolved
kSbMediaAudioCodecIamf);
EXPECT_EQ(GetAudioCodecFromString("iamf.000.000.mp4a.40.2", ""),
kSbMediaAudioCodecIamf);
EXPECT_EQ(GetAudioCodecFromString("iamf.000.000.fLaC", ""),
kSbMediaAudioCodecIamf);
EXPECT_EQ(GetAudioCodecFromString("iamf.000.000.ipcm", ""),
kSbMediaAudioCodecIamf);
}
#endif // SB_API_VERSION >= 15

} // namespace
} // namespace media
} // namespace starboard
Expand Down
Loading