Fix for browser_plugin_host_browsertest when embedder is not yet available.
[chromium-blink-merge.git] / media / cast / rtp_receiver / rtp_parser / rtp_parser.h
blobd8d1e34e8695a0805b334db8add6f5b58dedaa39
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 #ifndef MEDIA_CAST_RTP_RECEIVER_RTP_PARSER_RTP_PARSER_H_
6 #define MEDIA_CAST_RTP_RECEIVER_RTP_PARSER_RTP_PARSER_H_
8 #include "media/cast/rtp_common/rtp_defines.h"
10 namespace media {
11 namespace cast {
13 class RtpData;
15 struct RtpParserConfig {
16 RtpParserConfig() {
17 ssrc = 0;
18 payload_type = 0;
19 audio_channels = 0;
22 uint32 ssrc;
23 int payload_type;
24 AudioCodec audio_codec;
25 VideoCodec video_codec;
26 int audio_channels;
29 class RtpParser {
30 public:
31 RtpParser(RtpData* incoming_payload_callback,
32 const RtpParserConfig parser_config);
34 ~RtpParser();
36 bool ParsePacket(const uint8* packet, size_t length,
37 RtpCastHeader* rtp_header);
39 private:
40 bool ParseCommon(const uint8* packet, size_t length,
41 RtpCastHeader* rtp_header);
43 bool ParseCast(const uint8* packet, size_t length,
44 RtpCastHeader* rtp_header);
46 RtpData* data_callback_;
47 RtpParserConfig parser_config_;
50 } // namespace cast
51 } // namespace media
53 #endif // MEDIA_CAST_RTP_RECEIVER_RTP_PARSER_RTP_PARSER_H_