#include "call/rtp_payload_params.h"
#include <stddef.h>
#include <algorithm>
#include "absl/container/inlined_vector.h"
#include "absl/strings/match.h"
#include "absl/types/variant.h"
#include "api/video/video_timing.h"
#include "modules/video_coding/codecs/h264/include/h264_globals.h"
#include "modules/video_coding/codecs/interface/common_constants.h"
#include "modules/video_coding/codecs/vp8/include/vp8_globals.h"
#include "modules/video_coding/codecs/vp9/include/vp9_globals.h"
#include "modules/video_coding/frame_dependencies_calculator.h"
#include "rtc_base/arraysize.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/random.h"
#include "rtc_base/time_utils.h"
namespace webrtc {
namespace {
constexpr int kMaxSimulatedSpatialLayers = …;
void PopulateRtpWithCodecSpecifics(const CodecSpecificInfo& info,
absl::optional<int> spatial_index,
RTPVideoHeader* rtp) { … }
void SetVideoTiming(const EncodedImage& image, VideoSendTiming* timing) { … }
FrameDependencyStructure MinimalisticStructure(int num_spatial_layers,
int num_temporal_layers) { … }
}
RtpPayloadParams::RtpPayloadParams(const uint32_t ssrc,
const RtpPayloadState* state,
const FieldTrialsView& trials)
: … { … }
RtpPayloadParams::RtpPayloadParams(const RtpPayloadParams& other) = default;
RtpPayloadParams::~RtpPayloadParams() { … }
RTPVideoHeader RtpPayloadParams::GetRtpVideoHeader(
const EncodedImage& image,
const CodecSpecificInfo* codec_specific_info,
absl::optional<int64_t> shared_frame_id) { … }
uint32_t RtpPayloadParams::ssrc() const { … }
RtpPayloadState RtpPayloadParams::state() const { … }
void RtpPayloadParams::SetCodecSpecific(RTPVideoHeader* rtp_video_header,
bool first_frame_in_picture) { … }
RTPVideoHeader::GenericDescriptorInfo
RtpPayloadParams::GenericDescriptorFromFrameInfo(
const GenericFrameInfo& frame_info,
int64_t frame_id) { … }
void RtpPayloadParams::SetGeneric(const CodecSpecificInfo* codec_specific_info,
int64_t frame_id,
bool is_keyframe,
RTPVideoHeader* rtp_video_header) { … }
absl::optional<FrameDependencyStructure> RtpPayloadParams::GenericStructure(
const CodecSpecificInfo* codec_specific_info) { … }
void RtpPayloadParams::GenericToGeneric(int64_t frame_id,
bool is_keyframe,
RTPVideoHeader* rtp_video_header) { … }
void RtpPayloadParams::H264ToGeneric(const CodecSpecificInfoH264& h264_info,
int64_t frame_id,
bool is_keyframe,
RTPVideoHeader* rtp_video_header) { … }
void RtpPayloadParams::Vp8ToGeneric(const CodecSpecificInfoVP8& vp8_info,
int64_t frame_id,
bool is_keyframe,
RTPVideoHeader* rtp_video_header) { … }
void RtpPayloadParams::Vp9ToGeneric(const CodecSpecificInfoVP9& vp9_info,
int64_t frame_id,
RTPVideoHeader& rtp_video_header) { … }
void RtpPayloadParams::SetDependenciesVp8Deprecated(
const CodecSpecificInfoVP8& vp8_info,
int64_t frame_id,
bool is_keyframe,
int spatial_index,
int temporal_index,
bool layer_sync,
RTPVideoHeader::GenericDescriptorInfo* generic) { … }
void RtpPayloadParams::SetDependenciesVp8New(
const CodecSpecificInfoVP8& vp8_info,
int64_t frame_id,
bool is_keyframe,
bool layer_sync,
RTPVideoHeader::GenericDescriptorInfo* generic) { … }
}