Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2.cc

Issue 1835053002: Change default timestamp to 64 bits in all webrtc directories. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Add TODO for timestamp. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/media/engine/webrtcvideocapturer.cc ('k') | webrtc/p2p/base/port.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvideocapturer.cc ('k') | webrtc/p2p/base/port.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698