| 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 "chromecast/media/cma/base/buffering_frame_provider.h" | 5 #include "chromecast/media/cma/base/buffering_frame_provider.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 10 matching lines...) Expand all Loading... |
| 21 const ::media::VideoDecoderConfig& video_config) | 21 const ::media::VideoDecoderConfig& video_config) |
| 22 : buffer_(buffer), | 22 : buffer_(buffer), |
| 23 audio_config_(audio_config), | 23 audio_config_(audio_config), |
| 24 video_config_(video_config) { | 24 video_config_(video_config) { |
| 25 } | 25 } |
| 26 | 26 |
| 27 BufferingFrameProvider::BufferWithConfig::~BufferWithConfig() { | 27 BufferingFrameProvider::BufferWithConfig::~BufferWithConfig() { |
| 28 } | 28 } |
| 29 | 29 |
| 30 BufferingFrameProvider::BufferingFrameProvider( | 30 BufferingFrameProvider::BufferingFrameProvider( |
| 31 scoped_ptr<CodedFrameProvider> coded_frame_provider, | 31 std::unique_ptr<CodedFrameProvider> coded_frame_provider, |
| 32 size_t max_buffer_size, | 32 size_t max_buffer_size, |
| 33 size_t max_frame_size, | 33 size_t max_frame_size, |
| 34 const FrameBufferedCB& frame_buffered_cb) | 34 const FrameBufferedCB& frame_buffered_cb) |
| 35 : coded_frame_provider_(std::move(coded_frame_provider)), | 35 : coded_frame_provider_(std::move(coded_frame_provider)), |
| 36 is_pending_request_(false), | 36 is_pending_request_(false), |
| 37 is_eos_(false), | 37 is_eos_(false), |
| 38 total_buffer_size_(0), | 38 total_buffer_size_(0), |
| 39 max_buffer_size_(max_buffer_size), | 39 max_buffer_size_(max_buffer_size), |
| 40 max_frame_size_(max_frame_size), | 40 max_frame_size_(max_frame_size), |
| 41 frame_buffered_cb_(frame_buffered_cb), | 41 frame_buffered_cb_(frame_buffered_cb), |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 total_buffer_size_ -= buffer_with_config.buffer()->data_size(); | 132 total_buffer_size_ -= buffer_with_config.buffer()->data_size(); |
| 133 | 133 |
| 134 base::ResetAndReturn(&read_cb_).Run( | 134 base::ResetAndReturn(&read_cb_).Run( |
| 135 buffer_with_config.buffer(), | 135 buffer_with_config.buffer(), |
| 136 buffer_with_config.audio_config(), | 136 buffer_with_config.audio_config(), |
| 137 buffer_with_config.video_config()); | 137 buffer_with_config.video_config()); |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace media | 140 } // namespace media |
| 141 } // namespace chromecast | 141 } // namespace chromecast |
| OLD | NEW |