Commit 5509a7f2 authored by Wan-Teh Chang's avatar Wan-Teh Chang Committed by Commit Bot

Add Gav1VideoDecoder to watch_time_recorder.cc.

Also print the hash padded with leading 0's to 8 hex digits.

Bug: 1026522
Change-Id: I2f8f8db71619839beccd8723461f0842ea960240
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2042195Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#739218}
parent d5c1ca86
......@@ -50,6 +50,7 @@ enum class VideoDecoderName : int {
kDav1d = 7, // Dav1dVideoDecoder
kFuchsia = 8, // FuchsiaVideoDecoder
kMediaPlayer = 9, // MediaPlayer
kLibgav1 = 10, // Gav1VideoDecoder
};
static AudioDecoderName ConvertAudioDecoderNameToEnum(const std::string& name) {
......@@ -94,6 +95,8 @@ static VideoDecoderName ConvertVideoDecoderNameToEnum(const std::string& name) {
return VideoDecoderName::kFuchsia;
case 0x667dc202:
return VideoDecoderName::kMediaPlayer;
case 0x0cd14d5b:
return VideoDecoderName::kLibgav1;
default:
DLOG_IF(WARNING, !name.empty())
<< "Unknown decoder name encountered; metrics need updating: "
......
......@@ -1556,10 +1556,11 @@ TEST_F(WatchTimeRecorderTest, DISABLED_PrintExpectedDecoderNameHashes) {
"FFmpegAudioDecoder", "FFmpegVideoDecoder", "GpuVideoDecoder",
"MojoVideoDecoder", "MojoAudioDecoder", "VpxVideoDecoder",
"AomVideoDecoder", "DecryptingAudioDecoder", "DecryptingVideoDecoder",
"Dav1dVideoDecoder", "FuchsiaVideoDecoder", "MediaPlayer"};
"Dav1dVideoDecoder", "FuchsiaVideoDecoder", "MediaPlayer",
"Gav1VideoDecoder"};
printf("%18s = 0\n", "None");
for (const auto& name : kDecoderNames)
printf("%18s = 0x%x\n", name.c_str(), base::PersistentHash(name));
printf("%18s = 0x%08x\n", name.c_str(), base::PersistentHash(name));
}
} // namespace media
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment