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) { | |
pbos-webrtc
2016/04/05 13:31:28
This isn't done on a known thread, for simulcast w
sprang_webrtc
2016/04/05 16:00:53
Ah. I'm assuming now that callbacks are at least n
| |
432 int layer = rtp_video_hdr->simulcastIdx; | |
433 if (file_writers_[layer] == nullptr) { | |
434 uint64_t instance_id = reinterpret_cast<uint64_t>(this); | |
435 std::ostringstream oss; | |
436 oss << "bitstream_" << instance_id << "_" << layer << ".ivf"; | |
437 file_writers_[layer] = | |
438 IvfFileWriter::Open(oss.str().c_str(), rtp_video_hdr->codec); | |
439 } | |
440 if (file_writers_[layer].get() != nullptr) { | |
441 bool ok = file_writers_[layer]->WriteFrame(encoded_image); | |
442 RTC_DCHECK(ok); | |
443 } | |
444 } | |
445 | |
430 return success ? 0 : -1; | 446 return success ? 0 : -1; |
431 } | 447 } |
432 | 448 |
433 void ViEEncoder::OnEncoderImplementationName( | 449 void ViEEncoder::OnEncoderImplementationName( |
434 const char* implementation_name) { | 450 const char* implementation_name) { |
435 if (stats_proxy_) | 451 if (stats_proxy_) |
436 stats_proxy_->OnEncoderImplementationName(implementation_name); | 452 stats_proxy_->OnEncoderImplementationName(implementation_name); |
437 } | 453 } |
438 | 454 |
439 int32_t ViEEncoder::SendStatistics(const uint32_t bit_rate, | 455 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, | 546 const uint32_t width, |
531 const uint32_t height) { | 547 const uint32_t height) { |
532 return vp_->SetTargetResolution(width, height, frame_rate); | 548 return vp_->SetTargetResolution(width, height, frame_rate); |
533 } | 549 } |
534 | 550 |
535 void QMVideoSettingsCallback::SetTargetFramerate(int frame_rate) { | 551 void QMVideoSettingsCallback::SetTargetFramerate(int frame_rate) { |
536 vp_->SetTargetFramerate(frame_rate); | 552 vp_->SetTargetFramerate(frame_rate); |
537 } | 553 } |
538 | 554 |
539 } // namespace webrtc | 555 } // namespace webrtc |
OLD | NEW |