| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 186 |
| 187 void ViEEncoder::SendKeyFrame() { | 187 void ViEEncoder::SendKeyFrame() { |
| 188 video_sender_.IntraFrameRequest(0); | 188 video_sender_.IntraFrameRequest(0); |
| 189 } | 189 } |
| 190 | 190 |
| 191 int64_t ViEEncoder::time_of_last_frame_activity_ms() { | 191 int64_t ViEEncoder::time_of_last_frame_activity_ms() { |
| 192 rtc::CritScope lock(&data_cs_); | 192 rtc::CritScope lock(&data_cs_); |
| 193 return time_of_last_frame_activity_ms_; | 193 return time_of_last_frame_activity_ms_; |
| 194 } | 194 } |
| 195 | 195 |
| 196 EncodedImageCallback::Result ViEEncoder::OnEncodedImage( | 196 int32_t ViEEncoder::Encoded(const EncodedImage& encoded_image, |
| 197 const EncodedImage& encoded_image, | 197 const CodecSpecificInfo* codec_specific_info, |
| 198 const CodecSpecificInfo* codec_specific_info, | 198 const RTPFragmentationHeader* fragmentation) { |
| 199 const RTPFragmentationHeader* fragmentation) { | |
| 200 { | 199 { |
| 201 rtc::CritScope lock(&data_cs_); | 200 rtc::CritScope lock(&data_cs_); |
| 202 time_of_last_frame_activity_ms_ = rtc::TimeMillis(); | 201 time_of_last_frame_activity_ms_ = rtc::TimeMillis(); |
| 203 } | 202 } |
| 204 if (stats_proxy_) { | 203 if (stats_proxy_) { |
| 205 stats_proxy_->OnSendEncodedImage(encoded_image, codec_specific_info); | 204 stats_proxy_->OnSendEncodedImage(encoded_image, codec_specific_info); |
| 206 } | 205 } |
| 207 | 206 |
| 208 EncodedImageCallback::Result result = | 207 int success = |
| 209 sink_->OnEncodedImage(encoded_image, codec_specific_info, fragmentation); | 208 sink_->Encoded(encoded_image, codec_specific_info, fragmentation); |
| 210 | 209 |
| 211 overuse_detector_->FrameSent(encoded_image._timeStamp); | 210 overuse_detector_->FrameSent(encoded_image._timeStamp); |
| 212 return result; | 211 return success; |
| 213 } | 212 } |
| 214 | 213 |
| 215 void ViEEncoder::SendStatistics(uint32_t bit_rate, | 214 void ViEEncoder::SendStatistics(uint32_t bit_rate, |
| 216 uint32_t frame_rate, | 215 uint32_t frame_rate, |
| 217 const std::string& encoder_name) { | 216 const std::string& encoder_name) { |
| 218 if (stats_proxy_) | 217 if (stats_proxy_) |
| 219 stats_proxy_->OnEncoderStatsUpdate(frame_rate, bit_rate, encoder_name); | 218 stats_proxy_->OnEncoderStatsUpdate(frame_rate, bit_rate, encoder_name); |
| 220 } | 219 } |
| 221 | 220 |
| 222 void ViEEncoder::OnReceivedSLI(uint8_t picture_id) { | 221 void ViEEncoder::OnReceivedSLI(uint8_t picture_id) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 } | 264 } |
| 266 | 265 |
| 267 if (stats_proxy_ && video_suspension_changed) { | 266 if (stats_proxy_ && video_suspension_changed) { |
| 268 LOG(LS_INFO) << "Video suspend state changed to: " | 267 LOG(LS_INFO) << "Video suspend state changed to: " |
| 269 << (video_is_suspended ? "suspended" : "not suspended"); | 268 << (video_is_suspended ? "suspended" : "not suspended"); |
| 270 stats_proxy_->OnSuspendChange(video_is_suspended); | 269 stats_proxy_->OnSuspendChange(video_is_suspended); |
| 271 } | 270 } |
| 272 } | 271 } |
| 273 | 272 |
| 274 } // namespace webrtc | 273 } // namespace webrtc |
| OLD | NEW |