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

Side by Side Diff: webrtc/modules/rtp_rtcp/interface/remote_ntp_time_estimator.h

Issue 1414793020: Remove interface directories kept to avoid breaking downstream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 1 month 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
(Empty)
1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_REMOTE_NTP_TIME_ESTIMATOR_H_
12 #define WEBRTC_MODULES_RTP_RTCP_INCLUDE_REMOTE_NTP_TIME_ESTIMATOR_H_
13
14 #pragma message("WARNING: rtp_rtcp/interface is DEPRECATED; use include dir.")
15
16 #include "webrtc/base/scoped_ptr.h"
17 #include "webrtc/system_wrappers/include/rtp_to_ntp.h"
18
19 namespace webrtc {
20
21 class Clock;
22 class TimestampExtrapolator;
23
24 // RemoteNtpTimeEstimator can be used to estimate a given RTP timestamp's NTP
25 // time in local timebase.
26 // Note that it needs to be trained with at least 2 RTCP SR (by calling
27 // |UpdateRtcpTimestamp|) before it can be used.
28 class RemoteNtpTimeEstimator {
29 public:
30 explicit RemoteNtpTimeEstimator(Clock* clock);
31
32 ~RemoteNtpTimeEstimator();
33
34 // Updates the estimator with round trip time |rtt|, NTP seconds |ntp_secs|,
35 // NTP fraction |ntp_frac| and RTP timestamp |rtcp_timestamp|.
36 bool UpdateRtcpTimestamp(int64_t rtt, uint32_t ntp_secs, uint32_t ntp_frac,
37 uint32_t rtp_timestamp);
38
39 // Estimates the NTP timestamp in local timebase from |rtp_timestamp|.
40 // Returns the NTP timestamp in ms when success. -1 if failed.
41 int64_t Estimate(uint32_t rtp_timestamp);
42
43 private:
44 Clock* clock_;
45 rtc::scoped_ptr<TimestampExtrapolator> ts_extrapolator_;
46 RtcpList rtcp_list_;
47 int64_t last_timing_log_ms_;
48 RTC_DISALLOW_COPY_AND_ASSIGN(RemoteNtpTimeEstimator);
49 };
50
51 } // namespace webrtc
52
53 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_REMOTE_NTP_TIME_ESTIMATOR_H_
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/interface/receive_statistics.h ('k') | webrtc/modules/rtp_rtcp/interface/rtp_cvo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698