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

Side by Side Diff: media/cast/rtcp/test_rtcp_packet_builder.h

Issue 70713002: Cast: Restructure RTCP interface to better fit our usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
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 // A very simple packet builder class for building RTCP packets. 5 // A very simple packet builder class for building RTCP packets.
6 // Used for testing only. 6 // Used for testing only.
7 #ifndef MEDIA_CAST_RTCP_TEST_RTCP_PACKET_BUILDER_H_ 7 #ifndef MEDIA_CAST_RTCP_TEST_RTCP_PACKET_BUILDER_H_
8 #define MEDIA_CAST_RTCP_TEST_RTCP_PACKET_BUILDER_H_ 8 #define MEDIA_CAST_RTCP_TEST_RTCP_PACKET_BUILDER_H_
9 9
10 #include "media/cast/rtcp/rtcp_defines.h" 10 #include "media/cast/rtcp/rtcp_defines.h"
11 #include "net/base/big_endian.h" 11 #include "net/base/big_endian.h"
12 12
13 namespace media { 13 namespace media {
14 namespace cast { 14 namespace cast {
15 15
16 // These values are arbitrary only for the purpose of testing. 16 // These values are arbitrary only for the purpose of testing.
17 17
18 // Sender report. 18 // Sender report.
19 static const int kNtpHigh = 0x01020304; 19 static const int kNtpHigh = 0x01020304;
20 static const int kNtpLow = 0x05060708; 20 static const int kNtpLow = 0x05060708;
21 static const int kRtpTimestamp = 0x10203; 21 static const int kRtpTimestamp = 0x10203;
22 static const int kSendPacketCount = 987; 22 static const int kSendPacketCount = 987;
23 static const int kSendOctetCount = 87654; 23 static const int kSendOctetCount = 87654;
24 24
25 // Report block. 25 // Report block.
26 static const int kLoss = 0x01000123; 26 static const int kLoss = 0x01000123;
27 static const int kExtendedMax = 0x15678; 27 static const int kExtendedMax = 0x15678;
28 static const int kJitter = 0x10203; 28 static const int kTestJitter = 0x10203;
29 static const int kLastSr = 0x34561234; 29 static const int kLastSr = 0x34561234;
30 static const int kDelayLastSr = 1000; 30 static const int kDelayLastSr = 1000;
31 31
32 // DLRR block. 32 // DLRR block.
33 static const int kLastRr = 0x34561234; 33 static const int kLastRr = 0x34561234;
34 static const int kDelayLastRr = 1000; 34 static const int kDelayLastRr = 1000;
35 35
36 // REMB. 36 // REMB.
37 static const int kRembBitrate = 52428; 37 static const int kRembBitrate = 52428;
38 38
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Note: 0 is not a legal value, it is used for "uninitialized". 87 // Note: 0 is not a legal value, it is used for "uninitialized".
88 uint8 buffer_[kIpPacketSize]; 88 uint8 buffer_[kIpPacketSize];
89 char* ptr_of_length_; 89 char* ptr_of_length_;
90 net::BigEndianWriter big_endian_writer_; 90 net::BigEndianWriter big_endian_writer_;
91 }; 91 };
92 92
93 } // namespace cast 93 } // namespace cast
94 } // namespace media 94 } // namespace media
95 95
96 #endif // MEDIA_CAST_RTCP_TEST_RTCP_PACKET_BUILDER_H_ 96 #endif // MEDIA_CAST_RTCP_TEST_RTCP_PACKET_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698