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

Unified Diff: media/gpu/android_video_decode_accelerator.cc

Issue 2047003003: Rename MediaCodecBridge::Reset() to Flush() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed a couple Created 4 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/filters/android/media_codec_audio_decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/android_video_decode_accelerator.cc
diff --git a/media/gpu/android_video_decode_accelerator.cc b/media/gpu/android_video_decode_accelerator.cc
index 13186b6db9340abbc63a78490a853ccc6657bd95..11dce853efe68eb625fadc9c235ab3969dc54372 100644
--- a/media/gpu/android_video_decode_accelerator.cc
+++ b/media/gpu/android_video_decode_accelerator.cc
@@ -1219,15 +1219,14 @@ void AndroidVideoDecodeAccelerator::ResetCodecState() {
// conservative approach and let the errors post.
// TODO(liberato): revisit this once we sort out the error state a bit more.
- // When codec is not in error state we can quickly reset (internally calls
- // flush()) for JB-MR2 and beyond. Prior to JB-MR2, flush() had several bugs
- // (b/8125974, b/8347958) so we must delete the MediaCodec and create a new
- // one. The full reconfigure is much slower and may cause visible freezing if
- // done mid-stream.
+ // When the codec is not in error state we can flush() for JB-MR2 and beyond.
+ // Prior to JB-MR2, flush() had several bugs (b/8125974, b/8347958) so we must
+ // delete the MediaCodec and create a new one. The full reconfigure is much
+ // slower and may cause visible freezing if done mid-stream.
if (!did_codec_error_happen &&
base::android::BuildInfo::GetInstance()->sdk_int() >= 18) {
- DVLOG(3) << __FUNCTION__ << " Doing fast MediaCodec reset (flush).";
- media_codec_->Reset();
+ DVLOG(3) << __FUNCTION__ << " Flushing MediaCodec.";
+ media_codec_->Flush();
// Since we just flushed all the output buffers, make sure that nothing is
// using them.
strategy_->CodecChanged(media_codec_.get());
@@ -1235,8 +1234,6 @@ void AndroidVideoDecodeAccelerator::ResetCodecState() {
DVLOG(3) << __FUNCTION__
<< " Deleting the MediaCodec and creating a new one.";
g_avda_timer.Pointer()->StopTimer(this);
- // Changing the codec will also notify the strategy to forget about any
- // output buffers it has currently.
ConfigureMediaCodecAsynchronously();
}
}
« no previous file with comments | « media/filters/android/media_codec_audio_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698