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

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

Issue 427733002: Cast: Remove unused RTCP messages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/cast/net/rtcp/rtcp_utility.cc ('k') | media/cast/net/rtcp/test_rtcp_packet_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // 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 "base/big_endian.h" 10 #include "base/big_endian.h"
(...skipping 18 matching lines...) Expand all
29 static const int kLoss = 0x01000123; 29 static const int kLoss = 0x01000123;
30 static const int kExtendedMax = 0x15678; 30 static const int kExtendedMax = 0x15678;
31 static const int kTestJitter = 0x10203; 31 static const int kTestJitter = 0x10203;
32 static const int kLastSr = 0x34561234; 32 static const int kLastSr = 0x34561234;
33 static const int kDelayLastSr = 1000; 33 static const int kDelayLastSr = 1000;
34 34
35 // DLRR block. 35 // DLRR block.
36 static const int kLastRr = 0x34561234; 36 static const int kLastRr = 0x34561234;
37 static const int kDelayLastRr = 1000; 37 static const int kDelayLastRr = 1000;
38 38
39 // REMB.
40 static const int kTestRembBitrate = 52428;
41
42 // RPSI.
43 static const int kPayloadtype = 126;
44 static const uint64 kPictureId = 0x1234567890;
45
46 // NACK. 39 // NACK.
47 static const int kMissingPacket = 34567; 40 static const int kMissingPacket = 34567;
48 41
49 // CAST. 42 // CAST.
50 static const uint32 kAckFrameId = 17; 43 static const uint32 kAckFrameId = 17;
51 static const uint32 kLostFrameId = 18; 44 static const uint32 kLostFrameId = 18;
52 static const uint32 kFrameIdWithLostPackets = 19; 45 static const uint32 kFrameIdWithLostPackets = 19;
53 static const int kLostPacketId1 = 3; 46 static const int kLostPacketId1 = 3;
54 static const int kLostPacketId2 = 5; 47 static const int kLostPacketId2 = 5;
55 static const int kLostPacketId3 = 12; 48 static const int kLostPacketId3 = 12;
56 } // namespace 49 } // namespace
57 50
58 class TestRtcpPacketBuilder { 51 class TestRtcpPacketBuilder {
59 public: 52 public:
60 TestRtcpPacketBuilder(); 53 TestRtcpPacketBuilder();
61 54
62 void AddSr(uint32 sender_ssrc, int number_of_report_blocks); 55 void AddSr(uint32 sender_ssrc, int number_of_report_blocks);
63 void AddSrWithNtp(uint32 sender_ssrc, 56 void AddSrWithNtp(uint32 sender_ssrc,
64 uint32 ntp_high, 57 uint32 ntp_high,
65 uint32 ntp_low, 58 uint32 ntp_low,
66 uint32 rtp_timestamp); 59 uint32 rtp_timestamp);
67 void AddRr(uint32 sender_ssrc, int number_of_report_blocks); 60 void AddRr(uint32 sender_ssrc, int number_of_report_blocks);
68 void AddRb(uint32 rtp_ssrc); 61 void AddRb(uint32 rtp_ssrc);
69 void AddSdesCname(uint32 sender_ssrc, const std::string& c_name);
70 62
71 void AddXrHeader(uint32 sender_ssrc); 63 void AddXrHeader(uint32 sender_ssrc);
72 void AddXrDlrrBlock(uint32 sender_ssrc); 64 void AddXrDlrrBlock(uint32 sender_ssrc);
73 void AddXrExtendedDlrrBlock(uint32 sender_ssrc); 65 void AddXrExtendedDlrrBlock(uint32 sender_ssrc);
74 void AddXrRrtrBlock(); 66 void AddXrRrtrBlock();
75 void AddXrUnknownBlock(); 67 void AddXrUnknownBlock();
76 68
77 void AddNack(uint32 sender_ssrc, uint32 media_ssrc); 69 void AddNack(uint32 sender_ssrc, uint32 media_ssrc);
78 void AddSendReportRequest(uint32 sender_ssrc, uint32 media_ssrc); 70 void AddSendReportRequest(uint32 sender_ssrc, uint32 media_ssrc);
79 71
80 void AddPli(uint32 sender_ssrc, uint32 media_ssrc);
81 void AddRpsi(uint32 sender_ssrc, uint32 media_ssrc);
82 void AddRemb(uint32 sender_ssrc, uint32 media_ssrc);
83 void AddCast(uint32 sender_ssrc, 72 void AddCast(uint32 sender_ssrc,
84 uint32 media_ssrc, 73 uint32 media_ssrc,
85 base::TimeDelta target_delay); 74 base::TimeDelta target_delay);
86 void AddReceiverLog(uint32 sender_ssrc); 75 void AddReceiverLog(uint32 sender_ssrc);
87 void AddReceiverFrameLog(uint32 rtp_timestamp, 76 void AddReceiverFrameLog(uint32 rtp_timestamp,
88 int num_events, 77 int num_events,
89 uint32 event_timesamp_base); 78 uint32 event_timesamp_base);
90 void AddReceiverEventLog(uint16 event_data, 79 void AddReceiverEventLog(uint16 event_data,
91 CastLoggingEvent event, 80 CastLoggingEvent event,
92 uint16 event_timesamp_delta); 81 uint16 event_timesamp_delta);
(...skipping 12 matching lines...) Expand all
105 char* ptr_of_length_; 94 char* ptr_of_length_;
106 base::BigEndianWriter big_endian_writer_; 95 base::BigEndianWriter big_endian_writer_;
107 96
108 DISALLOW_COPY_AND_ASSIGN(TestRtcpPacketBuilder); 97 DISALLOW_COPY_AND_ASSIGN(TestRtcpPacketBuilder);
109 }; 98 };
110 99
111 } // namespace cast 100 } // namespace cast
112 } // namespace media 101 } // namespace media
113 102
114 #endif // MEDIA_CAST_RTCP_TEST_RTCP_PACKET_BUILDER_H_ 103 #endif // MEDIA_CAST_RTCP_TEST_RTCP_PACKET_BUILDER_H_
OLDNEW
« no previous file with comments | « media/cast/net/rtcp/rtcp_utility.cc ('k') | media/cast/net/rtcp/test_rtcp_packet_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698