| 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/pipeline/video_pipeline_impl.h" | 5 #include "chromecast/media/cma/pipeline/video_pipeline_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 video_decoder_(decoder), | 32 video_decoder_(decoder), |
| 33 natural_size_changed_cb_(client.natural_size_changed_cb) { | 33 natural_size_changed_cb_(client.natural_size_changed_cb) { |
| 34 DCHECK(video_decoder_); | 34 DCHECK(video_decoder_); |
| 35 } | 35 } |
| 36 | 36 |
| 37 VideoPipelineImpl::~VideoPipelineImpl() { | 37 VideoPipelineImpl::~VideoPipelineImpl() { |
| 38 } | 38 } |
| 39 | 39 |
| 40 ::media::PipelineStatus VideoPipelineImpl::Initialize( | 40 ::media::PipelineStatus VideoPipelineImpl::Initialize( |
| 41 const std::vector<::media::VideoDecoderConfig>& configs, | 41 const std::vector<::media::VideoDecoderConfig>& configs, |
| 42 scoped_ptr<CodedFrameProvider> frame_provider) { | 42 std::unique_ptr<CodedFrameProvider> frame_provider) { |
| 43 DCHECK_GT(configs.size(), 0u); | 43 DCHECK_GT(configs.size(), 0u); |
| 44 for (const auto& config : configs) { | 44 for (const auto& config : configs) { |
| 45 CMALOG(kLogControl) << __FUNCTION__ << " " | 45 CMALOG(kLogControl) << __FUNCTION__ << " " |
| 46 << config.AsHumanReadableString(); | 46 << config.AsHumanReadableString(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 if (frame_provider) { | 49 if (frame_provider) { |
| 50 SetCodedFrameProvider(std::move(frame_provider), kAppVideoBufferSize, | 50 SetCodedFrameProvider(std::move(frame_provider), kAppVideoBufferSize, |
| 51 kMaxVideoFrameSize); | 51 kMaxVideoFrameSize); |
| 52 } | 52 } |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 current_stats.video_frames_dropped - previous_stats_.video_frames_dropped; | 118 current_stats.video_frames_dropped - previous_stats_.video_frames_dropped; |
| 119 | 119 |
| 120 bytes_decoded_since_last_update_ = delta_stats.video_bytes_decoded; | 120 bytes_decoded_since_last_update_ = delta_stats.video_bytes_decoded; |
| 121 previous_stats_ = current_stats; | 121 previous_stats_ = current_stats; |
| 122 | 122 |
| 123 client().statistics_cb.Run(delta_stats); | 123 client().statistics_cb.Run(delta_stats); |
| 124 } | 124 } |
| 125 | 125 |
| 126 } // namespace media | 126 } // namespace media |
| 127 } // namespace chromecast | 127 } // namespace chromecast |
| OLD | NEW |