#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "media/capabilities/webrtc_video_stats_db.h"
#include "base/check_op.h"
#include "base/format_macros.h"
#include "base/metrics/field_trial_params.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "media/base/media_switches.h"
#include "media/capabilities/bucket_utility.h"
namespace media {
namespace {
constexpr int kMaxDaysToKeepStatsDefault = …;
constexpr int kMaxEntriesPerConfigDefault = …;
constexpr char kMaxDaysToKeepStatsParamName[] = …;
constexpr char kMaxEntriesPerConfigParamName[] = …;
VideoCodecProfile GetWebrtcCodecProfileBucket(VideoCodecProfile codec_profile) { … }
}
WebrtcVideoStatsDB::VideoDescKey
WebrtcVideoStatsDB::VideoDescKey::MakeBucketedKey(
bool is_decode_stats,
VideoCodecProfile codec_profile,
bool hardware_accelerated,
int pixels) { … }
WebrtcVideoStatsDB::VideoDescKey::VideoDescKey(bool is_decode_stats,
VideoCodecProfile codec_profile,
bool hardware_accelerated,
int pixels)
: … { … }
std::string WebrtcVideoStatsDB::VideoDescKey::Serialize() const { … }
std::string WebrtcVideoStatsDB::VideoDescKey::SerializeWithoutPixels() const { … }
std::string WebrtcVideoStatsDB::VideoDescKey::ToLogStringForDebug() const { … }
std::optional<int> WebrtcVideoStatsDB::VideoDescKey::ParsePixelsFromKey(
std::string key) { … }
WebrtcVideoStatsDB::VideoStats::VideoStats(double timestamp,
uint32_t frames_processed,
uint32_t key_frames_processed,
float p99_processing_time_ms)
: … { … }
WebrtcVideoStatsDB::VideoStats::VideoStats(uint32_t frames_processed,
uint32_t key_frames_processed,
float p99_processing_time_ms)
: … { … }
WebrtcVideoStatsDB::VideoStats::VideoStats(const VideoStats& entry) = default;
WebrtcVideoStatsDB::VideoStats& WebrtcVideoStatsDB::VideoStats::operator=(
const VideoStats& entry) = default;
std::string WebrtcVideoStatsDB::VideoStats::ToLogString() const { … }
bool operator==(const WebrtcVideoStatsDB::VideoDescKey& x,
const WebrtcVideoStatsDB::VideoDescKey& y) { … }
bool operator!=(const WebrtcVideoStatsDB::VideoDescKey& x,
const WebrtcVideoStatsDB::VideoDescKey& y) { … }
bool operator==(const WebrtcVideoStatsDB::VideoStats& x,
const WebrtcVideoStatsDB::VideoStats& y) { … }
bool operator!=(const WebrtcVideoStatsDB::VideoStats& x,
const WebrtcVideoStatsDB::VideoStats& y) { … }
base::TimeDelta WebrtcVideoStatsDB::GetMaxTimeToKeepStats() { … }
int WebrtcVideoStatsDB::GetMaxEntriesPerConfig() { … }
}