chromium/media/audio/audio_device_stats_reporter.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "media/audio/audio_device_stats_reporter.h"
#include "base/check.h"
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "base/metrics/histogram_base.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/strcat.h"
#include "base/time/time.h"

namespace media {
AudioDeviceStatsReporter::AudioDeviceStatsReporter(
    const AudioParameters& params,
    Type type)
    :{}

void AudioDeviceStatsReporter::ReportCallback(
    base::TimeDelta delay,
    const media::AudioGlitchInfo& glitch_info) {}

AudioDeviceStatsReporter::~AudioDeviceStatsReporter() {}

void AudioDeviceStatsReporter::UploadStats(const Stats& stats,
                                           SamplingPeriod sampling_period) {}

// Used to generate callbacks for:
// Media.AudioOutputDevice.AudioServiceGlitchCount.*.*
// Media.AudioOutputDevice.AudioServiceDroppedAudio.*.*
// Media.AudioInputDevice.AudioServiceGlitchCount.*
// Media.AudioInputDevice.AudioServiceDroppedAudio.*
// |latency| is ignored for input.
AudioDeviceStatsReporter::AggregateLogCallback
AudioDeviceStatsReporter::CreateAggregateCallback(
    const std::string& stat_name,
    media::AudioLatency::Type latency,
    int max_value,
    size_t bucket_count,
    Type type) {}

// Used to generate callbacks for:
// Media.AudioOutputDevice.AudioServiceDelay.*
// Media.AudioInputDevice.AudioServiceDelay.*
// |latency| is ignored for input.
AudioDeviceStatsReporter::RealtimeLogCallback
AudioDeviceStatsReporter::CreateRealtimeCallback(
    const std::string& stat_name,
    media::AudioLatency::Type latency,
    int max_value,
    size_t bucket_count,
    Type type) {}

}  // namespace media