#include "third_party/blink/renderer/platform/mediastream/media_stream_source.h"
#include "base/synchronization/lock.h"
#include "third_party/blink/public/platform/modules/webrtc/webrtc_logging.h"
#include "third_party/blink/renderer/platform/audio/audio_bus.h"
#include "third_party/blink/renderer/platform/heap/persistent.h"
#include "third_party/blink/renderer/platform/mediastream/media_constraints_consts.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_audio_source.h"
#include "third_party/blink/renderer/platform/mediastream/webaudio_destination_consumer.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"
#include "ui/display/types/display_constants.h"
namespace blink {
namespace {
void SendLogMessage(const std::string& message) { … }
const char* StreamTypeToString(MediaStreamSource::StreamType type) { … }
const char* ReadyStateToString(MediaStreamSource::ReadyState state) { … }
const char* EchoCancellationModeToString(
MediaStreamSource::EchoCancellationMode mode) { … }
void GetSourceSettings(const blink::WebMediaStreamSource& web_source,
MediaStreamTrackPlatform::Settings& settings) { … }
}
MediaStreamSource::ConsumerWrapper::ConsumerWrapper(
WebAudioDestinationConsumer* consumer)
: … { … }
void MediaStreamSource::ConsumerWrapper::SetFormat(int number_of_channels,
float sample_rate) { … }
void MediaStreamSource::ConsumerWrapper::ConsumeAudio(AudioBus* bus,
int number_of_frames) { … }
MediaStreamSource::MediaStreamSource(
const String& id,
StreamType type,
const String& name,
bool remote,
std::unique_ptr<WebPlatformMediaStreamSource> platform_source,
ReadyState ready_state,
bool requires_consumer)
: … { … }
MediaStreamSource::MediaStreamSource(
const String& id,
int64_t display_id,
StreamType type,
const String& name,
bool remote,
std::unique_ptr<WebPlatformMediaStreamSource> platform_source,
ReadyState ready_state,
bool requires_consumer)
: … { … }
void MediaStreamSource::SetGroupId(const String& group_id) { … }
void MediaStreamSource::SetReadyState(ReadyState ready_state) { … }
void MediaStreamSource::AddObserver(MediaStreamSource::Observer* observer) { … }
void MediaStreamSource::SetAudioProcessingProperties(
EchoCancellationMode echo_cancellation_mode,
bool auto_gain_control,
bool noise_supression,
bool voice_isolation) { … }
void MediaStreamSource::SetAudioConsumer(
WebAudioDestinationConsumer* consumer) { … }
bool MediaStreamSource::RemoveAudioConsumer() { … }
void MediaStreamSource::GetSettings(
MediaStreamTrackPlatform::Settings& settings) { … }
void MediaStreamSource::SetAudioFormat(int number_of_channels,
float sample_rate) { … }
void MediaStreamSource::ConsumeAudio(AudioBus* bus, int number_of_frames) { … }
void MediaStreamSource::OnDeviceCaptureConfigurationChange(
const MediaStreamDevice& device) { … }
void MediaStreamSource::OnDeviceCaptureHandleChange(
const MediaStreamDevice& device) { … }
void MediaStreamSource::OnZoomLevelChange(const MediaStreamDevice& device,
int zoom_level) { … }
void MediaStreamSource::Trace(Visitor* visitor) const { … }
void MediaStreamSource::Dispose() { … }
}