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

Side by Side Diff: media/cast/net/rtp/rtp_defines.h

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef MEDIA_CAST_NET_RTP_RTP_DEFINES_H_ 5 #ifndef MEDIA_CAST_NET_RTP_RTP_DEFINES_H_
6 #define MEDIA_CAST_NET_RTP_RTP_DEFINES_H_ 6 #define MEDIA_CAST_NET_RTP_RTP_DEFINES_H_
7 7
8 #include "base/basictypes.h"
9 #include "media/cast/net/rtcp/rtcp_defines.h" 8 #include "media/cast/net/rtcp/rtcp_defines.h"
10 9
11 namespace media { 10 namespace media {
12 namespace cast { 11 namespace cast {
13 12
14 static const uint16 kRtpHeaderLength = 12; 13 static const uint16_t kRtpHeaderLength = 12;
15 static const uint16 kCastHeaderLength = 7; 14 static const uint16_t kCastHeaderLength = 7;
16 15
17 // RTP Header 16 // RTP Header
18 static const uint8 kRtpExtensionBitMask = 0x10; 17 static const uint8_t kRtpExtensionBitMask = 0x10;
19 static const uint8 kRtpMarkerBitMask = 0x80; 18 static const uint8_t kRtpMarkerBitMask = 0x80;
20 static const uint8 kRtpNumCsrcsMask = 0x0f; 19 static const uint8_t kRtpNumCsrcsMask = 0x0f;
21 20
22 // Cast Header 21 // Cast Header
23 static const uint8 kCastKeyFrameBitMask = 0x80; 22 static const uint8_t kCastKeyFrameBitMask = 0x80;
24 static const uint8 kCastReferenceFrameIdBitMask = 0x40; 23 static const uint8_t kCastReferenceFrameIdBitMask = 0x40;
25 static const uint8 kCastExtensionCountmask = 0x3f; 24 static const uint8_t kCastExtensionCountmask = 0x3f;
26 25
27 // Cast RTP extensions. 26 // Cast RTP extensions.
28 static const uint8 kCastRtpExtensionAdaptiveLatency = 1; 27 static const uint8_t kCastRtpExtensionAdaptiveLatency = 1;
29 28
30 struct RtpCastHeader { 29 struct RtpCastHeader {
31 RtpCastHeader(); 30 RtpCastHeader();
32 // Elements from RTP packet header. 31 // Elements from RTP packet header.
33 bool marker; 32 bool marker;
34 uint8 payload_type; 33 uint8_t payload_type;
35 uint16 sequence_number; 34 uint16_t sequence_number;
36 uint32 rtp_timestamp; 35 uint32_t rtp_timestamp;
37 uint32 sender_ssrc; 36 uint32_t sender_ssrc;
38 uint8 num_csrcs; 37 uint8_t num_csrcs;
39 38
40 // Elements from Cast header (at beginning of RTP payload). 39 // Elements from Cast header (at beginning of RTP payload).
41 bool is_key_frame; 40 bool is_key_frame;
42 bool is_reference; 41 bool is_reference;
43 uint32 frame_id; 42 uint32_t frame_id;
44 uint16 packet_id; 43 uint16_t packet_id;
45 uint16 max_packet_id; 44 uint16_t max_packet_id;
46 uint32 reference_frame_id; 45 uint32_t reference_frame_id;
47 uint16 new_playout_delay_ms; 46 uint16_t new_playout_delay_ms;
48 uint8 num_extensions; 47 uint8_t num_extensions;
49 }; 48 };
50 49
51 class RtpPayloadFeedback { 50 class RtpPayloadFeedback {
52 public: 51 public:
53 virtual void CastFeedback(const RtcpCastMessage& cast_feedback) = 0; 52 virtual void CastFeedback(const RtcpCastMessage& cast_feedback) = 0;
54 53
55 protected: 54 protected:
56 virtual ~RtpPayloadFeedback(); 55 virtual ~RtpPayloadFeedback();
57 }; 56 };
58 57
59 } // namespace cast 58 } // namespace cast
60 } // namespace media 59 } // namespace media
61 60
62 #endif // MEDIA_CAST_NET_RTP_RTP_DEFINES_H_ 61 #endif // MEDIA_CAST_NET_RTP_RTP_DEFINES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698