#include "modules/rtp_rtcp/source/rtp_format_h264.h"
#include <string.h>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <memory>
#include <utility>
#include <vector>
#include "absl/algorithm/container.h"
#include "absl/types/optional.h"
#include "absl/types/variant.h"
#include "common_video/h264/h264_common.h"
#include "common_video/h264/pps_parser.h"
#include "common_video/h264/sps_parser.h"
#include "common_video/h264/sps_vui_rewriter.h"
#include "modules/rtp_rtcp/source/byte_io.h"
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
namespace webrtc {
namespace {
static const size_t kNalHeaderSize = …;
static const size_t kFuAHeaderSize = …;
static const size_t kLengthFieldSize = …;
}
RtpPacketizerH264::RtpPacketizerH264(rtc::ArrayView<const uint8_t> payload,
PayloadSizeLimits limits,
H264PacketizationMode packetization_mode)
: … { … }
RtpPacketizerH264::~RtpPacketizerH264() = default;
size_t RtpPacketizerH264::NumPackets() const { … }
bool RtpPacketizerH264::GeneratePackets(
H264PacketizationMode packetization_mode) { … }
bool RtpPacketizerH264::PacketizeFuA(size_t fragment_index) { … }
size_t RtpPacketizerH264::PacketizeStapA(size_t fragment_index) { … }
bool RtpPacketizerH264::PacketizeSingleNalu(size_t fragment_index) { … }
bool RtpPacketizerH264::NextPacket(RtpPacketToSend* rtp_packet) { … }
void RtpPacketizerH264::NextAggregatePacket(RtpPacketToSend* rtp_packet) { … }
void RtpPacketizerH264::NextFragmentPacket(RtpPacketToSend* rtp_packet) { … }
}