| 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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 BitrateAllocator* bitrate_allocator, | 355 BitrateAllocator* bitrate_allocator, |
| 356 SendDelayStats* send_delay_stats, | 356 SendDelayStats* send_delay_stats, |
| 357 VieRemb* remb, | 357 VieRemb* remb, |
| 358 RtcEventLog* event_log, | 358 RtcEventLog* event_log, |
| 359 const VideoSendStream::Config& config, | 359 const VideoSendStream::Config& config, |
| 360 const VideoEncoderConfig& encoder_config, | 360 const VideoEncoderConfig& encoder_config, |
| 361 const std::map<uint32_t, RtpState>& suspended_ssrcs) | 361 const std::map<uint32_t, RtpState>& suspended_ssrcs) |
| 362 : stats_proxy_(Clock::GetRealTimeClock(), | 362 : stats_proxy_(Clock::GetRealTimeClock(), |
| 363 config, | 363 config, |
| 364 encoder_config.content_type), | 364 encoder_config.content_type), |
| 365 encoded_frame_proxy_(config.post_encode_callback), | |
| 366 config_(config), | 365 config_(config), |
| 367 suspended_ssrcs_(suspended_ssrcs), | 366 suspended_ssrcs_(suspended_ssrcs), |
| 368 module_process_thread_(module_process_thread), | 367 module_process_thread_(module_process_thread), |
| 369 call_stats_(call_stats), | 368 call_stats_(call_stats), |
| 370 congestion_controller_(congestion_controller), | 369 congestion_controller_(congestion_controller), |
| 371 bitrate_allocator_(bitrate_allocator), | 370 bitrate_allocator_(bitrate_allocator), |
| 372 remb_(remb), | 371 remb_(remb), |
| 373 encoder_thread_(EncoderThreadFunction, this, "EncoderThread"), | 372 encoder_thread_(EncoderThreadFunction, this, "EncoderThread"), |
| 374 encoder_wakeup_event_(false, false), | 373 encoder_wakeup_event_(false, false), |
| 375 stop_encoder_thread_(0), | 374 stop_encoder_thread_(0), |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 } | 622 } |
| 624 | 623 |
| 625 void VideoSendStream::NormalUsage() { | 624 void VideoSendStream::NormalUsage() { |
| 626 if (config_.overuse_callback) | 625 if (config_.overuse_callback) |
| 627 config_.overuse_callback->OnLoadUpdate(LoadObserver::kUnderuse); | 626 config_.overuse_callback->OnLoadUpdate(LoadObserver::kUnderuse); |
| 628 } | 627 } |
| 629 | 628 |
| 630 int32_t VideoSendStream::Encoded(const EncodedImage& encoded_image, | 629 int32_t VideoSendStream::Encoded(const EncodedImage& encoded_image, |
| 631 const CodecSpecificInfo* codec_specific_info, | 630 const CodecSpecificInfo* codec_specific_info, |
| 632 const RTPFragmentationHeader* fragmentation) { | 631 const RTPFragmentationHeader* fragmentation) { |
| 633 // |encoded_frame_proxy_| forwards frames to |config_.post_encode_callback|; | 632 if (config_.post_encode_callback) { |
| 634 encoded_frame_proxy_.Encoded(encoded_image, codec_specific_info, | 633 config_.post_encode_callback->EncodedFrameCallback( |
| 635 fragmentation); | 634 EncodedFrame(encoded_image._buffer, encoded_image._length, |
| 635 encoded_image._frameType)); |
| 636 } |
| 637 |
| 636 protection_bitrate_calculator_.UpdateWithEncodedData(encoded_image); | 638 protection_bitrate_calculator_.UpdateWithEncodedData(encoded_image); |
| 637 int32_t return_value = payload_router_.Encoded( | 639 int32_t return_value = payload_router_.Encoded( |
| 638 encoded_image, codec_specific_info, fragmentation); | 640 encoded_image, codec_specific_info, fragmentation); |
| 639 | 641 |
| 640 if (kEnableFrameRecording) { | 642 if (kEnableFrameRecording) { |
| 641 int layer = codec_specific_info->codecType == kVideoCodecVP8 | 643 int layer = codec_specific_info->codecType == kVideoCodecVP8 |
| 642 ? codec_specific_info->codecSpecific.VP8.simulcastIdx | 644 ? codec_specific_info->codecSpecific.VP8.simulcastIdx |
| 643 : 0; | 645 : 0; |
| 644 IvfFileWriter* file_writer; | 646 IvfFileWriter* file_writer; |
| 645 { | 647 { |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 &module_nack_rate); | 823 &module_nack_rate); |
| 822 *sent_video_rate_bps += module_video_rate; | 824 *sent_video_rate_bps += module_video_rate; |
| 823 *sent_nack_rate_bps += module_nack_rate; | 825 *sent_nack_rate_bps += module_nack_rate; |
| 824 *sent_fec_rate_bps += module_fec_rate; | 826 *sent_fec_rate_bps += module_fec_rate; |
| 825 } | 827 } |
| 826 return 0; | 828 return 0; |
| 827 } | 829 } |
| 828 | 830 |
| 829 } // namespace internal | 831 } // namespace internal |
| 830 } // namespace webrtc | 832 } // namespace webrtc |
| OLD | NEW |