1 /* 2 * Copyright (c) 2018 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 MODULES_RTP_RTCP_SOURCE_RTP_GENERIC_FRAME_DESCRIPTOR_EXTENSION_H_ 11 #define MODULES_RTP_RTCP_SOURCE_RTP_GENERIC_FRAME_DESCRIPTOR_EXTENSION_H_ 12 13 #include <stddef.h> 14 #include <stdint.h> 15 16 #include "api/array_view.h" 17 #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" 18 #include "modules/rtp_rtcp/source/rtp_generic_frame_descriptor.h" 19 20 namespace webrtc { 21 22 class RtpGenericFrameDescriptorExtension00 { 23 public: 24 using value_type = RtpGenericFrameDescriptor; 25 static constexpr RTPExtensionType kId = kRtpExtensionGenericFrameDescriptor00; 26 static constexpr char kUri[] = 27 "http://www.webrtc.org/experiments/rtp-hdrext/" 28 "generic-frame-descriptor-00"; 29 static constexpr int kMaxSizeBytes = 16; 30 31 static bool Parse(rtc::ArrayView<const uint8_t> data, 32 RtpGenericFrameDescriptor* descriptor); 33 static size_t ValueSize(const RtpGenericFrameDescriptor& descriptor); 34 static bool Write(rtc::ArrayView<uint8_t> data, 35 const RtpGenericFrameDescriptor& descriptor); 36 }; 37 38 } // namespace webrtc 39 40 #endif // MODULES_RTP_RTCP_SOURCE_RTP_GENERIC_FRAME_DESCRIPTOR_EXTENSION_H_ 41