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

Side by Side Diff: media/gpu/android_video_decode_accelerator.cc

Issue 2074983002: Immediately reset for vp8 when there's nothing to flush. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/gpu/android_video_decode_accelerator.h" 5 #include "media/gpu/android_video_decode_accelerator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 bitstreams_notified_in_advance_.clear(); 1261 bitstreams_notified_in_advance_.clear();
1262 1262
1263 // Any error that is waiting to post can be ignored. 1263 // Any error that is waiting to post can be ignored.
1264 error_sequence_token_++; 1264 error_sequence_token_++;
1265 1265
1266 DCHECK(strategy_); 1266 DCHECK(strategy_);
1267 strategy_->ReleaseCodecBuffers(output_picture_buffers_); 1267 strategy_->ReleaseCodecBuffers(output_picture_buffers_);
1268 1268
1269 // Some VP8 files require complete MediaCodec drain before we can call 1269 // Some VP8 files require complete MediaCodec drain before we can call
1270 // MediaCodec.flush() or MediaCodec.reset(). http://crbug.com/598963. 1270 // MediaCodec.flush() or MediaCodec.reset(). http://crbug.com/598963.
1271 if (media_codec_ && codec_config_->codec_ == kCodecVP8) { 1271 if (media_codec_ && codec_config_->codec_ == kCodecVP8 &&
1272 !bitstream_buffers_in_decoder_.empty()) {
Tima Vaisburd 2016/06/16 23:01:34 What if the decoder stalled, i.e. no input for som
DaleCurtis 2016/06/16 23:20:47 Does it matter? I assume if the decoder has nothin
Tima Vaisburd 2016/06/16 23:47:29 If the decoder has nothing inside, we proceed to R
1272 // Postpone ResetCodecState() after the drain. 1273 // Postpone ResetCodecState() after the drain.
1273 StartCodecDrain(DRAIN_FOR_RESET); 1274 StartCodecDrain(DRAIN_FOR_RESET);
1274 } else { 1275 } else {
1275 ResetCodecState(); 1276 ResetCodecState();
1276 base::ThreadTaskRunnerHandle::Get()->PostTask( 1277 base::ThreadTaskRunnerHandle::Get()->PostTask(
1277 FROM_HERE, base::Bind(&AndroidVideoDecodeAccelerator::NotifyResetDone, 1278 FROM_HERE, base::Bind(&AndroidVideoDecodeAccelerator::NotifyResetDone,
1278 weak_this_factory_.GetWeakPtr())); 1279 weak_this_factory_.GetWeakPtr()));
1279 } 1280 }
1280 } 1281 }
1281 1282
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1650 if (MediaCodecUtil::IsSurfaceViewOutputSupported()) { 1651 if (MediaCodecUtil::IsSurfaceViewOutputSupported()) {
1651 capabilities.flags |= VideoDecodeAccelerator::Capabilities:: 1652 capabilities.flags |= VideoDecodeAccelerator::Capabilities::
1652 SUPPORTS_EXTERNAL_OUTPUT_SURFACE; 1653 SUPPORTS_EXTERNAL_OUTPUT_SURFACE;
1653 } 1654 }
1654 } 1655 }
1655 1656
1656 return capabilities; 1657 return capabilities;
1657 } 1658 }
1658 1659
1659 } // namespace media 1660 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698