#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <stdint.h>
#include <memory>
#include "base/logging.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/test/simple_test_tick_clock.h"
#include "base/test/test_message_loop.h"
#include "base/time/time.h"
#include "media/audio/alsa/alsa_output.h"
#include "media/audio/alsa/alsa_wrapper.h"
#include "media/audio/alsa/audio_manager_alsa.h"
#include "media/audio/alsa/mock_alsa_wrapper.h"
#include "media/audio/fake_audio_log_factory.h"
#include "media/audio/mock_audio_source_callback.h"
#include "media/audio/test_audio_thread.h"
#include "media/base/audio_timestamp_helper.h"
#include "media/base/channel_layout.h"
#include "media/base/data_buffer.h"
#include "media/base/seekable_buffer.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
AllOf;
AtLeast;
DoAll;
Field;
InSequence;
Invoke;
InvokeWithoutArgs;
Mock;
MockFunction;
Return;
SetArgPointee;
StrictMock;
StrEq;
Unused;
namespace media {
class MockAudioManagerAlsa : public AudioManagerAlsa { … };
class AlsaPcmOutputStreamTest : public testing::Test { … };
const ChannelLayout AlsaPcmOutputStreamTest::kTestChannelLayout = …;
const int AlsaPcmOutputStreamTest::kTestSampleRate = …;
const int AlsaPcmOutputStreamTest::kTestBitsPerSample = …;
const int AlsaPcmOutputStreamTest::kTestBytesPerFrame = …;
const AudioParameters::Format AlsaPcmOutputStreamTest::kTestFormat = …;
const char AlsaPcmOutputStreamTest::kTestDeviceName[] = …;
const char AlsaPcmOutputStreamTest::kDummyMessage[] = …;
const uint32_t AlsaPcmOutputStreamTest::kTestFramesPerPacket = …;
const int AlsaPcmOutputStreamTest::kTestPacketSize = …;
const int AlsaPcmOutputStreamTest::kTestFailedErrno = …;
snd_pcm_t* const AlsaPcmOutputStreamTest::kFakeHandle = …;
char AlsaPcmOutputStreamTest::kSurround40[] = …;
char AlsaPcmOutputStreamTest::kSurround41[] = …;
char AlsaPcmOutputStreamTest::kSurround50[] = …;
char AlsaPcmOutputStreamTest::kSurround51[] = …;
char AlsaPcmOutputStreamTest::kSurround70[] = …;
char AlsaPcmOutputStreamTest::kSurround71[] = …;
void* AlsaPcmOutputStreamTest::kFakeHints[] = …;
char AlsaPcmOutputStreamTest::kGenericSurround50[] = …;
ACTION(ClearBuffer) { … }
TEST_F(AlsaPcmOutputStreamTest, ConstructedState) { … }
TEST_F(AlsaPcmOutputStreamTest, LatencyFloor) { … }
TEST_F(AlsaPcmOutputStreamTest, OpenClose) { … }
TEST_F(AlsaPcmOutputStreamTest, PcmOpenFailed) { … }
TEST_F(AlsaPcmOutputStreamTest, PcmSetParamsFailed) { … }
TEST_F(AlsaPcmOutputStreamTest, StartStop) { … }
TEST_F(AlsaPcmOutputStreamTest, WritePacket_FinishedPacket) { … }
TEST_F(AlsaPcmOutputStreamTest, WritePacket_NormalPacket) { … }
TEST_F(AlsaPcmOutputStreamTest, WritePacket_WriteFails) { … }
TEST_F(AlsaPcmOutputStreamTest, WritePacket_StopStream) { … }
TEST_F(AlsaPcmOutputStreamTest, BufferPacket) { … }
TEST_F(AlsaPcmOutputStreamTest, BufferPacket_Negative) { … }
TEST_F(AlsaPcmOutputStreamTest, BufferPacket_Underrun) { … }
TEST_F(AlsaPcmOutputStreamTest, BufferPacket_FullBuffer) { … }
TEST_F(AlsaPcmOutputStreamTest, AutoSelectDevice_DeviceSelect) { … }
TEST_F(AlsaPcmOutputStreamTest, AutoSelectDevice_FallbackDevices) { … }
TEST_F(AlsaPcmOutputStreamTest, AutoSelectDevice_HintFail) { … }
TEST_F(AlsaPcmOutputStreamTest, BufferPacket_StopStream) { … }
TEST_F(AlsaPcmOutputStreamTest, ScheduleNextWrite) { … }
TEST_F(AlsaPcmOutputStreamTest, ScheduleNextWrite_StopStream) { … }
}