| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |