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