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

Side by Side Diff: media/cast/net/cast_net_defines.h

Issue 102413014: Cast:Splitting rtcp sender (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_CAST_NET_CAST_NET_DEFINES_H_ 5 #ifndef MEDIA_CAST_NET_CAST_NET_DEFINES_H_
6 #define MEDIA_CAST_NET_CAST_NET_DEFINES_H_ 6 #define MEDIA_CAST_NET_CAST_NET_DEFINES_H_
7 7
8 #include <list>
8 #include "base/basictypes.h" 9 #include "base/basictypes.h"
9 10
10 namespace media { 11 namespace media {
11 namespace cast { 12 namespace cast {
12 13
14 // Rtcp defines.
15
16 // Log messages form sender to receiver.
17 enum RtcpSenderFrameStatus {
18 kRtcpSenderFrameStatusUnknown = 0,
19 kRtcpSenderFrameStatusDroppedByEncoder = 1,
20 kRtcpSenderFrameStatusDroppedByFlowControl = 2,
21 kRtcpSenderFrameStatusSentToNetwork = 3,
22 };
23
24 struct RtcpSenderFrameLogMessage {
25 RtcpSenderFrameStatus frame_status;
26 uint32 rtp_timestamp;
27 };
28
29 struct RtcpSenderInfo {
30 // First three members are used for lipsync.
31 // First two members are used for rtt.
32 uint32 ntp_seconds;
33 uint32 ntp_fraction;
34 uint32 rtp_timestamp;
35 uint32 send_packet_count;
36 size_t send_octet_count;
37 };
38
39 struct RtcpReportBlock {
40 uint32 remote_ssrc; // SSRC of sender of this report.
41 uint32 media_ssrc; // SSRC of the RTP packet sender.
42 uint8 fraction_lost;
43 uint32 cumulative_lost; // 24 bits valid.
44 uint32 extended_high_sequence_number;
45 uint32 jitter;
46 uint32 last_sr;
47 uint32 delay_since_last_sr;
48 };
49
50 struct RtcpDlrrReportBlock {
51 uint32 last_rr;
52 uint32 delay_since_last_rr;
53 };
54
55 typedef std::list<RtcpSenderFrameLogMessage> RtcpSenderLogMessage;
56
13 class FrameIdWrapHelper { 57 class FrameIdWrapHelper {
14 public: 58 public:
15 FrameIdWrapHelper() 59 FrameIdWrapHelper()
16 : first_(true), 60 : first_(true),
17 frame_id_wrap_count_(0), 61 frame_id_wrap_count_(0),
18 range_(kLowRange) {} 62 range_(kLowRange) {}
19 63
20 uint32 MapTo32bitsFrameId(const uint8 over_the_wire_frame_id) { 64 uint32 MapTo32bitsFrameId(const uint8 over_the_wire_frame_id) {
21 if (first_) { 65 if (first_) {
22 first_ = false; 66 first_ = false;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 111
68 static const uint8 kLowRangeThreshold = 0x0f; 112 static const uint8 kLowRangeThreshold = 0x0f;
69 static const uint8 kHighRangeThreshold = 0xf0; 113 static const uint8 kHighRangeThreshold = 0xf0;
70 static const uint32 kStartFrameId = GG_UINT32_C(0xffffffff); 114 static const uint32 kStartFrameId = GG_UINT32_C(0xffffffff);
71 115
72 bool first_; 116 bool first_;
73 uint32 frame_id_wrap_count_; 117 uint32 frame_id_wrap_count_;
74 Range range_; 118 Range range_;
75 }; 119 };
76 120
77
78 } // namespace cast 121 } // namespace cast
79 } // namespace media 122 } // namespace media
80 123
81 #endif // MEDIA_CAST_NET_CAST_NET_DEFINES_H_ 124 #endif // MEDIA_CAST_NET_CAST_NET_DEFINES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698