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

Unified Diff: media/cast/cast_defines.h

Issue 281453003: Cast: Simplify code path for RTCP sender report (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/cast.gyp ('k') | media/cast/rtcp/rtcp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/cast_defines.h
diff --git a/media/cast/cast_defines.h b/media/cast/cast_defines.h
index b0f9370186e9e60e2cd0a7dc0f8032d603ea4e4a..7f68d67d56c761667255005ff225b37c01f7bc48 100644
--- a/media/cast/cast_defines.h
+++ b/media/cast/cast_defines.h
@@ -176,55 +176,6 @@ inline uint32 GetVideoRtpTimestamp(const base::TimeTicks& time_ticks) {
return static_cast<uint32>(recorded_delta.InMilliseconds() * 90);
}
-class RtpSenderStatistics {
- public:
- explicit RtpSenderStatistics(int frequency)
- : frequency_(frequency),
- rtp_timestamp_(0) {
- memset(&sender_info_, 0, sizeof(sender_info_));
- }
-
- ~RtpSenderStatistics() {}
-
- void UpdateInfo(const base::TimeTicks& now) {
- // Update RTP timestamp and return last stored statistics.
- uint32 ntp_seconds = 0;
- uint32 ntp_fraction = 0;
- uint32 rtp_timestamp = 0;
- if (rtp_timestamp_ > 0) {
- base::TimeDelta time_since_last_send = now - time_sent_;
- rtp_timestamp = rtp_timestamp_ + time_since_last_send.InMilliseconds() *
- (frequency_ / 1000);
- // Update NTP time to current time.
- ConvertTimeTicksToNtp(now, &ntp_seconds, &ntp_fraction);
- }
- // Populate sender info.
- sender_info_.rtp_timestamp = rtp_timestamp;
- sender_info_.ntp_seconds = ntp_seconds;
- sender_info_.ntp_fraction = ntp_fraction;
- }
-
- transport::RtcpSenderInfo sender_info() const {
- return sender_info_;
- }
-
- void Store(transport::RtcpSenderInfo sender_info,
- base::TimeTicks time_sent,
- uint32 rtp_timestamp) {
- sender_info_ = sender_info;
- time_sent_ = time_sent;
- rtp_timestamp_ = rtp_timestamp;
-}
-
- private:
- int frequency_;
- transport::RtcpSenderInfo sender_info_;
- base::TimeTicks time_sent_;
- uint32 rtp_timestamp_;
-
- DISALLOW_COPY_AND_ASSIGN(RtpSenderStatistics);
-};
-
} // namespace cast
} // namespace media
« no previous file with comments | « media/cast/cast.gyp ('k') | media/cast/rtcp/rtcp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698