chromium/media/cast/encoding/audio_encoder_unittest.cc

// Copyright 2014 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/cast/encoding/audio_encoder.h"

#include <stddef.h>
#include <stdint.h>

#include <memory>
#include <sstream>
#include <string>

#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "media/base/audio_bus.h"
#include "media/base/audio_codecs.h"
#include "media/base/fake_single_thread_task_runner.h"
#include "media/base/media.h"
#include "media/base/video_codecs.h"
#include "media/cast/cast_config.h"
#include "media/cast/cast_environment.h"
#include "media/cast/common/rtp_time.h"
#include "media/cast/common/sender_encoded_frame.h"
#include "media/cast/test/utility/audio_utility.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/openscreen/src/cast/streaming/encoded_frame.h"

namespace media {
namespace cast {

static const int kNumChannels =;

namespace {

class TestEncodedAudioFrameReceiver {};

struct TestScenario {};

}  // namespace

class AudioEncoderTest : public ::testing::TestWithParam<TestScenario> {};

TEST_P(AudioEncoderTest, EncodeOpus) {}

#if BUILDFLAG(IS_MAC)
TEST_P(AudioEncoderTest, EncodeAac) {
  RunTestForCodec(AudioCodec::kAAC);
}
#endif

static const int64_t kOneCall_3Millis[] =;
static const int64_t kOneCall_10Millis[] =;
static const int64_t kOneCall_13Millis[] =;
static const int64_t kOneCall_20Millis[] =;

static const int64_t kTwoCalls_3Millis[] =;
static const int64_t kTwoCalls_10Millis[] =;
static const int64_t kTwoCalls_Mixed1[] =;
static const int64_t kTwoCalls_Mixed2[] =;
static const int64_t kTwoCalls_Mixed3[] =;
static const int64_t kTwoCalls_Mixed4[] =;

static const int64_t kManyCalls_3Millis[] =;
static const int64_t kManyCalls_10Millis[] =;
static const int64_t kManyCalls_Mixed1[] =;
static const int64_t kManyCalls_Mixed2[] =;
static const int64_t kManyCalls_Mixed3[] =;
static const int64_t kManyCalls_Mixed4[] =;
static const int64_t kManyCalls_Mixed5[] =;

static const int64_t kOneBigUnderrun[] =;
static const int64_t kTwoBigUnderruns[] =;
static const int64_t kMixedUnderruns[] =;

INSTANTIATE_TEST_SUITE_P();

}  // namespace cast
}  // namespace media