#ifndef MEDIA_BASE_RTP_UTILS_H_
#define MEDIA_BASE_RTP_UTILS_H_
#include <cstdint>
#include "absl/strings/string_view.h"
#include "api/array_view.h"
#include "rtc_base/byte_order.h"
#include "rtc_base/system/rtc_export.h"
namespace rtc {
struct PacketTimeUpdateParams;
}
namespace cricket {
const size_t kMinRtpPacketLen = …;
const size_t kMaxRtpPacketLen = …;
const size_t kMinRtcpPacketLen = …;
enum RtcpTypes { … };
enum class RtpPacketType { … };
bool GetRtcpType(const void* data, size_t len, int* value);
bool GetRtcpSsrc(const void* data, size_t len, uint32_t* value);
RtpPacketType InferRtpPacketType(rtc::ArrayView<const uint8_t> packet);
bool IsValidRtpPayloadType(int payload_type);
bool IsValidRtpPacketSize(RtpPacketType packet_type, size_t size);
absl::string_view RtpPacketTypeToString(RtpPacketType packet_type);
bool RTC_EXPORT ValidateRtpHeader(const uint8_t* rtp,
size_t length,
size_t* header_length);
bool UpdateRtpAbsSendTimeExtension(uint8_t* rtp,
size_t length,
int extension_id,
uint64_t time_us);
bool RTC_EXPORT
ApplyPacketOptions(uint8_t* data,
size_t length,
const rtc::PacketTimeUpdateParams& packet_time_params,
uint64_t time_us);
}
#endif