chromium/third_party/webrtc/modules/audio_processing/aec3/multi_channel_content_detector.cc

/*
 *  Copyright (c) 2022 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#include "modules/audio_processing/aec3/multi_channel_content_detector.h"

#include <cmath>

#include "rtc_base/checks.h"
#include "system_wrappers/include/metrics.h"

namespace webrtc {

namespace {

constexpr int kNumFramesPerSecond =;

// Compares the left and right channels in the render `frame` to determine
// whether the signal is a proper stereo signal. To allow for differences
// introduced by hardware drivers, a threshold `detection_threshold` is used for
// the detection.
bool HasStereoContent(const std::vector<std::vector<std::vector<float>>>& frame,
                      float detection_threshold) {}

// In order to avoid logging metrics for very short lifetimes that are unlikely
// to reflect real calls and that may dilute the "real" data, logging is limited
// to lifetimes of at leats 5 seconds.
constexpr int kMinNumberOfFramesRequiredToLogMetrics =;

// Continuous metrics are logged every 10 seconds.
constexpr int kFramesPer10Seconds =;

}  // namespace

MultiChannelContentDetector::MetricsLogger::MetricsLogger() {}

MultiChannelContentDetector::MetricsLogger::~MetricsLogger() {}

void MultiChannelContentDetector::MetricsLogger::Update(
    bool persistent_multichannel_content_detected) {}

MultiChannelContentDetector::MultiChannelContentDetector(
    bool detect_stereo_content,
    int num_render_input_channels,
    float detection_threshold,
    int stereo_detection_timeout_threshold_seconds,
    float stereo_detection_hysteresis_seconds)
    :{}

bool MultiChannelContentDetector::UpdateDetection(
    const std::vector<std::vector<std::vector<float>>>& frame) {}

}  // namespace webrtc