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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 void ViEEncoder::OnSetRates(uint32_t bitrate_bps, int framerate) { | 196 void ViEEncoder::OnSetRates(uint32_t bitrate_bps, int framerate) { |
197 if (stats_proxy_) | 197 if (stats_proxy_) |
198 stats_proxy_->OnSetRates(bitrate_bps, framerate); | 198 stats_proxy_->OnSetRates(bitrate_bps, framerate); |
199 } | 199 } |
200 | 200 |
201 int32_t ViEEncoder::Encoded(const EncodedImage& encoded_image, | 201 EncodedImageCallback::Result ViEEncoder::OnEncodedImage( |
202 const CodecSpecificInfo* codec_specific_info, | 202 const EncodedImage& encoded_image, |
203 const RTPFragmentationHeader* fragmentation) { | 203 const CodecSpecificInfo* codec_specific_info, |
| 204 const RTPFragmentationHeader* fragmentation) { |
204 { | 205 { |
205 rtc::CritScope lock(&data_cs_); | 206 rtc::CritScope lock(&data_cs_); |
206 time_of_last_frame_activity_ms_ = rtc::TimeMillis(); | 207 time_of_last_frame_activity_ms_ = rtc::TimeMillis(); |
207 } | 208 } |
208 if (stats_proxy_) { | 209 if (stats_proxy_) { |
209 stats_proxy_->OnSendEncodedImage(encoded_image, codec_specific_info); | 210 stats_proxy_->OnSendEncodedImage(encoded_image, codec_specific_info); |
210 } | 211 } |
211 | 212 |
212 int success = | 213 EncodedImageCallback::Result result = |
213 sink_->Encoded(encoded_image, codec_specific_info, fragmentation); | 214 sink_->OnEncodedImage(encoded_image, codec_specific_info, fragmentation); |
214 | 215 |
215 overuse_detector_->FrameSent(encoded_image._timeStamp); | 216 overuse_detector_->FrameSent(encoded_image._timeStamp); |
216 return success; | 217 return result; |
217 } | 218 } |
218 | 219 |
219 void ViEEncoder::SendStatistics(uint32_t bit_rate, | 220 void ViEEncoder::SendStatistics(uint32_t bit_rate, |
220 uint32_t frame_rate, | 221 uint32_t frame_rate, |
221 const std::string& encoder_name) { | 222 const std::string& encoder_name) { |
222 if (stats_proxy_) | 223 if (stats_proxy_) |
223 stats_proxy_->OnEncoderStatsUpdate(frame_rate, bit_rate, encoder_name); | 224 stats_proxy_->OnEncoderStatsUpdate(frame_rate, bit_rate, encoder_name); |
224 } | 225 } |
225 | 226 |
226 void ViEEncoder::OnReceivedSLI(uint8_t picture_id) { | 227 void ViEEncoder::OnReceivedSLI(uint8_t picture_id) { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 } | 270 } |
270 | 271 |
271 if (stats_proxy_ && video_suspension_changed) { | 272 if (stats_proxy_ && video_suspension_changed) { |
272 LOG(LS_INFO) << "Video suspend state changed to: " | 273 LOG(LS_INFO) << "Video suspend state changed to: " |
273 << (video_is_suspended ? "suspended" : "not suspended"); | 274 << (video_is_suspended ? "suspended" : "not suspended"); |
274 stats_proxy_->OnSuspendChange(video_is_suspended); | 275 stats_proxy_->OnSuspendChange(video_is_suspended); |
275 } | 276 } |
276 } | 277 } |
277 | 278 |
278 } // namespace webrtc | 279 } // namespace webrtc |
OLD | NEW |