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

Side by Side Diff: media/filters/decoder_stream.cc

Issue 2611333003: [Video] Disable bg optimization if avg keyframe distance is >10s (Closed)
Patch Set: Rebase the test Created 3 years, 11 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 | « media/blink/webmediaplayer_impl_unittest.cc ('k') | media/filters/decoder_stream_traits.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/filters/decoder_stream.h" 5 #include "media/filters/decoder_stream.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 return; 451 return;
452 452
453 case DecodeStatus::ABORTED: 453 case DecodeStatus::ABORTED:
454 // Decoder can return DecodeStatus::ABORTED during Reset() or during 454 // Decoder can return DecodeStatus::ABORTED during Reset() or during
455 // destruction. 455 // destruction.
456 return; 456 return;
457 457
458 case DecodeStatus::OK: 458 case DecodeStatus::OK:
459 // Any successful decode counts! 459 // Any successful decode counts!
460 if (buffer_size > 0) 460 if (buffer_size > 0)
461 StreamTraits::ReportStatistics(statistics_cb_, buffer_size); 461 traits_.ReportStatistics(statistics_cb_, buffer_size);
462 462
463 if (state_ == STATE_NORMAL) { 463 if (state_ == STATE_NORMAL) {
464 if (end_of_stream) { 464 if (end_of_stream) {
465 state_ = STATE_END_OF_STREAM; 465 state_ = STATE_END_OF_STREAM;
466 if (ready_outputs_.empty() && !read_cb_.is_null()) 466 if (ready_outputs_.empty() && !read_cb_.is_null())
467 SatisfyRead(OK, StreamTraits::CreateEOSOutput()); 467 SatisfyRead(OK, StreamTraits::CreateEOSOutput());
468 return; 468 return;
469 } 469 }
470 470
471 if (CanDecodeMore()) 471 if (CanDecodeMore())
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 } 779 }
780 780
781 // The resetting process will be continued in OnDecoderReinitialized(). 781 // The resetting process will be continued in OnDecoderReinitialized().
782 ReinitializeDecoder(); 782 ReinitializeDecoder();
783 } 783 }
784 784
785 template class DecoderStream<DemuxerStream::VIDEO>; 785 template class DecoderStream<DemuxerStream::VIDEO>;
786 template class DecoderStream<DemuxerStream::AUDIO>; 786 template class DecoderStream<DemuxerStream::AUDIO>;
787 787
788 } // namespace media 788 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl_unittest.cc ('k') | media/filters/decoder_stream_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698