Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 REMOTING_PROTOCOL_RTP_UTILS_H_ | 5 #ifndef REMOTING_PROTOCOL_RTP_UTILS_H_ |
| 6 #define REMOTING_PROTOCOL_RTP_UTILS_H_ | 6 #define REMOTING_PROTOCOL_RTP_UTILS_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 | 9 |
| 10 namespace remoting { | 10 namespace remoting { |
| 11 namespace protocol { | 11 namespace protocol { |
| 12 | 12 |
| 13 struct RtpHeader { | 13 struct RtpHeader { |
| 14 RtpHeader() | 14 RtpHeader(); |
|
Sergey Ulanov
2010/12/07 21:15:42
This was inlined intentionally. This file is inclu
Elliot Glaysher
2010/12/07 21:49:25
This was found by an automated process which is go
Sergey Ulanov
2010/12/07 22:00:38
Yes, it doesn't make much difference in performanc
| |
| 15 : padding(false), | |
| 16 extension(false), | |
| 17 sources(0), | |
| 18 marker(false), | |
| 19 payload_type(0), | |
| 20 sequence_number(0), | |
| 21 timestamp(0), | |
| 22 sync_source_id(0) { | |
| 23 } | |
| 24 | 15 |
| 25 // RTP version is always set to 2. | 16 // RTP version is always set to 2. |
| 26 // version = 2 | 17 // version = 2 |
| 27 bool padding; | 18 bool padding; |
| 28 bool extension; | 19 bool extension; |
| 29 uint8 sources; | 20 uint8 sources; |
| 30 bool marker; | 21 bool marker; |
| 31 uint8 payload_type; | 22 uint8 payload_type; |
| 32 uint16 sequence_number; | 23 uint16 sequence_number; |
| 33 uint32 timestamp; | 24 uint32 timestamp; |
| 34 uint32 sync_source_id; | 25 uint32 sync_source_id; |
| 35 uint32 source_id[15]; | 26 uint32 source_id[15]; |
| 36 }; | 27 }; |
| 37 | 28 |
| 38 struct RtcpReceiverReport { | 29 struct RtcpReceiverReport { |
| 39 RtcpReceiverReport() | 30 RtcpReceiverReport(); |
|
Sergey Ulanov
2010/12/07 21:15:42
same here.
| |
| 40 : receiver_ssrc(0), | |
| 41 sender_ssrc(0), | |
| 42 loss_fraction(0), | |
| 43 total_lost_packets(0), | |
| 44 last_sequence_number(0), | |
| 45 jitter(0), | |
| 46 last_sender_report_timestamp(0), | |
| 47 last_sender_report_delay(0) { | |
| 48 } | |
| 49 | 31 |
| 50 uint32 receiver_ssrc; | 32 uint32 receiver_ssrc; |
| 51 uint32 sender_ssrc; | 33 uint32 sender_ssrc; |
| 52 uint8 loss_fraction; // 8bit fixed point value in the interval [0..1]. | 34 uint8 loss_fraction; // 8bit fixed point value in the interval [0..1]. |
| 53 uint32 total_lost_packets; | 35 uint32 total_lost_packets; |
| 54 uint32 last_sequence_number; | 36 uint32 last_sequence_number; |
| 55 uint32 jitter; | 37 uint32 jitter; |
| 56 uint32 last_sender_report_timestamp; | 38 uint32 last_sender_report_timestamp; |
| 57 uint32 last_sender_report_delay; | 39 uint32 last_sender_report_delay; |
| 58 }; | 40 }; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 126 | 108 |
| 127 // Unpacks VP8 Payload Descriptor. If the descriptor is not valid | 109 // Unpacks VP8 Payload Descriptor. If the descriptor is not valid |
| 128 // returns -1, otherwise returns size of the descriptor. | 110 // returns -1, otherwise returns size of the descriptor. |
| 129 int UnpackVp8Descriptor(const uint8* buffer, int buffer_size, | 111 int UnpackVp8Descriptor(const uint8* buffer, int buffer_size, |
| 130 Vp8Descriptor* descriptor); | 112 Vp8Descriptor* descriptor); |
| 131 | 113 |
| 132 } // namespace protocol | 114 } // namespace protocol |
| 133 } // namespace remoting | 115 } // namespace remoting |
| 134 | 116 |
| 135 #endif // REMOTING_PROTOCOL_RTP_UTILS_H_ | 117 #endif // REMOTING_PROTOCOL_RTP_UTILS_H_ |
| OLD | NEW |