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

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

Issue 2305623002: Delete cricket::VideoFrame::GetTimeStamp. (Closed)
Patch Set: Created 4 years, 3 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
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 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.GetTimeStamp() / rtc::kNumNanosecsPerMillisec; 1667 int64_t frame_delta_ms = frame.timestamp_us() / rtc::kNumMicrosecsPerMillisec;
1668 1668
1669 // frame->GetTimeStamp() is essentially a delta, align to webrtc time
1670 if (!first_frame_timestamp_ms_) { 1669 if (!first_frame_timestamp_ms_) {
1671 first_frame_timestamp_ms_ = 1670 first_frame_timestamp_ms_ =
1672 rtc::Optional<int64_t>(rtc::TimeMillis() - frame_delta_ms); 1671 rtc::Optional<int64_t>(rtc::TimeMillis() - frame_delta_ms);
1673 } 1672 }
1674 1673
1675 last_frame_timestamp_ms_ = *first_frame_timestamp_ms_ + frame_delta_ms; 1674 last_frame_timestamp_ms_ = *first_frame_timestamp_ms_ + frame_delta_ms;
1676 1675
1677 video_frame.set_render_time_ms(last_frame_timestamp_ms_); 1676 video_frame.set_render_time_ms(last_frame_timestamp_ms_);
1678 1677
1679 if (pending_encoder_reconfiguration_) { 1678 if (pending_encoder_reconfiguration_) {
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
2709 rtx_mapping[video_codecs[i].codec.id] != 2708 rtx_mapping[video_codecs[i].codec.id] !=
2710 fec_settings.red_payload_type) { 2709 fec_settings.red_payload_type) {
2711 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2710 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2712 } 2711 }
2713 } 2712 }
2714 2713
2715 return video_codecs; 2714 return video_codecs;
2716 } 2715 }
2717 2716
2718 } // namespace cricket 2717 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698