| 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 420   } | 420   } | 
| 421 | 421 | 
| 422   if (stats_proxy_) | 422   if (stats_proxy_) | 
| 423     stats_proxy_->OnSendEncodedImage(encoded_image, rtp_video_hdr); | 423     stats_proxy_->OnSendEncodedImage(encoded_image, rtp_video_hdr); | 
| 424 | 424 | 
| 425   bool success = send_payload_router_->RoutePayload( | 425   bool success = send_payload_router_->RoutePayload( | 
| 426       encoded_image._frameType, payload_type, encoded_image._timeStamp, | 426       encoded_image._frameType, payload_type, encoded_image._timeStamp, | 
| 427       encoded_image.capture_time_ms_, encoded_image._buffer, | 427       encoded_image.capture_time_ms_, encoded_image._buffer, | 
| 428       encoded_image._length, fragmentation_header, rtp_video_hdr); | 428       encoded_image._length, fragmentation_header, rtp_video_hdr); | 
| 429   overuse_detector_->FrameSent(encoded_image._timeStamp); | 429   overuse_detector_->FrameSent(encoded_image._timeStamp); | 
|  | 430 | 
|  | 431   if (kEnableFrameRecording) { | 
|  | 432     int layer = rtp_video_hdr->simulcastIdx; | 
|  | 433     IvfFileWriter* file_writer; | 
|  | 434     { | 
|  | 435       rtc::CritScope lock(&data_cs_); | 
|  | 436       if (file_writers_[layer] == nullptr) { | 
|  | 437         std::ostringstream oss; | 
|  | 438         oss << "send_bitstream_ssrc"; | 
|  | 439         for (uint32_t ssrc : ssrcs_) | 
|  | 440           oss << "_" << ssrc; | 
|  | 441         oss << "_layer" << layer << ".ivf"; | 
|  | 442         file_writers_[layer] = | 
|  | 443             IvfFileWriter::Open(oss.str(), rtp_video_hdr->codec); | 
|  | 444       } | 
|  | 445       file_writer = file_writers_[layer].get(); | 
|  | 446     } | 
|  | 447     if (file_writer) { | 
|  | 448       bool ok = file_writer->WriteFrame(encoded_image); | 
|  | 449       RTC_DCHECK(ok); | 
|  | 450     } | 
|  | 451   } | 
|  | 452 | 
| 430   return success ? 0 : -1; | 453   return success ? 0 : -1; | 
| 431 } | 454 } | 
| 432 | 455 | 
| 433 void ViEEncoder::OnEncoderImplementationName( | 456 void ViEEncoder::OnEncoderImplementationName( | 
| 434     const char* implementation_name) { | 457     const char* implementation_name) { | 
| 435   if (stats_proxy_) | 458   if (stats_proxy_) | 
| 436     stats_proxy_->OnEncoderImplementationName(implementation_name); | 459     stats_proxy_->OnEncoderImplementationName(implementation_name); | 
| 437 } | 460 } | 
| 438 | 461 | 
| 439 int32_t ViEEncoder::SendStatistics(const uint32_t bit_rate, | 462 int32_t ViEEncoder::SendStatistics(const uint32_t bit_rate, | 
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 530     const uint32_t width, | 553     const uint32_t width, | 
| 531     const uint32_t height) { | 554     const uint32_t height) { | 
| 532   return vp_->SetTargetResolution(width, height, frame_rate); | 555   return vp_->SetTargetResolution(width, height, frame_rate); | 
| 533 } | 556 } | 
| 534 | 557 | 
| 535 void QMVideoSettingsCallback::SetTargetFramerate(int frame_rate) { | 558 void QMVideoSettingsCallback::SetTargetFramerate(int frame_rate) { | 
| 536   vp_->SetTargetFramerate(frame_rate); | 559   vp_->SetTargetFramerate(frame_rate); | 
| 537 } | 560 } | 
| 538 | 561 | 
| 539 }  // namespace webrtc | 562 }  // namespace webrtc | 
| OLD | NEW | 
|---|