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
3 // found in the LICENSE file.
5 // Test helper class that builds rtp packets.
7 #ifndef MEDIA_CAST_RTP_RECEIVER_RTP_PARSER_TEST_RTP_PACKET_BUILDER_H_
8 #define MEDIA_CAST_RTP_RECEIVER_RTP_PARSER_TEST_RTP_PACKET_BUILDER_H_
10 #include "media/cast/rtp_receiver/rtp_receiver_defines.h"
15 // TODO(miu): Consolidate with RtpPacketizer as a single Cast packet
16 // serialization implementation.
17 class RtpPacketBuilder
{
20 void SetKeyFrame(bool is_key
);
21 void SetFrameIds(uint32 frame_id
, uint32 reference_frame_id
);
22 void SetPacketId(uint16 packet_id
);
23 void SetMaxPacketId(uint16 max_packet_id
);
24 void SetTimestamp(uint32 timestamp
);
25 void SetSequenceNumber(uint16 sequence_number
);
26 void SetMarkerBit(bool marker
);
27 void SetPayloadType(int payload_type
);
28 void SetSsrc(uint32 ssrc
);
29 void BuildHeader(uint8
* data
, uint32 data_length
);
35 uint16 max_packet_id_
;
36 uint32 reference_frame_id_
;
38 uint16 sequence_number_
;
43 void BuildCastHeader(uint8
* data
, uint32 data_length
);
44 void BuildCommonHeader(uint8
* data
, uint32 data_length
);
46 DISALLOW_COPY_AND_ASSIGN(RtpPacketBuilder
);
52 #endif // MEDIA_CAST_RTP_RECEIVER_RTP_PARSER_TEST_RTP_PACKET_BUILDER_H_