chromium/third_party/blink/renderer/modules/mediarecorder/audio_track_opus_encoder.cc

// Copyright 2017 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/mediarecorder/audio_track_opus_encoder.h"

#include <memory>
#include <optional>

#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
#include "base/time/time.h"
#include "media/base/audio_sample_types.h"
#include "media/base/audio_timestamp_helper.h"

namespace {

enum : int {};

// The amount of Frames in a 60 ms buffer @ 48000 samples/second.
const int kOpusPreferredFramesPerBuffer =;

// Tries to encode |data_in|'s |num_samples| into |data_out|.
bool DoEncode(OpusEncoder* opus_encoder,
              float* data_in,
              int num_samples,
              std::string* data_out) {}

}  // anonymous namespace

namespace blink {

AudioTrackOpusEncoder::AudioTrackOpusEncoder(
    OnEncodedAudioCB on_encoded_audio_cb,
    uint32_t bits_per_second,
    bool vbr_enabled)
    :{}

AudioTrackOpusEncoder::~AudioTrackOpusEncoder() {}

double AudioTrackOpusEncoder::ProvideInput(
    media::AudioBus* audio_bus,
    uint32_t frames_delayed,
    const media::AudioGlitchInfo& glitch_info) {}

void AudioTrackOpusEncoder::OnSetFormat(
    const media::AudioParameters& input_params) {}

void AudioTrackOpusEncoder::EncodeAudio(
    std::unique_ptr<media::AudioBus> input_bus,
    base::TimeTicks capture_time) {}

void AudioTrackOpusEncoder::DestroyExistingOpusEncoder() {}

}  // namespace blink