| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/cast/sender/size_adaptable_video_encoder_base.h" | 5 #include "media/cast/sender/size_adaptable_video_encoder_base.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "media/base/video_frame.h" | 9 #include "media/base/video_frame.h" |
| 10 | 10 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 status == STATUS_INITIALIZED) { | 149 status == STATUS_INITIALIZED) { |
| 150 // Begin using the replacement encoder. | 150 // Begin using the replacement encoder. |
| 151 frames_in_encoder_ = 0; | 151 frames_in_encoder_ = 0; |
| 152 OnEncoderReplaced(encoder_.get()); | 152 OnEncoderReplaced(encoder_.get()); |
| 153 } | 153 } |
| 154 status_change_cb_.Run(status); | 154 status_change_cb_.Run(status); |
| 155 } | 155 } |
| 156 | 156 |
| 157 void SizeAdaptableVideoEncoderBase::OnEncodedVideoFrame( | 157 void SizeAdaptableVideoEncoderBase::OnEncodedVideoFrame( |
| 158 const FrameEncodedCallback& frame_encoded_callback, | 158 const FrameEncodedCallback& frame_encoded_callback, |
| 159 scoped_ptr<SenderEncodedFrame> encoded_frame) { | 159 scoped_ptr<EncodedFrame> encoded_frame) { |
| 160 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); | 160 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); |
| 161 --frames_in_encoder_; | 161 --frames_in_encoder_; |
| 162 DCHECK_GE(frames_in_encoder_, 0); | 162 DCHECK_GE(frames_in_encoder_, 0); |
| 163 last_frame_id_ = encoded_frame->frame_id; | 163 last_frame_id_ = encoded_frame->frame_id; |
| 164 frame_encoded_callback.Run(encoded_frame.Pass()); | 164 frame_encoded_callback.Run(encoded_frame.Pass()); |
| 165 } | 165 } |
| 166 | 166 |
| 167 } // namespace cast | 167 } // namespace cast |
| 168 } // namespace media | 168 } // namespace media |
| OLD | NEW |