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

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

Issue 109413004: Cast:Adding cast_transport_config and cleaning up (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 6 years, 11 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/rtcp/rtcp_utility.cc ('k') | media/cast/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 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"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 void AddCast(uint32 sender_ssrc, uint32 media_ssrc); 79 void AddCast(uint32 sender_ssrc, uint32 media_ssrc);
80 void AddSenderLog(uint32 sender_ssrc); 80 void AddSenderLog(uint32 sender_ssrc);
81 void AddSenderFrameLog(uint8 event_id, uint32 rtp_timestamp); 81 void AddSenderFrameLog(uint8 event_id, uint32 rtp_timestamp);
82 void AddReceiverLog(uint32 sender_ssrc); 82 void AddReceiverLog(uint32 sender_ssrc);
83 void AddReceiverFrameLog(uint32 rtp_timestamp, int num_events, 83 void AddReceiverFrameLog(uint32 rtp_timestamp, int num_events,
84 uint32 event_timesamp_base); 84 uint32 event_timesamp_base);
85 void AddReceiverEventLog(uint16 event_data, uint8 event_id, 85 void AddReceiverEventLog(uint16 event_data, uint8 event_id,
86 uint16 event_timesamp_delta); 86 uint16 event_timesamp_delta);
87 87
88 const uint8* Packet(); 88 const uint8* Packet();
89 int Length() { return kIpPacketSize - big_endian_writer_.remaining(); } 89 int Length() { return kMaxIpPacketSize - big_endian_writer_.remaining(); }
90 90
91 private: 91 private:
92 void AddRtcpHeader(int payload, int format_or_count); 92 void AddRtcpHeader(int payload, int format_or_count);
93 void PatchLengthField(); 93 void PatchLengthField();
94 94
95 // Where the length field of the current packet is. 95 // Where the length field of the current packet is.
96 // Note: 0 is not a legal value, it is used for "uninitialized". 96 // Note: 0 is not a legal value, it is used for "uninitialized".
97 uint8 buffer_[kIpPacketSize]; 97 uint8 buffer_[kMaxIpPacketSize];
98 char* ptr_of_length_; 98 char* ptr_of_length_;
99 net::BigEndianWriter big_endian_writer_; 99 net::BigEndianWriter big_endian_writer_;
100 }; 100 };
101 101
102 } // namespace cast 102 } // namespace cast
103 } // namespace media 103 } // namespace media
104 104
105 #endif // MEDIA_CAST_RTCP_TEST_RTCP_PACKET_BUILDER_H_ 105 #endif // MEDIA_CAST_RTCP_TEST_RTCP_PACKET_BUILDER_H_
OLDNEW
« no previous file with comments | « media/cast/rtcp/rtcp_utility.cc ('k') | media/cast/rtcp/test_rtcp_packet_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698