Chromium Code Reviews| Index: media/base/android/video_decoder_job.cc |
| diff --git a/media/base/android/video_decoder_job.cc b/media/base/android/video_decoder_job.cc |
| index 3e4f684163dcb573f7f445d499e97f13c10783e3..c6765579c07ec5fc0ed2649f0c328457d2e754ea 100644 |
| --- a/media/base/android/video_decoder_job.cc |
| +++ b/media/base/android/video_decoder_job.cc |
| @@ -92,6 +92,25 @@ void VideoDecoderJob::UpdateDemuxerConfigs(const DemuxerConfigs& configs) { |
| set_is_content_encrypted(configs.is_video_encrypted); |
| } |
| +bool VideoDecoderJob::IsCodecReconfigureNeeded( |
| + const DemuxerConfigs& configs) const { |
| + if (!media_codec_bridge_) |
| + return true; |
| + |
| + if (!AreDemuxerConfigsChanged(configs)) |
| + return false; |
| + |
| + bool only_size_changed = false; |
| + if (video_codec_ == configs.video_codec && |
| + is_content_encrypted() == configs.is_video_encrypted) { |
| + only_size_changed = true; |
| + } |
| + |
| + return !only_size_changed || |
| + !static_cast<VideoCodecBridge*>(media_codec_bridge_.get())-> |
| + IsAdaptivePlaybackSupported(width_, height_); |
|
wolenetz
2014/06/06 23:28:07
s/width_/configs.video_size.width()/
s/height_/con
qinmin
2014/06/07 01:31:55
Done. A stupid mistake :(
|
| +} |
| + |
| bool VideoDecoderJob::AreDemuxerConfigsChanged( |
| const DemuxerConfigs& configs) const { |
| return video_codec_ != configs.video_codec || |