| Index: webrtc/video/payload_router.cc
|
| diff --git a/webrtc/video/payload_router.cc b/webrtc/video/payload_router.cc
|
| index 5bcf70532fe819fc338947ee65a85b71caed47f9..798325a2602e09887f41cc37c64a5debe8fe6dbf 100644
|
| --- a/webrtc/video/payload_router.cc
|
| +++ b/webrtc/video/payload_router.cc
|
| @@ -137,16 +137,15 @@
|
| }
|
| }
|
|
|
| -EncodedImageCallback::Result PayloadRouter::OnEncodedImage(
|
| - const EncodedImage& encoded_image,
|
| - const CodecSpecificInfo* codec_specific_info,
|
| - const RTPFragmentationHeader* fragmentation) {
|
| +int32_t PayloadRouter::Encoded(const EncodedImage& encoded_image,
|
| + const CodecSpecificInfo* codec_specific_info,
|
| + const RTPFragmentationHeader* fragmentation) {
|
| rtc::CritScope lock(&crit_);
|
| RTC_DCHECK(!rtp_modules_.empty());
|
| if (!active_ || num_sending_modules_ == 0)
|
| - return Result(Result::ERROR_SEND_FAILED);
|
| + return -1;
|
|
|
| - int stream_index = 0;
|
| + int stream_idx = 0;
|
|
|
| RTPVideoHeader rtp_video_header;
|
| memset(&rtp_video_header, 0, sizeof(RTPVideoHeader));
|
| @@ -159,19 +158,13 @@
|
| // The simulcast index might actually be larger than the number of modules
|
| // in case the encoder was processing a frame during a codec reconfig.
|
| if (rtp_video_header.simulcastIdx >= num_sending_modules_)
|
| - return Result(Result::ERROR_SEND_FAILED);
|
| - stream_index = rtp_video_header.simulcastIdx;
|
| + return -1;
|
| + stream_idx = rtp_video_header.simulcastIdx;
|
|
|
| - uint32_t frame_id;
|
| - int send_result = rtp_modules_[stream_index]->SendOutgoingData(
|
| + return rtp_modules_[stream_idx]->SendOutgoingData(
|
| encoded_image._frameType, payload_type_, encoded_image._timeStamp,
|
| encoded_image.capture_time_ms_, encoded_image._buffer,
|
| - encoded_image._length, fragmentation, &rtp_video_header, &frame_id);
|
| -
|
| - if (send_result < 0)
|
| - return Result(Result::ERROR_SEND_FAILED);
|
| -
|
| - return Result(Result::OK, frame_id);
|
| + encoded_image._length, fragmentation, &rtp_video_header);
|
| }
|
|
|
| size_t PayloadRouter::MaxPayloadLength() const {
|
|
|