#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "media/filters/ffmpeg_glue.h"
#include <stdint.h>
#include <memory>
#include "base/check.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "build/chromeos_buildflags.h"
#include "media/base/container_names.h"
#include "media/base/media_switches.h"
#include "media/base/mock_filters.h"
#include "media/base/test_data_util.h"
#include "media/ffmpeg/ffmpeg_common.h"
#include "media/ffmpeg/ffmpeg_deleters.h"
#include "media/filters/in_memory_url_protocol.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
DoAll;
InSequence;
Return;
SetArgPointee;
StrictMock;
namespace media {
class MockProtocol : public FFmpegURLProtocol { … };
class FFmpegGlueTest : public ::testing::Test { … };
class FFmpegGlueDestructionTest : public ::testing::Test { … };
class FFmpegGlueContainerTest : public FFmpegGlueDestructionTest { … };
TEST_F(FFmpegGlueTest, Write) { … }
TEST_F(FFmpegGlueTest, Read) { … }
TEST_F(FFmpegGlueTest, Seek) { … }
TEST_F(FFmpegGlueDestructionTest, WithoutOpen) { … }
TEST_F(FFmpegGlueDestructionTest, WithOpenFailure) { … }
TEST_F(FFmpegGlueDestructionTest, WithOpenNoStreams) { … }
TEST_F(FFmpegGlueDestructionTest, WithOpenWithStreams) { … }
TEST_F(FFmpegGlueDestructionTest, WithOpenWithOpenStreams) { … }
TEST_F(FFmpegGlueContainerTest, OGG) { … }
TEST_F(FFmpegGlueContainerTest, WEBM) { … }
TEST_F(FFmpegGlueContainerTest, FLAC) { … }
TEST_F(FFmpegGlueContainerTest, WAV) { … }
TEST_F(FFmpegGlueContainerTest, MP3) { … }
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
TEST_F(FFmpegGlueContainerTest, MOV) {
InitializeAndOpen("sfx.m4a");
ExpectContainer(container_names::MediaContainerName::kContainerMOV);
}
TEST_F(FFmpegGlueContainerTest, AAC) {
InitializeAndOpen("sfx.adts");
ExpectContainer(container_names::MediaContainerName::kContainerAAC);
}
#endif
TEST_F(FFmpegGlueContainerTest, FLV) { … }
}