chromium/media/muxers/muxer_timestamp_adapter_unittest.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/muxers/muxer_timestamp_adapter.h"

#include <map>
#include <memory>
#include <string_view>

#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "media/base/audio_parameters.h"
#include "media/muxers/muxer.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace media {
namespace {

_;
AllOf;
AtLeast;
ElementsAre;
Field;
InSequence;
Mock;
Pair;
Return;
Sequence;
StrEq;
VariantWith;

constexpr int kAudio =;
constexpr int kVideo =;

MediaTimestamps;

struct TestParams {};

class MockMuxer : public Muxer {};

class SuccessfulMuxer : public Muxer {};

class MuxerTimestampAdapterTestBase {};

class MuxerTimestampAdapterTest : public MuxerTimestampAdapterTestBase,
                                  public ::testing::Test {};

TEST_F(MuxerTimestampAdapterTest, ForwardsAudioSamples) {}

TEST_F(MuxerTimestampAdapterTest, ForwardsVideoSamples) {}

TEST_F(MuxerTimestampAdapterTest, ForwardsAudioVideoSamples) {}

TEST_F(MuxerTimestampAdapterTest, HandlesMuxerErrorInAudioThenVideo) {}

TEST_F(MuxerTimestampAdapterTest, HandlesMuxerErrorInVideoThenAudio) {}

TEST_F(MuxerTimestampAdapterTest, IgnoresEmptyVideoFrame) {}

TEST_F(MuxerTimestampAdapterTest, VideoKeptWhileWaitingForAudio) {}

TEST_F(MuxerTimestampAdapterTest, CompensatesForPausedTimeWithVideo) {}

TEST_F(MuxerTimestampAdapterTest, CompensatesForPausedTimeWithAudio) {}

TEST_F(MuxerTimestampAdapterTest, CompensatesForPausedTimeWithAudioAndVideo) {}

TEST_F(MuxerTimestampAdapterTest, ReleasesAudioDataWhileVideoMuted) {}

TEST_F(MuxerTimestampAdapterTest, ReleasesVideoDataWhileAudioMuted) {}

class MuxerTimestampAdapterParametrizedTest
    : public MuxerTimestampAdapterTestBase,
      public ::testing::TestWithParam<TestParams> {};

TEST_P(MuxerTimestampAdapterParametrizedTest, CallsFlushOnDestruction) {}

TEST_P(MuxerTimestampAdapterParametrizedTest, ForwardsFlush) {}

const TestParams kTestCases[] =;

INSTANTIATE_TEST_SUITE_P();

}  // namespace
}  // namespace media