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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 vp_->EnableTemporalDecimation(true); | 440 vp_->EnableTemporalDecimation(true); |
441 vcm_->EnableFrameDropper(true); | 441 vcm_->EnableFrameDropper(true); |
442 } | 442 } |
443 } | 443 } |
444 | 444 |
445 void ViEEncoder::OnSetRates(uint32_t bitrate_bps, int framerate) { | 445 void ViEEncoder::OnSetRates(uint32_t bitrate_bps, int framerate) { |
446 if (stats_proxy_) | 446 if (stats_proxy_) |
447 stats_proxy_->OnSetRates(bitrate_bps, framerate); | 447 stats_proxy_->OnSetRates(bitrate_bps, framerate); |
448 } | 448 } |
449 | 449 |
450 int32_t ViEEncoder::SendData( | 450 int32_t ViEEncoder::SendData(const uint8_t payload_type, |
451 const uint8_t payload_type, | 451 const EncodedImage& encoded_image, |
452 const EncodedImage& encoded_image, | 452 const RTPFragmentationHeader* fragmentation_header, |
453 const webrtc::RTPFragmentationHeader& fragmentation_header, | 453 const RTPVideoHeader* rtp_video_hdr) { |
454 const RTPVideoHeader* rtp_video_hdr) { | |
455 RTC_DCHECK(send_payload_router_ != NULL); | 454 RTC_DCHECK(send_payload_router_ != NULL); |
456 | 455 |
457 { | 456 { |
458 rtc::CritScope lock(&data_cs_); | 457 rtc::CritScope lock(&data_cs_); |
459 time_of_last_frame_activity_ms_ = TickTime::MillisecondTimestamp(); | 458 time_of_last_frame_activity_ms_ = TickTime::MillisecondTimestamp(); |
460 } | 459 } |
461 | 460 |
462 if (stats_proxy_ != NULL) | 461 if (stats_proxy_ != NULL) |
463 stats_proxy_->OnSendEncodedImage(encoded_image, rtp_video_hdr); | 462 stats_proxy_->OnSendEncodedImage(encoded_image, rtp_video_hdr); |
464 | 463 |
465 return send_payload_router_->RoutePayload( | 464 return send_payload_router_->RoutePayload( |
466 encoded_image._frameType, payload_type, encoded_image._timeStamp, | 465 encoded_image._frameType, payload_type, encoded_image._timeStamp, |
467 encoded_image.capture_time_ms_, encoded_image._buffer, | 466 encoded_image.capture_time_ms_, encoded_image._buffer, |
468 encoded_image._length, &fragmentation_header, rtp_video_hdr) | 467 encoded_image._length, fragmentation_header, rtp_video_hdr) |
469 ? 0 | 468 ? 0 |
470 : -1; | 469 : -1; |
471 } | 470 } |
472 | 471 |
473 void ViEEncoder::OnEncoderImplementationName( | 472 void ViEEncoder::OnEncoderImplementationName( |
474 const char* implementation_name) { | 473 const char* implementation_name) { |
475 if (stats_proxy_) | 474 if (stats_proxy_) |
476 stats_proxy_->OnEncoderImplementationName(implementation_name); | 475 stats_proxy_->OnEncoderImplementationName(implementation_name); |
477 } | 476 } |
478 | 477 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 const uint32_t width, | 622 const uint32_t width, |
624 const uint32_t height) { | 623 const uint32_t height) { |
625 return vp_->SetTargetResolution(width, height, frame_rate); | 624 return vp_->SetTargetResolution(width, height, frame_rate); |
626 } | 625 } |
627 | 626 |
628 void QMVideoSettingsCallback::SetTargetFramerate(int frame_rate) { | 627 void QMVideoSettingsCallback::SetTargetFramerate(int frame_rate) { |
629 vp_->SetTargetFramerate(frame_rate); | 628 vp_->SetTargetFramerate(frame_rate); |
630 } | 629 } |
631 | 630 |
632 } // namespace webrtc | 631 } // namespace webrtc |
OLD | NEW |