chromium/third_party/blink/renderer/modules/mediastream/media_stream_audio_processor.cc

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

#include "third_party/blink/renderer/modules/mediastream/media_stream_audio_processor.h"

#include <memory>
#include <optional>
#include <string_view>

#include "base/memory/raw_ptr.h"
#include "base/task/single_thread_task_runner.h"
#include "build/build_config.h"
#include "media/base/audio_parameters.h"
#include "third_party/blink/public/platform/modules/webrtc/webrtc_logging.h"
#include "third_party/blink/renderer/modules/webrtc/webrtc_audio_device_impl.h"
#include "third_party/blink/renderer/platform/mediastream/aec_dump_agent_impl.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"

namespace blink {
namespace {
void WebRtcLogStringPiece(std::string_view message) {}
}  // namespace

// Subscribes a sink to the playout data source for the duration of the
// PlayoutListener lifetime.
class MediaStreamAudioProcessor::PlayoutListener {};

MediaStreamAudioProcessor::MediaStreamAudioProcessor(
    DeliverProcessedAudioCallback deliver_processed_audio_callback,
    const media::AudioProcessingSettings& settings,
    const media::AudioParameters& capture_data_source_params,
    scoped_refptr<WebRtcAudioDeviceImpl> playout_data_source)
    :{}

MediaStreamAudioProcessor::~MediaStreamAudioProcessor() {}

void MediaStreamAudioProcessor::ProcessCapturedAudio(
    const media::AudioBus& audio_source,
    base::TimeTicks audio_capture_time,
    int num_preferred_channels,
    double volume,
    bool key_pressed) {}

void MediaStreamAudioProcessor::Stop() {}

const media::AudioParameters&
MediaStreamAudioProcessor::GetInputFormatForTesting() const {}

void MediaStreamAudioProcessor::OnStartDump(base::File dump_file) {}

void MediaStreamAudioProcessor::OnStopDump() {}

// static
// TODO(https://crbug.com/1269364): This logic should be moved to
// ProcessedLocalAudioSource and verified/fixed; The decision should be
// "hardware effects are required or software audio mofidications are needed
// (AudioProcessingSettings.NeedAudioModification())".
bool MediaStreamAudioProcessor::WouldModifyAudio(
    const AudioProcessingProperties& properties) {}

void MediaStreamAudioProcessor::OnPlayoutData(media::AudioBus* audio_bus,
                                              int sample_rate,
                                              base::TimeDelta audio_delay) {}

void MediaStreamAudioProcessor::OnPlayoutDataSourceChanged() {}

void MediaStreamAudioProcessor::OnRenderThreadChanged() {}

webrtc::AudioProcessorInterface::AudioProcessorStatistics
MediaStreamAudioProcessor::GetStats(bool has_remote_tracks) {}

}  // namespace blink