- add sources.
[platform/framework/web/crosswalk.git] / src / media / cast / rtp_sender / rtp_packetizer / test / rtp_header_parser.h
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.
4
5 // Utility parser for rtp packetizer unittests
6 #ifndef MEDIA_CAST_RTP_SENDER_RTP_PACKETIZER_TEST_RTP_HEADER_PARSER_H_
7 #define MEDIA_CAST_RTP_SENDER_RTP_PACKETIZER_TEST_RTP_HEADER_PARSER_H_
8
9 #include "media/cast/rtp_common/rtp_defines.h"
10
11 namespace media {
12 namespace cast {
13
14 class RtpHeaderParser {
15  public:
16   RtpHeaderParser(const uint8* rtpData, size_t rtpDataLength);
17   ~RtpHeaderParser();
18
19   bool Parse(RtpCastHeader* parsed_packet) const;
20  private:
21   bool ParseCommon(RtpCastHeader* parsed_packet) const;
22   bool ParseCast(RtpCastHeader* parsed_packet) const;
23   const uint8* const rtp_data_begin_;
24   size_t length_;
25
26   DISALLOW_COPY_AND_ASSIGN(RtpHeaderParser);
27 };
28
29 }  // namespace cast
30 }  // namespace media
31
32 #endif  // MEDIA_CAST_RTP_SENDER_RTP_PACKETIZER_TEST_RTP_HEADER_PARSER_H_