|
Android-cuttlefish cvd tool
|
#include "cuttlefish/host/frontend/webrtc/audio_handler.h"#include <gtest/gtest.h>#include <cstddef>#include <cstdint>#include <cstring>#include <memory>#include <utility>#include <vector>#include "cuttlefish/common/libs/fs/shared_fd.h"#include "cuttlefish/common/libs/utils/cf_endian.h"#include "cuttlefish/host/frontend/webrtc/audio_settings.h"#include "cuttlefish/host/frontend/webrtc/libcommon/audio_source.h"#include "cuttlefish/host/frontend/webrtc/libdevice/audio_frame_buffer.h"#include "cuttlefish/host/frontend/webrtc/libdevice/audio_sink.h"#include "cuttlefish/host/libs/audio_connector/buffers.h"#include "cuttlefish/host/libs/audio_connector/commands.h"#include "cuttlefish/host/libs/audio_connector/server.h"#include "cuttlefish/host/libs/audio_connector/shm_layout.h"
Classes | |
| class | cuttlefish::anonymous_namespace{audio_handler_test.cpp}::FakeAudioSource |
| class | cuttlefish::anonymous_namespace{audio_handler_test.cpp}::NullAudioSink |
Namespaces | |
| namespace | cuttlefish |
| namespace | cuttlefish::anonymous_namespace{audio_handler_test.cpp} |
Functions | |
| std::vector< AudioStreamSettings > | cuttlefish::anonymous_namespace{audio_handler_test.cpp}::StreamSettings (bool virtual_tuner) |
| std::unique_ptr< AudioHandler > | cuttlefish::anonymous_namespace{audio_handler_test.cpp}::CreateHandler (std::shared_ptr< webrtc_streaming::AudioSource > default_source, const std::vector< AudioStreamSettings > &stream_settings) |
| std::unique_ptr< AudioHandler > | cuttlefish::anonymous_namespace{audio_handler_test.cpp}::CreateHandler (std::shared_ptr< webrtc_streaming::AudioSource > default_source, std::shared_ptr< webrtc_streaming::AudioSource > tuner_source, const std::vector< AudioStreamSettings > &stream_settings) |
| void | cuttlefish::anonymous_namespace{audio_handler_test.cpp}::StartStream (AudioHandler &handler, uint32_t stream_id) |
| void | cuttlefish::anonymous_namespace{audio_handler_test.cpp}::ConfigureAndStart (AudioHandler &handler, uint32_t stream_id) |
| std::vector< int16_t > | cuttlefish::anonymous_namespace{audio_handler_test.cpp}::Capture (AudioHandler &handler, uint32_t stream_id) |
| std::vector< int16_t > | cuttlefish::anonymous_namespace{audio_handler_test.cpp}::CaptureSized (AudioHandler &handler, uint32_t stream_id, size_t size) |
| cuttlefish::anonymous_namespace{audio_handler_test.cpp}::TEST (AudioHandlerCaptureTest, LeftoverLargerThanBufferStaysInBounds) | |
| cuttlefish::anonymous_namespace{audio_handler_test.cpp}::TEST (AudioHandlerRoutingTest, TunerStreamUsesTunerSource) | |
| cuttlefish::anonymous_namespace{audio_handler_test.cpp}::TEST (AudioHandlerRoutingTest, WithoutTunerAllCaptureStreamsUseDefaultSource) | |
| cuttlefish::anonymous_namespace{audio_handler_test.cpp}::TEST (AudioHandlerRoutingTest, StartStreamResetsOnlyThatStreamsSource) | |
| cuttlefish::anonymous_namespace{audio_handler_test.cpp}::TEST (AudioHandlerRoutingDeathTest, RejectsTunerStreamWithoutTunerSource) | |
| cuttlefish::anonymous_namespace{audio_handler_test.cpp}::TEST (AudioHandlerRoutingDeathTest, RejectsPlaybackTunerStream) | |
Variables | |
| constexpr uint32_t | cuttlefish::anonymous_namespace{audio_handler_test.cpp}::kFirstCaptureStreamId = 0 |
| constexpr uint32_t | cuttlefish::anonymous_namespace{audio_handler_test.cpp}::kSecondCaptureStreamId = 1 |
| constexpr uint32_t | cuttlefish::anonymous_namespace{audio_handler_test.cpp}::kPlaybackStreamId = 2 |
| constexpr int | cuttlefish::anonymous_namespace{audio_handler_test.cpp}::kChannels = 2 |
| constexpr size_t | cuttlefish::anonymous_namespace{audio_handler_test.cpp}::kSamplesPer10Ms = 480 |
| constexpr size_t | cuttlefish::anonymous_namespace{audio_handler_test.cpp}::k10MsBytes = kSamplesPer10Ms * kChannels * sizeof(int16_t) |
| constexpr int16_t | cuttlefish::anonymous_namespace{audio_handler_test.cpp}::kDefaultSample = 1111 |
| constexpr int16_t | cuttlefish::anonymous_namespace{audio_handler_test.cpp}::kTunerSample = 2222 |