#include "media/cast/openscreen/config_conversions.h"
#include "base/containers/contains.h"
#include "media/base/media_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/openscreen/src/cast/streaming/capture_configs.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
namespace media::cast {
namespace {
void ValidateAudioConfig(const media::AudioDecoderConfig& config,
const media::AudioDecoderConfig& expected) { … }
void ValidateAudioConfig(const openscreen::cast::AudioCaptureConfig& config,
const openscreen::cast::AudioCaptureConfig& expected) { … }
void ValidateVideoConfig(const media::VideoDecoderConfig& config,
const media::VideoDecoderConfig& expected) { … }
void ValidateVideoConfig(const openscreen::cast::VideoCaptureConfig& config,
const openscreen::cast::VideoCaptureConfig& expected) { … }
openscreen::cast::AudioCaptureConfig CreateAudioCaptureConfig() { … }
media::AudioDecoderConfig CreateAudioDecoderConfig(
media::AudioCodec codec,
media::ChannelLayout channel_layout,
int samples_per_second) { … }
openscreen::cast::VideoCaptureConfig CreateVideoCaptureConfig() { … }
media::VideoDecoderConfig CreateVideoDecoderConfig(
media::VideoCodec codec,
media::VideoCodecProfile codec_profile,
int width,
int height) { … }
}
TEST(ConfigConversionsTest, AudioConfigCodecConversion) { … }
TEST(ConfigConversionsTest, AudioConfigChannelsConversion) { … }
TEST(ConfigConversionsTest, AudioConfigSampleRateConversion) { … }
TEST(ConfigConversionsTest, VideoConfigCodecConversion) { … }
TEST(ConfigConversionsTest, VideoConfigResolutionConversion) { … }
}