/* * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "modules/rtp_rtcp/source/rtp_generic_frame_descriptor_extension.h" #include "rtc_base/checks.h" namespace webrtc { namespace { constexpr uint8_t kFlagBeginOfSubframe = …; constexpr uint8_t kFlagEndOfSubframe = …; // In version 00, the flags F and L in the first byte correspond to // kFlagFirstSubframeV00 and kFlagLastSubframeV00. In practice, they were // always set to `true`. constexpr uint8_t kFlagFirstSubframeV00 = …; constexpr uint8_t kFlagLastSubframeV00 = …; constexpr uint8_t kFlagDependencies = …; constexpr uint8_t kMaskTemporalLayer = …; constexpr uint8_t kFlagMoreDependencies = …; constexpr uint8_t kFlageXtendedOffset = …; } // namespace // 0 1 2 3 4 5 6 7 // +-+-+-+-+-+-+-+-+ // |B|E|F|L|D| T | // +-+-+-+-+-+-+-+-+ // B: | S | // +-+-+-+-+-+-+-+-+ // | | // B: + FID + // | | // +-+-+-+-+-+-+-+-+ // | | // + Width + // B=1 | | // and +-+-+-+-+-+-+-+-+ // D=0 | | // + Height + // | | // +-+-+-+-+-+-+-+-+ // D: | FDIFF |X|M| // +---------------+ // X: | ... | // +-+-+-+-+-+-+-+-+ // M: | FDIFF |X|M| // +---------------+ // | ... | // +-+-+-+-+-+-+-+-+ constexpr RTPExtensionType RtpGenericFrameDescriptorExtension00::kId; bool RtpGenericFrameDescriptorExtension00::Parse( rtc::ArrayView<const uint8_t> data, RtpGenericFrameDescriptor* descriptor) { … } size_t RtpGenericFrameDescriptorExtension00::ValueSize( const RtpGenericFrameDescriptor& descriptor) { … } bool RtpGenericFrameDescriptorExtension00::Write( rtc::ArrayView<uint8_t> data, const RtpGenericFrameDescriptor& descriptor) { … } } // namespace webrtc