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

Side by Side Diff: media/cast/net/rtcp/rtcp_defines.h

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_RTCP_RTCP_DEFINES_H_ 5 #ifndef MEDIA_CAST_RTCP_RTCP_DEFINES_H_
6 #define MEDIA_CAST_RTCP_RTCP_DEFINES_H_ 6 #define MEDIA_CAST_RTCP_RTCP_DEFINES_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 20 matching lines...) Expand all
31 kPacketTypeReceiverReport = 201, 31 kPacketTypeReceiverReport = 201,
32 kPacketTypeApplicationDefined = 204, 32 kPacketTypeApplicationDefined = 204,
33 kPacketTypeGenericRtpFeedback = 205, 33 kPacketTypeGenericRtpFeedback = 205,
34 kPacketTypePayloadSpecific = 206, 34 kPacketTypePayloadSpecific = 206,
35 kPacketTypeXr = 207, 35 kPacketTypeXr = 207,
36 kPacketTypeHigh = 210, // Port Mapping. 36 kPacketTypeHigh = 210, // Port Mapping.
37 }; 37 };
38 38
39 // Handle the per frame ACK and NACK messages. 39 // Handle the per frame ACK and NACK messages.
40 struct RtcpCastMessage { 40 struct RtcpCastMessage {
41 explicit RtcpCastMessage(uint32 ssrc); 41 explicit RtcpCastMessage(uint32_t ssrc);
42 RtcpCastMessage(); 42 RtcpCastMessage();
43 ~RtcpCastMessage(); 43 ~RtcpCastMessage();
44 44
45 uint32 media_ssrc; 45 uint32_t media_ssrc;
46 uint32 ack_frame_id; 46 uint32_t ack_frame_id;
47 uint16 target_delay_ms; 47 uint16_t target_delay_ms;
48 MissingFramesAndPacketsMap missing_frames_and_packets; 48 MissingFramesAndPacketsMap missing_frames_and_packets;
49 }; 49 };
50 50
51 // Log messages from receiver to sender. 51 // Log messages from receiver to sender.
52 struct RtcpReceiverEventLogMessage { 52 struct RtcpReceiverEventLogMessage {
53 RtcpReceiverEventLogMessage(); 53 RtcpReceiverEventLogMessage();
54 ~RtcpReceiverEventLogMessage(); 54 ~RtcpReceiverEventLogMessage();
55 55
56 CastLoggingEvent type; 56 CastLoggingEvent type;
57 base::TimeTicks event_timestamp; 57 base::TimeTicks event_timestamp;
58 base::TimeDelta delay_delta; 58 base::TimeDelta delay_delta;
59 uint16 packet_id; 59 uint16_t packet_id;
60 }; 60 };
61 61
62 typedef std::list<RtcpReceiverEventLogMessage> RtcpReceiverEventLogMessages; 62 typedef std::list<RtcpReceiverEventLogMessage> RtcpReceiverEventLogMessages;
63 63
64 struct RtcpReceiverFrameLogMessage { 64 struct RtcpReceiverFrameLogMessage {
65 explicit RtcpReceiverFrameLogMessage(uint32 rtp_timestamp); 65 explicit RtcpReceiverFrameLogMessage(uint32_t rtp_timestamp);
66 ~RtcpReceiverFrameLogMessage(); 66 ~RtcpReceiverFrameLogMessage();
67 67
68 uint32 rtp_timestamp_; 68 uint32_t rtp_timestamp_;
69 RtcpReceiverEventLogMessages event_log_messages_; 69 RtcpReceiverEventLogMessages event_log_messages_;
70 70
71 // TODO(mikhal): Investigate what's the best way to allow adding 71 // TODO(mikhal): Investigate what's the best way to allow adding
72 // DISALLOW_COPY_AND_ASSIGN, as currently it contradicts the implementation 72 // DISALLOW_COPY_AND_ASSIGN, as currently it contradicts the implementation
73 // and possible changes have a big impact on design. 73 // and possible changes have a big impact on design.
74 }; 74 };
75 75
76 typedef std::list<RtcpReceiverFrameLogMessage> RtcpReceiverLogMessage; 76 typedef std::list<RtcpReceiverFrameLogMessage> RtcpReceiverLogMessage;
77 77
78 struct RtcpReceiverReferenceTimeReport { 78 struct RtcpReceiverReferenceTimeReport {
79 RtcpReceiverReferenceTimeReport(); 79 RtcpReceiverReferenceTimeReport();
80 ~RtcpReceiverReferenceTimeReport(); 80 ~RtcpReceiverReferenceTimeReport();
81 81
82 uint32 remote_ssrc; 82 uint32_t remote_ssrc;
83 uint32 ntp_seconds; 83 uint32_t ntp_seconds;
84 uint32 ntp_fraction; 84 uint32_t ntp_fraction;
85 }; 85 };
86 86
87 inline bool operator==(RtcpReceiverReferenceTimeReport lhs, 87 inline bool operator==(RtcpReceiverReferenceTimeReport lhs,
88 RtcpReceiverReferenceTimeReport rhs) { 88 RtcpReceiverReferenceTimeReport rhs) {
89 return lhs.remote_ssrc == rhs.remote_ssrc && 89 return lhs.remote_ssrc == rhs.remote_ssrc &&
90 lhs.ntp_seconds == rhs.ntp_seconds && 90 lhs.ntp_seconds == rhs.ntp_seconds &&
91 lhs.ntp_fraction == rhs.ntp_fraction; 91 lhs.ntp_fraction == rhs.ntp_fraction;
92 } 92 }
93 93
94 // Struct used by raw event subscribers as an intermediate format before 94 // Struct used by raw event subscribers as an intermediate format before
95 // sending off to the other side via RTCP. 95 // sending off to the other side via RTCP.
96 // (i.e., {Sender,Receiver}RtcpEventSubscriber) 96 // (i.e., {Sender,Receiver}RtcpEventSubscriber)
97 struct RtcpEvent { 97 struct RtcpEvent {
98 RtcpEvent(); 98 RtcpEvent();
99 ~RtcpEvent(); 99 ~RtcpEvent();
100 100
101 CastLoggingEvent type; 101 CastLoggingEvent type;
102 102
103 // Time of event logged. 103 // Time of event logged.
104 base::TimeTicks timestamp; 104 base::TimeTicks timestamp;
105 105
106 // Render/playout delay. Only set for FRAME_PLAYOUT events. 106 // Render/playout delay. Only set for FRAME_PLAYOUT events.
107 base::TimeDelta delay_delta; 107 base::TimeDelta delay_delta;
108 108
109 // Only set for packet events. 109 // Only set for packet events.
110 uint16 packet_id; 110 uint16_t packet_id;
111 }; 111 };
112 112
113 typedef base::Callback<void(const RtcpCastMessage&)> RtcpCastMessageCallback; 113 typedef base::Callback<void(const RtcpCastMessage&)> RtcpCastMessageCallback;
114 typedef base::Callback<void(base::TimeDelta)> RtcpRttCallback; 114 typedef base::Callback<void(base::TimeDelta)> RtcpRttCallback;
115 typedef 115 typedef
116 base::Callback<void(const RtcpReceiverLogMessage&)> RtcpLogMessageCallback; 116 base::Callback<void(const RtcpReceiverLogMessage&)> RtcpLogMessageCallback;
117 117
118 // TODO(hubbe): Document members of this struct. 118 // TODO(hubbe): Document members of this struct.
119 struct RtpReceiverStatistics { 119 struct RtpReceiverStatistics {
120 RtpReceiverStatistics(); 120 RtpReceiverStatistics();
121 uint8 fraction_lost; 121 uint8_t fraction_lost;
122 uint32 cumulative_lost; // 24 bits valid. 122 uint32_t cumulative_lost; // 24 bits valid.
123 uint32 extended_high_sequence_number; 123 uint32_t extended_high_sequence_number;
124 uint32 jitter; 124 uint32_t jitter;
125 }; 125 };
126 126
127 // These are intended to only be created using Rtcp::ConvertToNTPAndSave. 127 // These are intended to only be created using Rtcp::ConvertToNTPAndSave.
128 struct RtcpTimeData { 128 struct RtcpTimeData {
129 uint32 ntp_seconds; 129 uint32_t ntp_seconds;
130 uint32 ntp_fraction; 130 uint32_t ntp_fraction;
131 base::TimeTicks timestamp; 131 base::TimeTicks timestamp;
132 }; 132 };
133 133
134 // This struct is used to encapsulate all the parameters of the 134 // This struct is used to encapsulate all the parameters of the
135 // SendRtcpFromRtpReceiver for IPC transportation. 135 // SendRtcpFromRtpReceiver for IPC transportation.
136 struct SendRtcpFromRtpReceiver_Params { 136 struct SendRtcpFromRtpReceiver_Params {
137 SendRtcpFromRtpReceiver_Params(); 137 SendRtcpFromRtpReceiver_Params();
138 ~SendRtcpFromRtpReceiver_Params(); 138 ~SendRtcpFromRtpReceiver_Params();
139 uint32 ssrc; 139 uint32_t ssrc;
140 uint32 sender_ssrc; 140 uint32_t sender_ssrc;
141 RtcpTimeData time_data; 141 RtcpTimeData time_data;
142 scoped_ptr<RtcpCastMessage> cast_message; 142 scoped_ptr<RtcpCastMessage> cast_message;
143 base::TimeDelta target_delay; 143 base::TimeDelta target_delay;
144 scoped_ptr<std::vector<std::pair<RtpTimestamp, RtcpEvent> > > rtcp_events; 144 scoped_ptr<std::vector<std::pair<RtpTimestamp, RtcpEvent> > > rtcp_events;
145 scoped_ptr<RtpReceiverStatistics> rtp_receiver_statistics; 145 scoped_ptr<RtpReceiverStatistics> rtp_receiver_statistics;
146 }; 146 };
147 147
148 148
149 } // namespace cast 149 } // namespace cast
150 } // namespace media 150 } // namespace media
151 151
152 #endif // MEDIA_CAST_RTCP_RTCP_DEFINES_H_ 152 #endif // MEDIA_CAST_RTCP_RTCP_DEFINES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698