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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h

Issue 1841453004: RtpPacket class introduced. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: added empty lines Created 4 years, 8 months 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
(Empty)
1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_
11 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_
12
13 #include "webrtc/base/basictypes.h"
14 #include "webrtc/call.h"
15 #include "webrtc/common_video/rotation.h"
16 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
17
18 namespace webrtc {
19
20 class AbsoluteSendTime {
21 public:
22 static constexpr RTPExtensionType kId = kRtpExtensionAbsoluteSendTime;
23 static constexpr uint8_t kValueSizeBytes = 3;
24 static const char* kName;
25 static bool IsSupportedFor(MediaType type);
26 static bool Parse(const uint8_t* data, uint32_t* time_ms);
27 static bool Write(uint8_t* data, int64_t time_ms);
28 };
29
30 class AudioLevel {
31 public:
32 static constexpr RTPExtensionType kId = kRtpExtensionAudioLevel;
33 static constexpr uint8_t kValueSizeBytes = 1;
34 static const char* kName;
35 static bool IsSupportedFor(MediaType type);
36 static bool Parse(const uint8_t* data,
37 bool* voice_activity,
38 uint8_t* audio_level);
39 static bool Write(uint8_t* data, bool voice_activity, uint8_t audio_level);
40 };
41
42 class TransmissionOffset {
43 public:
44 static constexpr RTPExtensionType kId = kRtpExtensionTransmissionTimeOffset;
45 static constexpr uint8_t kValueSizeBytes = 3;
46 static const char* kName;
47 static bool IsSupportedFor(MediaType type);
48 static bool Parse(const uint8_t* data, int32_t* time_ms);
49 static bool Write(uint8_t* data, int64_t time_ms);
50 };
51
52 class TransportSequenceNumber {
53 public:
54 static constexpr RTPExtensionType kId = kRtpExtensionTransportSequenceNumber;
55 static constexpr uint8_t kValueSizeBytes = 2;
56 static const char* kName;
57 static bool IsSupportedFor(MediaType type);
58 static bool Parse(const uint8_t* data, uint16_t* value);
59 static bool Write(uint8_t* data, uint16_t value);
60 };
61
62 class VideoOrientation {
63 public:
64 static constexpr RTPExtensionType kId = kRtpExtensionVideoRotation;
65 static constexpr uint8_t kValueSizeBytes = 1;
66 static const char* kName;
67 static bool IsSupportedFor(MediaType type);
68 static bool Parse(const uint8_t* data, VideoRotation* value);
69 static bool Write(uint8_t* data, VideoRotation value);
70 static bool Parse(const uint8_t* data, uint8_t* value);
71 static bool Write(uint8_t* data, uint8_t value);
72 };
73
74 } // namespace webrtc
75 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_header_extension.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698