#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "media/mojo/common/media_type_converters.h"
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <memory>
#include "media/base/audio_buffer.h"
#include "media/base/audio_decoder_config.h"
#include "media/base/decoder_buffer.h"
#include "media/base/decrypt_config.h"
#include "media/base/encryption_pattern.h"
#include "media/base/encryption_scheme.h"
#include "media/base/sample_format.h"
#include "media/base/test_helpers.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace media {
namespace {
void CompareBytes(uint8_t* original_data, uint8_t* result_data, size_t length) { … }
void CompareAudioBuffers(SampleFormat sample_format,
const AudioBuffer& original,
const AudioBuffer& result) { … }
}
TEST(MediaTypeConvertersTest, ConvertDecoderBuffer_Normal) { … }
TEST(MediaTypeConvertersTest, ConvertDecoderBuffer_EOS) { … }
TEST(MediaTypeConvertersTest, ConvertDecoderBuffer_KeyFrame) { … }
TEST(MediaTypeConvertersTest, ConvertDecoderBuffer_CencEncryptedBuffer) { … }
TEST(MediaTypeConvertersTest, ConvertDecoderBuffer_CbcsEncryptedBuffer) { … }
TEST(MediaTypeConvertersTest, ConvertAudioBuffer_EOS) { … }
TEST(MediaTypeConvertersTest, ConvertAudioBuffer_MONO) { … }
TEST(MediaTypeConvertersTest, ConvertAudioBuffer_FLOAT) { … }
}