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

Side by Side Diff: media/cast/net/rtp_sender/rtp_packetizer/test/rtp_header_parser.h

Issue 112133002: Cast:Moving netwrok sender related code to a designated folder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
OLDNEW
(Empty)
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_NET_RTP_SENDER_RTP_PACKETIZER_TEST_RTP_HEADER_PARSER_H_
7 #define MEDIA_CAST_NET_RTP_SENDER_RTP_PACKETIZER_TEST_RTP_HEADER_PARSER_H_
8
9 #include "base/basictypes.h"
10 #include "media/cast/net/cast_net_defines.h"
11
12 namespace media {
13 namespace cast {
14
15 struct RtpCastTestHeader {
pwestin 2013/12/10 23:03:01 confused about this struct why do we need it?
mikhal1 2013/12/11 00:29:33 Just for testing. Before I was using the RtpCastHe
16 RtpCastTestHeader() {
17 is_key_frame = false;
18 frame_id = 0;
19 packet_id = 0;
20 max_packet_id = 0;
21 is_reference = false;
22 reference_frame_id = 0;
23 marker = false;
24 sequence_number = 0;
25 rtp_timestamp = 0;
26 ssrc = 0;
27 payload_type = 0;
28 num_csrcs = 0;
29 audio_num_energy = 0;
30 header_length = 0;
31 }
32 //webrtc::WebRtcRTPHeader webrtc;
33 // Cast specific.
34 bool is_key_frame;
35 uint32 frame_id;
36 uint16 packet_id;
37 uint16 max_packet_id;
38 bool is_reference; // Set to true if the previous frame is not available,
39 // and the reference frame id is available.
40 uint32 reference_frame_id;
41
42 // Rtp Generic.
43 bool marker;
44 uint16 sequence_number;
45 uint32 rtp_timestamp;
46 uint32 ssrc;
47 int payload_type;
48 uint8 num_csrcs;
49 uint8 audio_num_energy;
50 int header_length;
51
52 };
53
54 class RtpHeaderParser {
55 public:
56 RtpHeaderParser(const uint8* rtpData, size_t rtpDataLength);
57 ~RtpHeaderParser();
58
59 bool Parse(RtpCastTestHeader* parsed_packet) const;
60 private:
pwestin 2013/12/10 23:03:01 line break
mikhal1 2013/12/11 00:29:33 Done.
61 bool ParseCommon(RtpCastTestHeader* parsed_packet) const;
62 bool ParseCast(RtpCastTestHeader* parsed_packet) const;
63 const uint8* const rtp_data_begin_;
64 size_t length_;
65
66 mutable FrameIdWrapHelper frame_id_wrap_helper_;
67 mutable FrameIdWrapHelper reference_frame_id_wrap_helper_;
68
69 DISALLOW_COPY_AND_ASSIGN(RtpHeaderParser);
70 };
71
72 } // namespace cast
73 } // namespace media
74
75 #endif // MEDIA_CAST_NET_RTP_SENDER_RTP_PACKETIZER_TEST_RTP_HEADER_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698