Commit bf8de4c1 authored by Xiaohan Wang's avatar Xiaohan Wang Committed by Commit Bot

media: Rename PipelineDecoderInfo::is_decrypting_demuxer_stream

is_decrypting_demuxer_stream -> has_decrypting_demuxer_stream
since the pipeline "has" a DecryptingDemuxerStream instead of "is".

Tbr: dcheng@chromium.org
Change-Id: I95e812cb4e0cb408d57c849730e8fe8ffe1dfaa5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1917620
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: default avatarTed Meyer <tmathmeyer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715576}
parent 37154145
......@@ -701,7 +701,7 @@ TEST_F(PipelineImplTest, OnStatisticsUpdate) {
// Both info changed.
stats.audio_decoder_info.decoder_name = "NewTestAudioDecoderName";
stats.video_decoder_info.is_decrypting_demuxer_stream = true;
stats.video_decoder_info.has_decrypting_demuxer_stream = true;
EXPECT_CALL(callbacks_, OnAudioDecoderChange(_));
EXPECT_CALL(callbacks_, OnVideoDecoderChange(_));
renderer_client_->OnStatisticsUpdate(stats);
......
......@@ -76,8 +76,8 @@ bool operator==(const PipelineDecoderInfo& first,
const PipelineDecoderInfo& second) {
return first.decoder_name == second.decoder_name &&
first.is_platform_decoder == second.is_platform_decoder &&
first.is_decrypting_demuxer_stream ==
second.is_decrypting_demuxer_stream;
first.has_decrypting_demuxer_stream ==
second.has_decrypting_demuxer_stream;
}
bool operator!=(const PipelineDecoderInfo& first,
......@@ -88,8 +88,8 @@ bool operator!=(const PipelineDecoderInfo& first,
std::ostream& operator<<(std::ostream& out, const PipelineDecoderInfo& info) {
return out << "{decoder_name:" << info.decoder_name << ","
<< "is_platform_decoder:" << info.is_platform_decoder << ","
<< "is_decrypting_demuxer_stream:"
<< info.is_decrypting_demuxer_stream << "}";
<< "has_decrypting_demuxer_stream:"
<< info.has_decrypting_demuxer_stream << "}";
}
} // namespace media
......@@ -73,7 +73,7 @@ typedef base::OnceCallback<void(PipelineStatus)> PipelineStatusCallback;
struct PipelineDecoderInfo {
bool is_platform_decoder = false;
bool is_decrypting_demuxer_stream = false;
bool has_decrypting_demuxer_stream = false;
std::string decoder_name;
};
......
......@@ -42,7 +42,7 @@ void DecoderStreamTraits<DemuxerStream::AUDIO>::SetIsPlatformDecoder(
void DecoderStreamTraits<DemuxerStream::AUDIO>::SetIsDecryptingDemuxerStream(
bool is_dds) {
stats_.audio_decoder_info.is_decrypting_demuxer_stream = is_dds;
stats_.audio_decoder_info.has_decrypting_demuxer_stream = is_dds;
}
DecoderStreamTraits<DemuxerStream::AUDIO>::DecoderStreamTraits(
......@@ -141,7 +141,7 @@ void DecoderStreamTraits<DemuxerStream::VIDEO>::SetIsPlatformDecoder(
void DecoderStreamTraits<DemuxerStream::VIDEO>::SetIsDecryptingDemuxerStream(
bool is_dds) {
stats_.video_decoder_info.is_decrypting_demuxer_stream = is_dds;
stats_.video_decoder_info.has_decrypting_demuxer_stream = is_dds;
}
DecoderStreamTraits<DemuxerStream::VIDEO>::DecoderStreamTraits(
......
......@@ -343,5 +343,5 @@ struct PredictionTargets {
struct PipelineDecoderInfo {
string decoder_name;
bool is_platform_decoder = false;
bool is_decrypting_demuxer_stream = false;
bool has_decrypting_demuxer_stream = false;
};
......@@ -57,15 +57,16 @@ struct StructTraits<media::mojom::PipelineDecoderInfoDataView,
return input.is_platform_decoder;
}
static bool is_decrypting_demuxer_stream(
static bool has_decrypting_demuxer_stream(
const media::PipelineDecoderInfo& input) {
return input.is_decrypting_demuxer_stream;
return input.has_decrypting_demuxer_stream;
}
static bool Read(media::mojom::PipelineDecoderInfoDataView data,
media::PipelineDecoderInfo* output) {
output->is_platform_decoder = data.is_platform_decoder();
output->is_decrypting_demuxer_stream = data.is_decrypting_demuxer_stream();
output->has_decrypting_demuxer_stream =
data.has_decrypting_demuxer_stream();
return data.ReadDecoderName(&output->decoder_name);
}
};
......
......@@ -104,7 +104,7 @@ std::string MediaMetricsProvider::GetUMANameForAVStream(
}
#endif
if (player_info.video_pipeline_info.is_decrypting_demuxer_stream) {
if (player_info.video_pipeline_info.has_decrypting_demuxer_stream) {
uma_name += "DDS.";
}
......
......@@ -359,14 +359,14 @@ class CourierRendererTest : public testing::Test {
message->set_video_memory_usage(stats.video_memory_usage);
message->mutable_audio_decoder_info()->set_is_platform_decoder(
stats.audio_decoder_info.is_platform_decoder);
message->mutable_audio_decoder_info()->set_is_decrypting_demuxer_stream(
stats.audio_decoder_info.is_decrypting_demuxer_stream);
message->mutable_audio_decoder_info()->set_has_decrypting_demuxer_stream(
stats.audio_decoder_info.has_decrypting_demuxer_stream);
message->mutable_audio_decoder_info()->set_decoder_name(
stats.audio_decoder_info.decoder_name);
message->mutable_video_decoder_info()->set_is_platform_decoder(
stats.video_decoder_info.is_platform_decoder);
message->mutable_video_decoder_info()->set_is_decrypting_demuxer_stream(
stats.video_decoder_info.is_decrypting_demuxer_stream);
message->mutable_video_decoder_info()->set_has_decrypting_demuxer_stream(
stats.video_decoder_info.has_decrypting_demuxer_stream);
message->mutable_video_decoder_info()->set_decoder_name(
stats.video_decoder_info.decoder_name);
OnReceivedRpc(std::move(rpc));
......
......@@ -274,7 +274,7 @@ message DecryptConfig {
message PipelineDecoderInfo {
optional string decoder_name = 1;
optional bool is_platform_decoder = 2;
optional bool is_decrypting_demuxer_stream = 3;
optional bool has_decrypting_demuxer_stream = 3;
};
message PipelineStatistics {
......
......@@ -422,16 +422,16 @@ void ConvertProtoToPipelineStatistics(
stats->audio_decoder_info.decoder_name = audio_info.decoder_name();
stats->audio_decoder_info.is_platform_decoder =
audio_info.is_platform_decoder();
stats->audio_decoder_info.is_decrypting_demuxer_stream =
audio_info.is_decrypting_demuxer_stream();
stats->audio_decoder_info.has_decrypting_demuxer_stream =
audio_info.has_decrypting_demuxer_stream();
}
if (stats_message.has_video_decoder_info()) {
auto video_info = stats_message.video_decoder_info();
stats->video_decoder_info.decoder_name = video_info.decoder_name();
stats->video_decoder_info.is_platform_decoder =
video_info.is_platform_decoder();
stats->video_decoder_info.is_decrypting_demuxer_stream =
video_info.is_decrypting_demuxer_stream();
stats->video_decoder_info.has_decrypting_demuxer_stream =
video_info.has_decrypting_demuxer_stream();
}
if (stats_message.has_video_frame_duration_average_usec()) {
stats->video_frame_duration_average = base::TimeDelta::FromMicroseconds(
......
......@@ -164,14 +164,14 @@ TEST_F(ProtoUtilsTest, PipelineStatisticsConversion) {
pb_video_info->set_decoder_name(original.video_decoder_info.decoder_name);
pb_video_info->set_is_platform_decoder(
original.video_decoder_info.is_platform_decoder);
pb_video_info->set_is_decrypting_demuxer_stream(
original.video_decoder_info.is_decrypting_demuxer_stream);
pb_video_info->set_has_decrypting_demuxer_stream(
original.video_decoder_info.has_decrypting_demuxer_stream);
pb_audio_info->set_decoder_name(original.audio_decoder_info.decoder_name);
pb_audio_info->set_is_platform_decoder(
original.audio_decoder_info.is_platform_decoder);
pb_audio_info->set_is_decrypting_demuxer_stream(
original.audio_decoder_info.is_decrypting_demuxer_stream);
pb_audio_info->set_has_decrypting_demuxer_stream(
original.audio_decoder_info.has_decrypting_demuxer_stream);
PipelineStatistics converted;
......
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