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

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

Issue 2611333003: [Video] Disable bg optimization if avg keyframe distance is >10s (Closed)
Patch Set: 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
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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 return; 446 return;
447 447
448 case DecodeStatus::ABORTED: 448 case DecodeStatus::ABORTED:
449 // Decoder can return DecodeStatus::ABORTED during Reset() or during 449 // Decoder can return DecodeStatus::ABORTED during Reset() or during
450 // destruction. 450 // destruction.
451 return; 451 return;
452 452
453 case DecodeStatus::OK: 453 case DecodeStatus::OK:
454 // Any successful decode counts! 454 // Any successful decode counts!
455 if (buffer_size > 0) 455 if (buffer_size > 0)
456 StreamTraits::ReportStatistics(statistics_cb_, buffer_size); 456 traits_.ReportStatistics(statistics_cb_, buffer_size);
457 457
458 if (state_ == STATE_NORMAL) { 458 if (state_ == STATE_NORMAL) {
459 if (end_of_stream) { 459 if (end_of_stream) {
460 state_ = STATE_END_OF_STREAM; 460 state_ = STATE_END_OF_STREAM;
461 if (ready_outputs_.empty() && !read_cb_.is_null()) 461 if (ready_outputs_.empty() && !read_cb_.is_null())
462 SatisfyRead(OK, StreamTraits::CreateEOSOutput()); 462 SatisfyRead(OK, StreamTraits::CreateEOSOutput());
463 return; 463 return;
464 } 464 }
465 465
466 if (CanDecodeMore()) 466 if (CanDecodeMore())
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 } 774 }
775 775
776 // The resetting process will be continued in OnDecoderReinitialized(). 776 // The resetting process will be continued in OnDecoderReinitialized().
777 ReinitializeDecoder(); 777 ReinitializeDecoder();
778 } 778 }
779 779
780 template class DecoderStream<DemuxerStream::VIDEO>; 780 template class DecoderStream<DemuxerStream::VIDEO>;
781 template class DecoderStream<DemuxerStream::AUDIO>; 781 template class DecoderStream<DemuxerStream::AUDIO>;
782 782
783 } // namespace media 783 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698