| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 const int32_t ret = Decode(*frame); | 288 const int32_t ret = Decode(*frame); |
| 289 _receiver.ReleaseFrame(frame); | 289 _receiver.ReleaseFrame(frame); |
| 290 return ret; | 290 return ret; |
| 291 } | 291 } |
| 292 | 292 |
| 293 // Used for the WebRTC-NewVideoJitterBuffer experiment. | 293 // Used for the WebRTC-NewVideoJitterBuffer experiment. |
| 294 // TODO(philipel): Clean up among the Decode functions as we replace | 294 // TODO(philipel): Clean up among the Decode functions as we replace |
| 295 // VCMEncodedFrame with FrameObject. | 295 // VCMEncodedFrame with FrameObject. |
| 296 int32_t VideoReceiver::Decode(const webrtc::VCMEncodedFrame* frame) { | 296 int32_t VideoReceiver::Decode(const webrtc::VCMEncodedFrame* frame) { |
| 297 rtc::CritScope lock(&receive_crit_); | 297 rtc::CritScope lock(&receive_crit_); |
| 298 if (pre_decode_image_callback_) { |
| 299 EncodedImage encoded_image(frame->EncodedImage()); |
| 300 int qp = -1; |
| 301 if (qp_parser_.GetQp(*frame, &qp)) { |
| 302 encoded_image.qp_ = qp; |
| 303 } |
| 304 pre_decode_image_callback_->OnEncodedImage(encoded_image, |
| 305 frame->CodecSpecific(), nullptr); |
| 306 } |
| 298 return Decode(*frame); | 307 return Decode(*frame); |
| 299 } | 308 } |
| 300 | 309 |
| 301 int32_t VideoReceiver::RequestSliceLossIndication( | 310 int32_t VideoReceiver::RequestSliceLossIndication( |
| 302 const uint64_t pictureID) const { | 311 const uint64_t pictureID) const { |
| 303 TRACE_EVENT1("webrtc", "RequestSLI", "picture_id", pictureID); | 312 TRACE_EVENT1("webrtc", "RequestSLI", "picture_id", pictureID); |
| 304 rtc::CritScope cs(&process_crit_); | 313 rtc::CritScope cs(&process_crit_); |
| 305 if (_frameTypeCallback != nullptr) { | 314 if (_frameTypeCallback != nullptr) { |
| 306 const int32_t ret = | 315 const int32_t ret = |
| 307 _frameTypeCallback->SliceLossIndicationRequest(pictureID); | 316 _frameTypeCallback->SliceLossIndicationRequest(pictureID); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 _receiver.SetNackSettings(max_nack_list_size, max_packet_age_to_nack, | 513 _receiver.SetNackSettings(max_nack_list_size, max_packet_age_to_nack, |
| 505 max_incomplete_time_ms); | 514 max_incomplete_time_ms); |
| 506 } | 515 } |
| 507 | 516 |
| 508 int VideoReceiver::SetMinReceiverDelay(int desired_delay_ms) { | 517 int VideoReceiver::SetMinReceiverDelay(int desired_delay_ms) { |
| 509 return _receiver.SetMinReceiverDelay(desired_delay_ms); | 518 return _receiver.SetMinReceiverDelay(desired_delay_ms); |
| 510 } | 519 } |
| 511 | 520 |
| 512 } // namespace vcm | 521 } // namespace vcm |
| 513 } // namespace webrtc | 522 } // namespace webrtc |
| OLD | NEW |