#include "modules/rtp_rtcp/source/rtp_packetizer_av1.h"
#include <stddef.h>
#include <stdint.h>
#include <algorithm>
#include "api/array_view.h"
#include "api/video/video_frame_type.h"
#include "modules/rtp_rtcp/source/leb128.h"
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
#include "rtc_base/byte_buffer.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
namespace webrtc {
namespace {
constexpr int kAggregationHeaderSize = …;
constexpr int kMaxNumObusToOmitSize = …;
constexpr uint8_t kObuSizePresentBit = …;
constexpr int kObuTypeSequenceHeader = …;
constexpr int kObuTypeTemporalDelimiter = …;
constexpr int kObuTypeTileList = …;
constexpr int kObuTypePadding = …;
constexpr size_t kBytesOverheadEvenDistribution = …;
constexpr size_t kMinBytesSavedPerPacketWithEvenDistribution = …;
bool ObuHasExtension(uint8_t obu_header) { … }
bool ObuHasSize(uint8_t obu_header) { … }
int ObuType(uint8_t obu_header) { … }
int MaxFragmentSize(int remaining_bytes) { … }
}
RtpPacketizerAv1::RtpPacketizerAv1(rtc::ArrayView<const uint8_t> payload,
RtpPacketizer::PayloadSizeLimits limits,
VideoFrameType frame_type,
bool is_last_frame_in_picture,
bool even_distribution)
: … { … }
std::vector<RtpPacketizerAv1::Obu> RtpPacketizerAv1::ParseObus(
rtc::ArrayView<const uint8_t> payload) { … }
int RtpPacketizerAv1::AdditionalBytesForPreviousObuElement(
const Packet& packet) { … }
std::vector<RtpPacketizerAv1::Packet> RtpPacketizerAv1::Packetize(
rtc::ArrayView<const Obu> obus,
PayloadSizeLimits limits) { … }
std::vector<RtpPacketizerAv1::Packet> RtpPacketizerAv1::PacketizeAboutEqually(
rtc::ArrayView<const Obu> obus,
PayloadSizeLimits limits) { … }
uint8_t RtpPacketizerAv1::AggregationHeader() const { … }
bool RtpPacketizerAv1::NextPacket(RtpPacketToSend* packet) { … }
}