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 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1657 << last_frame_info_.width << "x" << last_frame_info_.height | 1657 << last_frame_info_.width << "x" << last_frame_info_.height |
1658 << ", rotation=" << last_frame_info_.rotation | 1658 << ", rotation=" << last_frame_info_.rotation |
1659 << ", texture=" << last_frame_info_.is_texture; | 1659 << ", texture=" << last_frame_info_.is_texture; |
1660 } | 1660 } |
1661 | 1661 |
1662 if (stream_ == NULL) { | 1662 if (stream_ == NULL) { |
1663 // Frame input before send codecs are configured, dropping frame. | 1663 // Frame input before send codecs are configured, dropping frame. |
1664 return; | 1664 return; |
1665 } | 1665 } |
1666 | 1666 |
1667 int64_t frame_delta_ms = frame.timestamp_us() / rtc::kNumMicrosecsPerMillisec; | 1667 int64_t frame_delta_ms = frame.GetTimeStamp() / rtc::kNumNanosecsPerMillisec; |
1668 | 1668 |
| 1669 // frame->GetTimeStamp() is essentially a delta, align to webrtc time |
1669 if (!first_frame_timestamp_ms_) { | 1670 if (!first_frame_timestamp_ms_) { |
1670 first_frame_timestamp_ms_ = | 1671 first_frame_timestamp_ms_ = |
1671 rtc::Optional<int64_t>(rtc::TimeMillis() - frame_delta_ms); | 1672 rtc::Optional<int64_t>(rtc::TimeMillis() - frame_delta_ms); |
1672 } | 1673 } |
1673 | 1674 |
1674 last_frame_timestamp_ms_ = *first_frame_timestamp_ms_ + frame_delta_ms; | 1675 last_frame_timestamp_ms_ = *first_frame_timestamp_ms_ + frame_delta_ms; |
1675 | 1676 |
1676 video_frame.set_render_time_ms(last_frame_timestamp_ms_); | 1677 video_frame.set_render_time_ms(last_frame_timestamp_ms_); |
1677 | 1678 |
1678 if (pending_encoder_reconfiguration_) { | 1679 if (pending_encoder_reconfiguration_) { |
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2708 rtx_mapping[video_codecs[i].codec.id] != | 2709 rtx_mapping[video_codecs[i].codec.id] != |
2709 fec_settings.red_payload_type) { | 2710 fec_settings.red_payload_type) { |
2710 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2711 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2711 } | 2712 } |
2712 } | 2713 } |
2713 | 2714 |
2714 return video_codecs; | 2715 return video_codecs; |
2715 } | 2716 } |
2716 | 2717 |
2717 } // namespace cricket | 2718 } // namespace cricket |
OLD | NEW |