Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: media/base/android/video_decoder_job.cc

Issue 323563002: support adaptive playback in MSE (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/android/video_decoder_job.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d4e5f1e2987f19cdd7f39ad8329a89dac51316d4 100644
--- a/media/base/android/video_decoder_job.cc
+++ b/media/base/android/video_decoder_job.cc
@@ -92,6 +92,26 @@ 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(configs.video_size.width(),
+ configs.video_size.height());
+}
+
bool VideoDecoderJob::AreDemuxerConfigsChanged(
const DemuxerConfigs& configs) const {
return video_codec_ != configs.video_codec ||
« no previous file with comments | « media/base/android/video_decoder_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698