OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 2490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2501 int64_t elapsed_time_ms = rtp_time_elapsed_since_first_frame / | 2501 int64_t elapsed_time_ms = rtp_time_elapsed_since_first_frame / |
2502 (cricket::kVideoCodecClockrate / 1000); | 2502 (cricket::kVideoCodecClockrate / 1000); |
2503 if (frame.ntp_time_ms() > 0) | 2503 if (frame.ntp_time_ms() > 0) |
2504 estimated_remote_start_ntp_time_ms_ = frame.ntp_time_ms() - elapsed_time_ms; | 2504 estimated_remote_start_ntp_time_ms_ = frame.ntp_time_ms() - elapsed_time_ms; |
2505 | 2505 |
2506 if (sink_ == NULL) { | 2506 if (sink_ == NULL) { |
2507 LOG(LS_WARNING) << "VideoReceiveStream not connected to a VideoSink."; | 2507 LOG(LS_WARNING) << "VideoReceiveStream not connected to a VideoSink."; |
2508 return; | 2508 return; |
2509 } | 2509 } |
2510 | 2510 |
2511 WebRtcVideoFrame render_frame( | 2511 sink_->OnFrame(frame); |
2512 frame.video_frame_buffer(), frame.rotation(), | |
2513 frame.render_time_ms() * rtc::kNumNanosecsPerMicrosec, frame.timestamp()); | |
2514 sink_->OnFrame(render_frame); | |
2515 } | 2512 } |
2516 | 2513 |
2517 bool WebRtcVideoChannel2::WebRtcVideoReceiveStream::IsDefaultStream() const { | 2514 bool WebRtcVideoChannel2::WebRtcVideoReceiveStream::IsDefaultStream() const { |
2518 return default_stream_; | 2515 return default_stream_; |
2519 } | 2516 } |
2520 | 2517 |
2521 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::SetSink( | 2518 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::SetSink( |
2522 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) { | 2519 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) { |
2523 rtc::CritScope crit(&sink_lock_); | 2520 rtc::CritScope crit(&sink_lock_); |
2524 sink_ = sink; | 2521 sink_ = sink; |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2694 rtx_mapping[video_codecs[i].codec.id] != | 2691 rtx_mapping[video_codecs[i].codec.id] != |
2695 fec_settings.red_payload_type) { | 2692 fec_settings.red_payload_type) { |
2696 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2693 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2697 } | 2694 } |
2698 } | 2695 } |
2699 | 2696 |
2700 return video_codecs; | 2697 return video_codecs; |
2701 } | 2698 } |
2702 | 2699 |
2703 } // namespace cricket | 2700 } // namespace cricket |
OLD | NEW |