| 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 #include "webrtc/video/video_send_stream.h" | 10 #include "webrtc/video/video_send_stream.h" |
| (...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1025 EncodedImageCallback::Result VideoSendStreamImpl::OnEncodedImage( | 1025 EncodedImageCallback::Result VideoSendStreamImpl::OnEncodedImage( |
| 1026 const EncodedImage& encoded_image, | 1026 const EncodedImage& encoded_image, |
| 1027 const CodecSpecificInfo* codec_specific_info, | 1027 const CodecSpecificInfo* codec_specific_info, |
| 1028 const RTPFragmentationHeader* fragmentation) { | 1028 const RTPFragmentationHeader* fragmentation) { |
| 1029 // Encoded is called on whatever thread the real encoder implementation run | 1029 // Encoded is called on whatever thread the real encoder implementation run |
| 1030 // on. In the case of hardware encoders, there might be several encoders | 1030 // on. In the case of hardware encoders, there might be several encoders |
| 1031 // running in parallel on different threads. | 1031 // running in parallel on different threads. |
| 1032 if (config_->post_encode_callback) { | 1032 if (config_->post_encode_callback) { |
| 1033 config_->post_encode_callback->EncodedFrameCallback( | 1033 config_->post_encode_callback->EncodedFrameCallback( |
| 1034 EncodedFrame(encoded_image._buffer, encoded_image._length, | 1034 EncodedFrame(encoded_image._buffer, encoded_image._length, |
| 1035 encoded_image._frameType, encoded_image._encodedWidth, | 1035 encoded_image._frameType)); |
| 1036 encoded_image._encodedHeight, encoded_image._timeStamp)); | |
| 1037 } | 1036 } |
| 1038 { | 1037 { |
| 1039 rtc::CritScope lock(&encoder_activity_crit_sect_); | 1038 rtc::CritScope lock(&encoder_activity_crit_sect_); |
| 1040 if (check_encoder_activity_task_) | 1039 if (check_encoder_activity_task_) |
| 1041 check_encoder_activity_task_->UpdateEncoderActivity(); | 1040 check_encoder_activity_task_->UpdateEncoderActivity(); |
| 1042 } | 1041 } |
| 1043 | 1042 |
| 1044 protection_bitrate_calculator_.UpdateWithEncodedData(encoded_image); | 1043 protection_bitrate_calculator_.UpdateWithEncodedData(encoded_image); |
| 1045 EncodedImageCallback::Result result = payload_router_.OnEncodedImage( | 1044 EncodedImageCallback::Result result = payload_router_.OnEncodedImage( |
| 1046 encoded_image, codec_specific_info, fragmentation); | 1045 encoded_image, codec_specific_info, fragmentation); |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1335 std::min(config_->rtp.max_packet_size, | 1334 std::min(config_->rtp.max_packet_size, |
| 1336 kPathMTU - transport_overhead_bytes_per_packet_); | 1335 kPathMTU - transport_overhead_bytes_per_packet_); |
| 1337 | 1336 |
| 1338 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 1337 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
| 1339 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); | 1338 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); |
| 1340 } | 1339 } |
| 1341 } | 1340 } |
| 1342 | 1341 |
| 1343 } // namespace internal | 1342 } // namespace internal |
| 1344 } // namespace webrtc | 1343 } // namespace webrtc |
| OLD | NEW |