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 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1584 if (stream_ == NULL) { | 1584 if (stream_ == NULL) { |
1585 // Frame input before send codecs are configured, dropping frame. | 1585 // Frame input before send codecs are configured, dropping frame. |
1586 return; | 1586 return; |
1587 } | 1587 } |
1588 | 1588 |
1589 int64_t frame_delta_ms = frame.GetTimeStamp() / rtc::kNumNanosecsPerMillisec; | 1589 int64_t frame_delta_ms = frame.GetTimeStamp() / rtc::kNumNanosecsPerMillisec; |
1590 | 1590 |
1591 // frame->GetTimeStamp() is essentially a delta, align to webrtc time | 1591 // frame->GetTimeStamp() is essentially a delta, align to webrtc time |
1592 if (!first_frame_timestamp_ms_) { | 1592 if (!first_frame_timestamp_ms_) { |
1593 first_frame_timestamp_ms_ = | 1593 first_frame_timestamp_ms_ = |
1594 rtc::Optional<int64_t>(rtc::Time() - frame_delta_ms); | 1594 rtc::Optional<int64_t>(rtc::TimeMillis() - frame_delta_ms); |
1595 } | 1595 } |
1596 | 1596 |
1597 last_frame_timestamp_ms_ = *first_frame_timestamp_ms_ + frame_delta_ms; | 1597 last_frame_timestamp_ms_ = *first_frame_timestamp_ms_ + frame_delta_ms; |
1598 | 1598 |
1599 video_frame.set_render_time_ms(last_frame_timestamp_ms_); | 1599 video_frame.set_render_time_ms(last_frame_timestamp_ms_); |
1600 // Reconfigure codec if necessary. | 1600 // Reconfigure codec if necessary. |
1601 SetDimensions(video_frame.width(), video_frame.height()); | 1601 SetDimensions(video_frame.width(), video_frame.height()); |
1602 last_rotation_ = video_frame.rotation(); | 1602 last_rotation_ = video_frame.rotation(); |
1603 | 1603 |
1604 // Not sending, abort after reconfiguration. Reconfiguration should still | 1604 // Not sending, abort after reconfiguration. Reconfiguration should still |
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2586 rtx_mapping[video_codecs[i].codec.id] != | 2586 rtx_mapping[video_codecs[i].codec.id] != |
2587 fec_settings.red_payload_type) { | 2587 fec_settings.red_payload_type) { |
2588 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2588 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2589 } | 2589 } |
2590 } | 2590 } |
2591 | 2591 |
2592 return video_codecs; | 2592 return video_codecs; |
2593 } | 2593 } |
2594 | 2594 |
2595 } // namespace cricket | 2595 } // namespace cricket |
OLD | NEW |