Bug 1903098 - Vendor libwebrtc from f4673f97ed

Upstream commit: https://webrtc.googlesource.com/src/+/f4673f97ede73f6a9c87dd6fb61a60544168afbf
    Move webrtc::AudioDeviceModule include to api/ folder

    Bug: webrtc:15874
    Change-Id: I5bdb19d5e710838b41e6ca283d406c9f1f21286b
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348060
    Reviewed-by: Harald Alvestrand <hta@webrtc.org>
    Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
    Commit-Queue: Florent Castelli <orphis@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#42137}
This commit is contained in:
Michael Froman 2024-06-18 10:48:18 -05:00
Родитель 3d92e4b8c7
Коммит ef07ab823e
95 изменённых файлов: 534 добавлений и 472 удалений

3
third_party/libwebrtc/README.moz-ff-commit поставляемый
Просмотреть файл

@ -30180,3 +30180,6 @@ cca6ceeb44
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
f54e0133d7
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
f4673f97ed

2
third_party/libwebrtc/README.mozilla поставляемый
Просмотреть файл

@ -20144,3 +20144,5 @@ libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-06-18T15:36:34.744684.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-06-18T15:46:37.774837.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-06-18T15:48:06.962118.

2
third_party/libwebrtc/api/BUILD.gn поставляемый
Просмотреть файл

@ -83,12 +83,12 @@ if (!build_with_chromium && !build_with_mozilla) {
":libjingle_peerconnection_api",
":scoped_refptr",
"../api/rtc_event_log:rtc_event_log_factory",
"../modules/audio_device:audio_device_api",
"../pc:peer_connection_factory",
"../pc:webrtc_sdp",
"../rtc_base:threading",
"../rtc_base/system:rtc_export",
"../stats:rtc_stats",
"audio:audio_device",
"audio:audio_mixer_api",
"audio:audio_processing",
"audio_codecs:audio_codecs_api",

4
third_party/libwebrtc/api/DEPS поставляемый
Просмотреть файл

@ -75,6 +75,10 @@ specific_include_rules = {
"+rtc_base/socket_address.h",
],
"audio_device_defines\.h": [
"+rtc_base/strings/string_builder.h",
],
"candidate\.h": [
"+rtc_base/network_constants.h",
"+rtc_base/socket_address.h",

16
third_party/libwebrtc/api/audio/BUILD.gn поставляемый
Просмотреть файл

@ -8,6 +8,22 @@
import("../../webrtc.gni")
rtc_source_set("audio_device") {
visibility = [ "*" ]
sources = [
"audio_device.h",
"audio_device_defines.h",
]
deps = [
"..:ref_count",
"..:scoped_refptr",
"../../rtc_base:checks",
"../../rtc_base:stringutils",
"../task_queue",
]
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
rtc_library("audio_frame_api") {
visibility = [ "*" ]
sources = [

194
third_party/libwebrtc/api/audio/audio_device.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,194 @@
/*
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef API_AUDIO_AUDIO_DEVICE_H_
#define API_AUDIO_AUDIO_DEVICE_H_
#include "absl/types/optional.h"
#include "api/audio/audio_device_defines.h"
#include "api/ref_count.h"
#include "api/scoped_refptr.h"
#include "api/task_queue/task_queue_factory.h"
namespace webrtc {
class AudioDeviceModuleForTest;
class AudioDeviceModule : public webrtc::RefCountInterface {
public:
enum AudioLayer {
kPlatformDefaultAudio = 0,
kWindowsCoreAudio,
kWindowsCoreAudio2,
kLinuxAlsaAudio,
kLinuxPulseAudio,
kAndroidJavaAudio,
kAndroidOpenSLESAudio,
kAndroidJavaInputAndOpenSLESOutputAudio,
kAndroidAAudioAudio,
kAndroidJavaInputAndAAudioOutputAudio,
kDummyAudio,
};
enum WindowsDeviceType {
kDefaultCommunicationDevice = -1,
kDefaultDevice = -2
};
struct Stats {
// The fields below correspond to similarly-named fields in the WebRTC stats
// spec. https://w3c.github.io/webrtc-stats/#playoutstats-dict*
double synthesized_samples_duration_s = 0;
uint64_t synthesized_samples_events = 0;
double total_samples_duration_s = 0;
double total_playout_delay_s = 0;
uint64_t total_samples_count = 0;
};
public:
// Creates a default ADM for usage in production code.
static rtc::scoped_refptr<AudioDeviceModule> Create(
AudioLayer audio_layer,
TaskQueueFactory* task_queue_factory);
// Creates an ADM with support for extra test methods. Don't use this factory
// in production code.
static rtc::scoped_refptr<AudioDeviceModuleForTest> CreateForTest(
AudioLayer audio_layer,
TaskQueueFactory* task_queue_factory);
// Retrieve the currently utilized audio layer
virtual int32_t ActiveAudioLayer(AudioLayer* audioLayer) const = 0;
// Full-duplex transportation of PCM audio
virtual int32_t RegisterAudioCallback(AudioTransport* audioCallback) = 0;
// Main initialization and termination
virtual int32_t Init() = 0;
virtual int32_t Terminate() = 0;
virtual bool Initialized() const = 0;
// Device enumeration
virtual int16_t PlayoutDevices() = 0;
virtual int16_t RecordingDevices() = 0;
virtual int32_t PlayoutDeviceName(uint16_t index,
char name[kAdmMaxDeviceNameSize],
char guid[kAdmMaxGuidSize]) = 0;
virtual int32_t RecordingDeviceName(uint16_t index,
char name[kAdmMaxDeviceNameSize],
char guid[kAdmMaxGuidSize]) = 0;
// Device selection
virtual int32_t SetPlayoutDevice(uint16_t index) = 0;
virtual int32_t SetPlayoutDevice(WindowsDeviceType device) = 0;
virtual int32_t SetRecordingDevice(uint16_t index) = 0;
virtual int32_t SetRecordingDevice(WindowsDeviceType device) = 0;
// Audio transport initialization
virtual int32_t PlayoutIsAvailable(bool* available) = 0;
virtual int32_t InitPlayout() = 0;
virtual bool PlayoutIsInitialized() const = 0;
virtual int32_t RecordingIsAvailable(bool* available) = 0;
virtual int32_t InitRecording() = 0;
virtual bool RecordingIsInitialized() const = 0;
// Audio transport control
virtual int32_t StartPlayout() = 0;
virtual int32_t StopPlayout() = 0;
virtual bool Playing() const = 0;
virtual int32_t StartRecording() = 0;
virtual int32_t StopRecording() = 0;
virtual bool Recording() const = 0;
// Audio mixer initialization
virtual int32_t InitSpeaker() = 0;
virtual bool SpeakerIsInitialized() const = 0;
virtual int32_t InitMicrophone() = 0;
virtual bool MicrophoneIsInitialized() const = 0;
// Speaker volume controls
virtual int32_t SpeakerVolumeIsAvailable(bool* available) = 0;
virtual int32_t SetSpeakerVolume(uint32_t volume) = 0;
virtual int32_t SpeakerVolume(uint32_t* volume) const = 0;
virtual int32_t MaxSpeakerVolume(uint32_t* maxVolume) const = 0;
virtual int32_t MinSpeakerVolume(uint32_t* minVolume) const = 0;
// Microphone volume controls
virtual int32_t MicrophoneVolumeIsAvailable(bool* available) = 0;
virtual int32_t SetMicrophoneVolume(uint32_t volume) = 0;
virtual int32_t MicrophoneVolume(uint32_t* volume) const = 0;
virtual int32_t MaxMicrophoneVolume(uint32_t* maxVolume) const = 0;
virtual int32_t MinMicrophoneVolume(uint32_t* minVolume) const = 0;
// Speaker mute control
virtual int32_t SpeakerMuteIsAvailable(bool* available) = 0;
virtual int32_t SetSpeakerMute(bool enable) = 0;
virtual int32_t SpeakerMute(bool* enabled) const = 0;
// Microphone mute control
virtual int32_t MicrophoneMuteIsAvailable(bool* available) = 0;
virtual int32_t SetMicrophoneMute(bool enable) = 0;
virtual int32_t MicrophoneMute(bool* enabled) const = 0;
// Stereo support
virtual int32_t StereoPlayoutIsAvailable(bool* available) const = 0;
virtual int32_t SetStereoPlayout(bool enable) = 0;
virtual int32_t StereoPlayout(bool* enabled) const = 0;
virtual int32_t StereoRecordingIsAvailable(bool* available) const = 0;
virtual int32_t SetStereoRecording(bool enable) = 0;
virtual int32_t StereoRecording(bool* enabled) const = 0;
// Playout delay
virtual int32_t PlayoutDelay(uint16_t* delayMS) const = 0;
// Only supported on Android.
virtual bool BuiltInAECIsAvailable() const = 0;
virtual bool BuiltInAGCIsAvailable() const = 0;
virtual bool BuiltInNSIsAvailable() const = 0;
// Enables the built-in audio effects. Only supported on Android.
virtual int32_t EnableBuiltInAEC(bool enable) = 0;
virtual int32_t EnableBuiltInAGC(bool enable) = 0;
virtual int32_t EnableBuiltInNS(bool enable) = 0;
// Play underrun count. Only supported on Android.
// TODO(alexnarest): Make it abstract after upstream projects support it.
virtual int32_t GetPlayoutUnderrunCount() const { return -1; }
// Used to generate RTC stats. If not implemented, RTCAudioPlayoutStats will
// not be present in the stats.
virtual absl::optional<Stats> GetStats() const { return absl::nullopt; }
// Only supported on iOS.
#if defined(WEBRTC_IOS)
virtual int GetPlayoutAudioParameters(AudioParameters* params) const = 0;
virtual int GetRecordAudioParameters(AudioParameters* params) const = 0;
#endif // WEBRTC_IOS
protected:
~AudioDeviceModule() override {}
};
// Extends the default ADM interface with some extra test methods.
// Intended for usage in tests only and requires a unique factory method.
class AudioDeviceModuleForTest : public AudioDeviceModule {
public:
// Triggers internal restart sequences of audio streaming. Can be used by
// tests to emulate events corresponding to e.g. removal of an active audio
// device or other actions which causes the stream to be disconnected.
virtual int RestartPlayoutInternally() = 0;
virtual int RestartRecordingInternally() = 0;
virtual int SetPlayoutSampleRate(uint32_t sample_rate) = 0;
virtual int SetRecordingSampleRate(uint32_t sample_rate) = 0;
};
} // namespace webrtc
#endif // API_AUDIO_AUDIO_DEVICE_H_

178
third_party/libwebrtc/api/audio/audio_device_defines.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,178 @@
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef API_AUDIO_AUDIO_DEVICE_DEFINES_H_
#define API_AUDIO_AUDIO_DEVICE_DEFINES_H_
#include <stddef.h>
#include <cstdint>
#include <string>
#include "absl/types/optional.h"
#include "rtc_base/strings/string_builder.h"
namespace webrtc {
static const int kAdmMaxDeviceNameSize = 128;
static const int kAdmMaxFileNameSize = 512;
static const int kAdmMaxGuidSize = 128;
static const int kAdmMinPlayoutBufferSizeMs = 10;
static const int kAdmMaxPlayoutBufferSizeMs = 250;
// ----------------------------------------------------------------------------
// AudioTransport
// ----------------------------------------------------------------------------
class AudioTransport {
public:
// TODO(bugs.webrtc.org/13620) Deprecate this function
virtual int32_t RecordedDataIsAvailable(const void* audioSamples,
size_t nSamples,
size_t nBytesPerSample,
size_t nChannels,
uint32_t samplesPerSec,
uint32_t totalDelayMS,
int32_t clockDrift,
uint32_t currentMicLevel,
bool keyPressed,
uint32_t& newMicLevel) = 0; // NOLINT
virtual int32_t RecordedDataIsAvailable(
const void* audioSamples,
size_t nSamples,
size_t nBytesPerSample,
size_t nChannels,
uint32_t samplesPerSec,
uint32_t totalDelayMS,
int32_t clockDrift,
uint32_t currentMicLevel,
bool keyPressed,
uint32_t& newMicLevel,
absl::optional<int64_t> estimatedCaptureTimeNS) { // NOLINT
// TODO(webrtc:13620) Make the default behaver of the new API to behave as
// the old API. This can be pure virtual if all uses of the old API is
// removed.
return RecordedDataIsAvailable(
audioSamples, nSamples, nBytesPerSample, nChannels, samplesPerSec,
totalDelayMS, clockDrift, currentMicLevel, keyPressed, newMicLevel);
}
// Implementation has to setup safe values for all specified out parameters.
virtual int32_t NeedMorePlayData(size_t nSamples,
size_t nBytesPerSample,
size_t nChannels,
uint32_t samplesPerSec,
void* audioSamples,
size_t& nSamplesOut, // NOLINT
int64_t* elapsed_time_ms,
int64_t* ntp_time_ms) = 0; // NOLINT
// Method to pull mixed render audio data from all active VoE channels.
// The data will not be passed as reference for audio processing internally.
virtual void PullRenderData(int bits_per_sample,
int sample_rate,
size_t number_of_channels,
size_t number_of_frames,
void* audio_data,
int64_t* elapsed_time_ms,
int64_t* ntp_time_ms) = 0;
protected:
virtual ~AudioTransport() {}
};
// Helper class for storage of fundamental audio parameters such as sample rate,
// number of channels, native buffer size etc.
// Note that one audio frame can contain more than one channel sample and each
// sample is assumed to be a 16-bit PCM sample. Hence, one audio frame in
// stereo contains 2 * (16/8) = 4 bytes of data.
class AudioParameters {
public:
// This implementation does only support 16-bit PCM samples.
static const size_t kBitsPerSample = 16;
AudioParameters()
: sample_rate_(0),
channels_(0),
frames_per_buffer_(0),
frames_per_10ms_buffer_(0) {}
AudioParameters(int sample_rate, size_t channels, size_t frames_per_buffer)
: sample_rate_(sample_rate),
channels_(channels),
frames_per_buffer_(frames_per_buffer),
frames_per_10ms_buffer_(static_cast<size_t>(sample_rate / 100)) {}
void reset(int sample_rate, size_t channels, size_t frames_per_buffer) {
sample_rate_ = sample_rate;
channels_ = channels;
frames_per_buffer_ = frames_per_buffer;
frames_per_10ms_buffer_ = static_cast<size_t>(sample_rate / 100);
}
size_t bits_per_sample() const { return kBitsPerSample; }
void reset(int sample_rate, size_t channels, double buffer_duration) {
reset(sample_rate, channels,
static_cast<size_t>(sample_rate * buffer_duration + 0.5));
}
void reset(int sample_rate, size_t channels) {
reset(sample_rate, channels, static_cast<size_t>(0));
}
int sample_rate() const { return sample_rate_; }
size_t channels() const { return channels_; }
size_t frames_per_buffer() const { return frames_per_buffer_; }
size_t frames_per_10ms_buffer() const { return frames_per_10ms_buffer_; }
size_t GetBytesPerFrame() const { return channels_ * kBitsPerSample / 8; }
size_t GetBytesPerBuffer() const {
return frames_per_buffer_ * GetBytesPerFrame();
}
// The WebRTC audio device buffer (ADB) only requires that the sample rate
// and number of channels are configured. Hence, to be "valid", only these
// two attributes must be set.
bool is_valid() const { return ((sample_rate_ > 0) && (channels_ > 0)); }
// Most platforms also require that a native buffer size is defined.
// An audio parameter instance is considered to be "complete" if it is both
// "valid" (can be used by the ADB) and also has a native frame size.
bool is_complete() const { return (is_valid() && (frames_per_buffer_ > 0)); }
size_t GetBytesPer10msBuffer() const {
return frames_per_10ms_buffer_ * GetBytesPerFrame();
}
double GetBufferSizeInMilliseconds() const {
if (sample_rate_ == 0)
return 0.0;
return frames_per_buffer_ / (sample_rate_ / 1000.0);
}
double GetBufferSizeInSeconds() const {
if (sample_rate_ == 0)
return 0.0;
return static_cast<double>(frames_per_buffer_) / (sample_rate_);
}
std::string ToString() const {
char ss_buf[1024];
rtc::SimpleStringBuilder ss(ss_buf);
ss << "AudioParameters: ";
ss << "sample_rate=" << sample_rate() << ", channels=" << channels();
ss << ", frames_per_buffer=" << frames_per_buffer();
ss << ", frames_per_10ms_buffer=" << frames_per_10ms_buffer();
ss << ", bytes_per_frame=" << GetBytesPerFrame();
ss << ", bytes_per_buffer=" << GetBytesPerBuffer();
ss << ", bytes_per_10ms_buffer=" << GetBytesPer10msBuffer();
ss << ", size_in_ms=" << GetBufferSizeInMilliseconds();
return ss.str();
}
private:
int sample_rate_;
size_t channels_;
size_t frames_per_buffer_;
size_t frames_per_10ms_buffer_;
};
} // namespace webrtc
#endif // API_AUDIO_AUDIO_DEVICE_DEFINES_H_

Просмотреть файл

@ -13,6 +13,7 @@
#include <memory>
#include <utility>
#include "api/audio/audio_device.h"
#include "api/audio/audio_processing.h"
#include "api/enable_media.h"
#include "api/peer_connection_interface.h"
@ -20,7 +21,6 @@
#include "api/scoped_refptr.h"
#include "api/task_queue/default_task_queue_factory.h"
#include "api/transport/field_trial_based_config.h"
#include "modules/audio_device/include/audio_device.h"
#include "rtc_base/thread.h"
namespace webrtc {

Просмотреть файл

@ -13,6 +13,7 @@
#include <memory>
#include "api/audio/audio_device.h"
#include "api/audio/audio_mixer.h"
#include "api/audio/audio_processing.h"
#include "api/audio_codecs/audio_decoder_factory.h"
@ -33,7 +34,6 @@ class Thread;
namespace webrtc {
class AudioDeviceModule;
class AudioFrameProcessor;
// Create a new instance of PeerConnectionFactoryInterface with optional video

2
third_party/libwebrtc/api/voip/BUILD.gn поставляемый
Просмотреть файл

@ -40,8 +40,8 @@ rtc_library("voip_engine_factory") {
":voip_api",
"..:scoped_refptr",
"../../audio/voip:voip_core",
"../../modules/audio_device:audio_device_api",
"../../rtc_base:logging",
"../audio:audio_device",
"../audio:audio_processing",
"../audio_codecs:audio_codecs_api",
"../task_queue",

Просмотреть файл

@ -13,13 +13,13 @@
#include <memory>
#include "api/audio/audio_device.h"
#include "api/audio/audio_processing.h"
#include "api/audio_codecs/audio_decoder_factory.h"
#include "api/audio_codecs/audio_encoder_factory.h"
#include "api/scoped_refptr.h"
#include "api/task_queue/task_queue_factory.h"
#include "api/voip/voip_engine.h"
#include "modules/audio_device/include/audio_device.h"
namespace webrtc {

6
third_party/libwebrtc/audio/BUILD.gn поставляемый
Просмотреть файл

@ -49,6 +49,7 @@ rtc_library("audio") {
"../api:sequence_checker",
"../api:transport_api",
"../api/audio:aec3_factory",
"../api/audio:audio_device",
"../api/audio:audio_frame_api",
"../api/audio:audio_frame_processor",
"../api/audio:audio_mixer_api",
@ -130,10 +131,10 @@ if (rtc_include_tests) {
deps = [
":audio",
"../api:simulated_network_api",
"../api/audio:audio_device",
"../api/task_queue",
"../call:fake_network",
"../call:simulated_network",
"../modules/audio_device:audio_device_api",
"../modules/audio_device:test_audio_device_module",
"../system_wrappers",
"../test:test_common",
@ -191,7 +192,6 @@ if (rtc_include_tests) {
"../call:rtp_sender",
"../common_audio",
"../logging:mocks",
"../modules/audio_device:audio_device_api",
"../modules/audio_device:audio_device_impl", # For TestAudioDeviceModule
"../modules/audio_device:mock_audio_device",
"../modules/audio_mixer:audio_mixer_impl",
@ -235,11 +235,11 @@ if (rtc_include_tests) {
deps = [
":audio",
"../api:mock_frame_transformer",
"../api/audio:audio_device",
"../api/audio_codecs:builtin_audio_decoder_factory",
"../api/crypto:frame_decryptor_interface",
"../api/task_queue:default_task_queue_factory",
"../logging:mocks",
"../modules/audio_device:audio_device_api",
"../modules/audio_device:mock_audio_device",
"../modules/rtp_rtcp",
"../modules/rtp_rtcp:rtp_rtcp_format",

2
third_party/libwebrtc/audio/audio_state.cc поставляемый
Просмотреть файл

@ -15,12 +15,12 @@
#include <utility>
#include <vector>
#include "api/audio/audio_device.h"
#include "api/sequence_checker.h"
#include "api/task_queue/task_queue_base.h"
#include "api/units/time_delta.h"
#include "audio/audio_receive_stream.h"
#include "audio/audio_send_stream.h"
#include "modules/audio_device/include/audio_device.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"

Просмотреть файл

@ -14,12 +14,12 @@
#include <memory>
#include <vector>
#include "api/audio/audio_device.h"
#include "api/audio/audio_mixer.h"
#include "api/audio/audio_processing.h"
#include "api/scoped_refptr.h"
#include "common_audio/resampler/include/push_resampler.h"
#include "modules/async_audio_processing/async_audio_processing.h"
#include "modules/audio_device/include/audio_device.h"
#include "rtc_base/synchronization/mutex.h"
#include "rtc_base/thread_annotations.h"

Просмотреть файл

@ -17,6 +17,7 @@
#include <utility>
#include <vector>
#include "api/audio/audio_device.h"
#include "api/crypto/frame_decryptor_interface.h"
#include "api/frame_transformer_interface.h"
#include "api/rtc_event_log/rtc_event_log.h"
@ -32,7 +33,6 @@
#include "logging/rtc_event_log/events/rtc_event_neteq_set_minimum_delay.h"
#include "modules/audio_coding/acm2/acm_receiver.h"
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/pacing/packet_router.h"
#include "modules/rtp_rtcp/include/receive_statistics.h"
#include "modules/rtp_rtcp/include/remote_ntp_time_estimator.h"

Просмотреть файл

@ -11,12 +11,12 @@
#include "audio/channel_receive.h"
#include "absl/strings/escaping.h"
#include "api/audio/audio_device.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/crypto/frame_decryptor_interface.h"
#include "api/task_queue/default_task_queue_factory.h"
#include "api/test/mock_frame_transformer.h"
#include "logging/rtc_event_log/mock/mock_rtc_event_log.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_device/include/mock_audio_device.h"
#include "modules/rtp_rtcp/source/byte_io.h"
#include "modules/rtp_rtcp/source/rtcp_packet/receiver_report.h"

Просмотреть файл

@ -14,9 +14,9 @@
#include <string>
#include <vector>
#include "api/audio/audio_device.h"
#include "api/task_queue/task_queue_base.h"
#include "api/test/simulated_network.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_device/include/test_audio_device.h"
#include "test/call_test.h"

3
third_party/libwebrtc/audio/voip/BUILD.gn поставляемый
Просмотреть файл

@ -17,11 +17,11 @@ rtc_library("voip_core") {
":audio_channel",
"..:audio",
"../../api:scoped_refptr",
"../../api/audio:audio_device",
"../../api/audio:audio_processing",
"../../api/audio_codecs:audio_codecs_api",
"../../api/task_queue",
"../../api/voip:voip_api",
"../../modules/audio_device:audio_device_api",
"../../modules/audio_mixer:audio_mixer_impl",
"../../rtc_base:criticalsection",
"../../rtc_base:logging",
@ -42,7 +42,6 @@ rtc_library("audio_channel") {
"../../api/audio_codecs:audio_codecs_api",
"../../api/task_queue",
"../../api/voip:voip_api",
"../../modules/audio_device:audio_device_api",
"../../modules/rtp_rtcp",
"../../modules/rtp_rtcp:rtp_rtcp_format",
"../../rtc_base:criticalsection",

Просмотреть файл

@ -17,6 +17,7 @@
#include <unordered_map>
#include <vector>
#include "api/audio/audio_device.h"
#include "api/audio/audio_processing.h"
#include "api/audio_codecs/audio_decoder_factory.h"
#include "api/audio_codecs/audio_encoder_factory.h"
@ -31,7 +32,6 @@
#include "api/voip/voip_volume_control.h"
#include "audio/audio_transport_impl.h"
#include "audio/voip/audio_channel.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_mixer/audio_mixer_impl.h"
#include "rtc_base/synchronization/mutex.h"

2
third_party/libwebrtc/call/BUILD.gn поставляемый
Просмотреть файл

@ -54,6 +54,7 @@ rtc_library("call_interfaces") {
"../api:scoped_refptr",
"../api:transport_api",
"../api/adaptation:resource_adaptation_api",
"../api/audio:audio_device",
"../api/audio:audio_frame_processor",
"../api/audio:audio_mixer_api",
"../api/audio:audio_processing",
@ -574,6 +575,7 @@ if (rtc_include_tests) {
":video_stream_api",
"../api:rtc_event_log_output_file",
"../api:simulated_network_api",
"../api/audio:audio_device",
"../api/audio_codecs:builtin_audio_encoder_factory",
"../api/numerics",
"../api/rtc_event_log",

2
third_party/libwebrtc/call/audio_state.h поставляемый
Просмотреть файл

@ -10,11 +10,11 @@
#ifndef CALL_AUDIO_STATE_H_
#define CALL_AUDIO_STATE_H_
#include "api/audio/audio_device.h"
#include "api/audio/audio_mixer.h"
#include "api/audio/audio_processing.h"
#include "api/scoped_refptr.h"
#include "modules/async_audio_processing/async_audio_processing.h"
#include "modules/audio_device/include/audio_device.h"
#include "rtc_base/ref_count.h"
namespace webrtc {

Просмотреть файл

@ -15,6 +15,7 @@
#include "absl/flags/flag.h"
#include "absl/strings/string_view.h"
#include "api/audio/audio_device.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
#include "api/numerics/samples_stats_counter.h"
#include "api/rtc_event_log/rtc_event_log.h"
@ -32,7 +33,6 @@
#include "media/engine/internal_encoder_factory.h"
#include "media/engine/simulcast_encoder_adapter.h"
#include "modules/audio_coding/include/audio_coding_module.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_device/include/test_audio_device.h"
#include "modules/audio_mixer/audio_mixer_impl.h"
#include "modules/rtp_rtcp/source/rtp_packet.h"

1
third_party/libwebrtc/examples/BUILD.gn поставляемый
Просмотреть файл

@ -689,6 +689,7 @@ if (is_linux || is_chromeos || is_win) {
"../api:media_stream_interface",
"../api:rtp_sender_interface",
"../api:scoped_refptr",
"../api/audio:audio_device",
"../api/audio:audio_mixer_api",
"../api/audio:audio_processing",
"../api/audio_codecs:audio_codecs_api",

Просмотреть файл

@ -19,6 +19,7 @@
#include "absl/memory/memory.h"
#include "absl/types/optional.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_mixer.h"
#include "api/audio/audio_processing.h"
#include "api/audio_codecs/audio_decoder_factory.h"
@ -41,7 +42,6 @@
#include "api/video_codecs/video_encoder_factory_template_libvpx_vp9_adapter.h"
#include "api/video_codecs/video_encoder_factory_template_open_h264_adapter.h"
#include "examples/peerconnection/client/defaults.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/video_capture/video_capture.h"
#include "modules/video_capture/video_capture_factory.h"
#include "p2p/base/port_allocator.h"

1
third_party/libwebrtc/media/BUILD.gn поставляемый
Просмотреть файл

@ -619,6 +619,7 @@ rtc_library("rtc_audio_video") {
"../api:scoped_refptr",
"../api:sequence_checker",
"../api:transport_api",
"../api/audio:audio_device",
"../api/audio:audio_frame_api",
"../api/audio:audio_frame_processor",
"../api/audio:audio_mixer_api",

Просмотреть файл

@ -30,7 +30,6 @@
#include "rtc_base/system/file_wrapper.h"
namespace webrtc {
class AudioDeviceModule;
class AudioMixer;
class Call;
} // namespace webrtc

Просмотреть файл

@ -10,7 +10,7 @@
#include "media/engine/adm_helpers.h"
#include "modules/audio_device/include/audio_device.h"
#include "api/audio/audio_device.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"

Просмотреть файл

@ -24,6 +24,7 @@
#include "absl/functional/any_invocable.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_frame_processor.h"
#include "api/audio/audio_mixer.h"
#include "api/audio/audio_processing.h"
@ -59,7 +60,6 @@
#include "media/base/rtp_utils.h"
#include "media/base/stream_params.h"
#include "modules/async_audio_processing/async_audio_processing.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
#include "modules/rtp_rtcp/source/rtp_packet_received.h"
#include "rtc_base/buffer.h"

Просмотреть файл

@ -26,7 +26,7 @@ config("audio_device_warnings_config") {
rtc_source_set("audio_device_default") {
visibility = [ "*" ]
sources = [ "include/audio_device_default.h" ]
deps = [ ":audio_device_api" ]
deps = [ "../../api/audio:audio_device" ]
}
rtc_source_set("audio_device") {
@ -49,15 +49,7 @@ rtc_source_set("audio_device_api") {
"include/audio_device.h",
"include/audio_device_defines.h",
]
deps = [
"../../api:ref_count",
"../../api:scoped_refptr",
"../../api/task_queue",
"../../rtc_base:checks",
"../../rtc_base:refcount",
"../../rtc_base:stringutils",
]
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
deps = [ "../../api/audio:audio_device" ]
}
rtc_library("audio_device_config") {
@ -73,9 +65,9 @@ if (!build_with_mozilla) { # See Bug 1820869.
"fine_audio_buffer.h",
]
deps = [
":audio_device_api",
"../../api:array_view",
"../../api:sequence_checker",
"../../api/audio:audio_device",
"../../api/task_queue",
"../../common_audio:common_audio_c",
"../../rtc_base:buffer",
@ -100,8 +92,8 @@ rtc_library("audio_device_generic") {
"audio_device_generic.h",
]
deps = [
":audio_device_api",
":audio_device_buffer",
"../../api/audio:audio_device",
"../../rtc_base:logging",
]
}
@ -122,8 +114,8 @@ rtc_source_set("windows_core_audio_utility") {
]
deps = [
":audio_device_api",
":audio_device_name",
"../../api/audio:audio_device",
"../../api/units:time_delta",
"../../rtc_base:checks",
"../../rtc_base:logging",
@ -161,12 +153,12 @@ rtc_source_set("audio_device_module_from_input_and_output") {
]
deps = [
":audio_device_api",
":audio_device_buffer",
":windows_core_audio_utility",
"../../api:make_ref_counted",
"../../api:scoped_refptr",
"../../api:sequence_checker",
"../../api/audio:audio_device",
"../../api/task_queue",
"../../rtc_base:checks",
"../../rtc_base:logging",
@ -195,7 +187,6 @@ if (!build_with_chromium) {
"test_audio_device_impl.h",
]
deps = [
":audio_device_api",
":audio_device_buffer",
":audio_device_default",
":audio_device_generic",
@ -203,6 +194,7 @@ if (!build_with_chromium) {
"../../api:array_view",
"../../api:make_ref_counted",
"../../api:scoped_refptr",
"../../api/audio:audio_device",
"../../api/task_queue",
"../../api/units:time_delta",
"../../common_audio",
@ -232,9 +224,9 @@ rtc_library("audio_device_dummy") {
"dummy/audio_device_dummy.h",
]
deps = [
":audio_device_api",
":audio_device_buffer",
":audio_device_generic",
"../../api/audio:audio_device",
]
}
@ -272,7 +264,6 @@ rtc_library("audio_device_impl") {
if (!build_with_mozilla) { # See Bug 1820869.
visibility = [ "*" ]
deps = [
":audio_device_api",
":audio_device_buffer",
":audio_device_config",
":audio_device_default",
@ -283,6 +274,7 @@ if (!build_with_mozilla) { # See Bug 1820869.
"../../api:refcountedbase",
"../../api:scoped_refptr",
"../../api:sequence_checker",
"../../api/audio:audio_device",
"../../api/task_queue",
"../../api/units:time_delta",
"../../common_audio",
@ -457,6 +449,7 @@ rtc_source_set("mock_audio_device") {
":audio_device_buffer",
":audio_device_impl",
"../../api:make_ref_counted",
"../../api/audio:audio_device",
"../../test:test_support",
]
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
@ -483,6 +476,7 @@ if (rtc_include_tests && !build_with_chromium && !build_with_mozilla) {
"../../api:array_view",
"../../api:scoped_refptr",
"../../api:sequence_checker",
"../../api/audio:audio_device",
"../../api/task_queue",
"../../api/task_queue:default_task_queue_factory",
"../../api/units:time_delta",

Просмотреть файл

@ -17,10 +17,10 @@
#include <atomic>
#include <memory>
#include "api/audio/audio_device_defines.h"
#include "api/sequence_checker.h"
#include "api/task_queue/task_queue_base.h"
#include "api/task_queue/task_queue_factory.h"
#include "modules/audio_device/include/audio_device_defines.h"
#include "rtc_base/buffer.h"
#include "rtc_base/synchronization/mutex.h"
#include "rtc_base/thread_annotations.h"

Просмотреть файл

@ -10,8 +10,8 @@
#include "modules/audio_device/include/audio_device_data_observer.h"
#include "api/audio/audio_device_defines.h"
#include "api/make_ref_counted.h"
#include "modules/audio_device/include/audio_device_defines.h"
#include "rtc_base/checks.h"
namespace webrtc {

Просмотреть файл

@ -13,9 +13,9 @@
#include <stdint.h>
#include "api/audio/audio_device.h"
#include "api/audio/audio_device_defines.h"
#include "modules/audio_device/audio_device_buffer.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_device/include/audio_device_defines.h"
namespace webrtc {

Просмотреть файл

@ -17,9 +17,9 @@
#include <memory>
#include "api/audio/audio_device.h"
#include "api/task_queue/task_queue_factory.h"
#include "modules/audio_device/audio_device_buffer.h"
#include "modules/audio_device/include/audio_device.h"
namespace webrtc {

Просмотреть файл

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "modules/audio_device/include/audio_device.h"
#include "api/audio/audio_device.h"
#include <algorithm>
#include <cstring>

Просмотреть файл

@ -13,10 +13,10 @@
#include <stdint.h>
#include "api/audio/audio_device.h"
#include "api/audio/audio_device_defines.h"
#include "modules/audio_device/audio_device_buffer.h"
#include "modules/audio_device/audio_device_generic.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_device/include/audio_device_defines.h"
namespace webrtc {

Просмотреть файл

@ -11,184 +11,8 @@
#ifndef MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_H_
#define MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_H_
#include "absl/types/optional.h"
#include "api/ref_count.h"
#include "api/scoped_refptr.h"
#include "api/task_queue/task_queue_factory.h"
#include "modules/audio_device/include/audio_device_defines.h"
namespace webrtc {
class AudioDeviceModuleForTest;
class AudioDeviceModule : public webrtc::RefCountInterface {
public:
enum AudioLayer {
kPlatformDefaultAudio = 0,
kWindowsCoreAudio,
kWindowsCoreAudio2,
kLinuxAlsaAudio,
kLinuxPulseAudio,
kAndroidJavaAudio,
kAndroidOpenSLESAudio,
kAndroidJavaInputAndOpenSLESOutputAudio,
kAndroidAAudioAudio,
kAndroidJavaInputAndAAudioOutputAudio,
kDummyAudio,
};
enum WindowsDeviceType {
kDefaultCommunicationDevice = -1,
kDefaultDevice = -2
};
struct Stats {
// The fields below correspond to similarly-named fields in the WebRTC stats
// spec. https://w3c.github.io/webrtc-stats/#playoutstats-dict*
double synthesized_samples_duration_s = 0;
uint64_t synthesized_samples_events = 0;
double total_samples_duration_s = 0;
double total_playout_delay_s = 0;
uint64_t total_samples_count = 0;
};
public:
// Creates a default ADM for usage in production code.
static rtc::scoped_refptr<AudioDeviceModule> Create(
AudioLayer audio_layer,
TaskQueueFactory* task_queue_factory);
// Creates an ADM with support for extra test methods. Don't use this factory
// in production code.
static rtc::scoped_refptr<AudioDeviceModuleForTest> CreateForTest(
AudioLayer audio_layer,
TaskQueueFactory* task_queue_factory);
// Retrieve the currently utilized audio layer
virtual int32_t ActiveAudioLayer(AudioLayer* audioLayer) const = 0;
// Full-duplex transportation of PCM audio
virtual int32_t RegisterAudioCallback(AudioTransport* audioCallback) = 0;
// Main initialization and termination
virtual int32_t Init() = 0;
virtual int32_t Terminate() = 0;
virtual bool Initialized() const = 0;
// Device enumeration
virtual int16_t PlayoutDevices() = 0;
virtual int16_t RecordingDevices() = 0;
virtual int32_t PlayoutDeviceName(uint16_t index,
char name[kAdmMaxDeviceNameSize],
char guid[kAdmMaxGuidSize]) = 0;
virtual int32_t RecordingDeviceName(uint16_t index,
char name[kAdmMaxDeviceNameSize],
char guid[kAdmMaxGuidSize]) = 0;
// Device selection
virtual int32_t SetPlayoutDevice(uint16_t index) = 0;
virtual int32_t SetPlayoutDevice(WindowsDeviceType device) = 0;
virtual int32_t SetRecordingDevice(uint16_t index) = 0;
virtual int32_t SetRecordingDevice(WindowsDeviceType device) = 0;
// Audio transport initialization
virtual int32_t PlayoutIsAvailable(bool* available) = 0;
virtual int32_t InitPlayout() = 0;
virtual bool PlayoutIsInitialized() const = 0;
virtual int32_t RecordingIsAvailable(bool* available) = 0;
virtual int32_t InitRecording() = 0;
virtual bool RecordingIsInitialized() const = 0;
// Audio transport control
virtual int32_t StartPlayout() = 0;
virtual int32_t StopPlayout() = 0;
virtual bool Playing() const = 0;
virtual int32_t StartRecording() = 0;
virtual int32_t StopRecording() = 0;
virtual bool Recording() const = 0;
// Audio mixer initialization
virtual int32_t InitSpeaker() = 0;
virtual bool SpeakerIsInitialized() const = 0;
virtual int32_t InitMicrophone() = 0;
virtual bool MicrophoneIsInitialized() const = 0;
// Speaker volume controls
virtual int32_t SpeakerVolumeIsAvailable(bool* available) = 0;
virtual int32_t SetSpeakerVolume(uint32_t volume) = 0;
virtual int32_t SpeakerVolume(uint32_t* volume) const = 0;
virtual int32_t MaxSpeakerVolume(uint32_t* maxVolume) const = 0;
virtual int32_t MinSpeakerVolume(uint32_t* minVolume) const = 0;
// Microphone volume controls
virtual int32_t MicrophoneVolumeIsAvailable(bool* available) = 0;
virtual int32_t SetMicrophoneVolume(uint32_t volume) = 0;
virtual int32_t MicrophoneVolume(uint32_t* volume) const = 0;
virtual int32_t MaxMicrophoneVolume(uint32_t* maxVolume) const = 0;
virtual int32_t MinMicrophoneVolume(uint32_t* minVolume) const = 0;
// Speaker mute control
virtual int32_t SpeakerMuteIsAvailable(bool* available) = 0;
virtual int32_t SetSpeakerMute(bool enable) = 0;
virtual int32_t SpeakerMute(bool* enabled) const = 0;
// Microphone mute control
virtual int32_t MicrophoneMuteIsAvailable(bool* available) = 0;
virtual int32_t SetMicrophoneMute(bool enable) = 0;
virtual int32_t MicrophoneMute(bool* enabled) const = 0;
// Stereo support
virtual int32_t StereoPlayoutIsAvailable(bool* available) const = 0;
virtual int32_t SetStereoPlayout(bool enable) = 0;
virtual int32_t StereoPlayout(bool* enabled) const = 0;
virtual int32_t StereoRecordingIsAvailable(bool* available) const = 0;
virtual int32_t SetStereoRecording(bool enable) = 0;
virtual int32_t StereoRecording(bool* enabled) const = 0;
// Playout delay
virtual int32_t PlayoutDelay(uint16_t* delayMS) const = 0;
// Only supported on Android.
virtual bool BuiltInAECIsAvailable() const = 0;
virtual bool BuiltInAGCIsAvailable() const = 0;
virtual bool BuiltInNSIsAvailable() const = 0;
// Enables the built-in audio effects. Only supported on Android.
virtual int32_t EnableBuiltInAEC(bool enable) = 0;
virtual int32_t EnableBuiltInAGC(bool enable) = 0;
virtual int32_t EnableBuiltInNS(bool enable) = 0;
// Play underrun count. Only supported on Android.
// TODO(alexnarest): Make it abstract after upstream projects support it.
virtual int32_t GetPlayoutUnderrunCount() const { return -1; }
// Used to generate RTC stats. If not implemented, RTCAudioPlayoutStats will
// not be present in the stats.
virtual absl::optional<Stats> GetStats() const { return absl::nullopt; }
// Only supported on iOS.
#if defined(WEBRTC_IOS)
virtual int GetPlayoutAudioParameters(AudioParameters* params) const = 0;
virtual int GetRecordAudioParameters(AudioParameters* params) const = 0;
#endif // WEBRTC_IOS
protected:
~AudioDeviceModule() override {}
};
// Extends the default ADM interface with some extra test methods.
// Intended for usage in tests only and requires a unique factory method.
class AudioDeviceModuleForTest : public AudioDeviceModule {
public:
// Triggers internal restart sequences of audio streaming. Can be used by
// tests to emulate events corresponding to e.g. removal of an active audio
// device or other actions which causes the stream to be disconnected.
virtual int RestartPlayoutInternally() = 0;
virtual int RestartRecordingInternally() = 0;
virtual int SetPlayoutSampleRate(uint32_t sample_rate) = 0;
virtual int SetRecordingSampleRate(uint32_t sample_rate) = 0;
};
} // namespace webrtc
// This is a transitional header forwarding to the new version in the api/
// folder.
#include "api/audio/audio_device.h"
#endif // MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_H_

Просмотреть файл

@ -15,9 +15,9 @@
#include <stdint.h>
#include "absl/base/attributes.h"
#include "api/audio/audio_device.h"
#include "api/scoped_refptr.h"
#include "api/task_queue/task_queue_factory.h"
#include "modules/audio_device/include/audio_device.h"
namespace webrtc {

Просмотреть файл

@ -11,7 +11,7 @@
#ifndef MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_DEFAULT_H_
#define MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_DEFAULT_H_
#include "modules/audio_device/include/audio_device.h"
#include "api/audio/audio_device.h"
namespace webrtc {
namespace webrtc_impl {

Просмотреть файл

@ -11,167 +11,8 @@
#ifndef MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_DEFINES_H_
#define MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_DEFINES_H_
#include <stddef.h>
#include <string>
#include "rtc_base/checks.h"
#include "rtc_base/strings/string_builder.h"
namespace webrtc {
static const int kAdmMaxDeviceNameSize = 128;
static const int kAdmMaxFileNameSize = 512;
static const int kAdmMaxGuidSize = 128;
static const int kAdmMinPlayoutBufferSizeMs = 10;
static const int kAdmMaxPlayoutBufferSizeMs = 250;
// ----------------------------------------------------------------------------
// AudioTransport
// ----------------------------------------------------------------------------
class AudioTransport {
public:
// TODO(bugs.webrtc.org/13620) Deprecate this function
virtual int32_t RecordedDataIsAvailable(const void* audioSamples,
size_t nSamples,
size_t nBytesPerSample,
size_t nChannels,
uint32_t samplesPerSec,
uint32_t totalDelayMS,
int32_t clockDrift,
uint32_t currentMicLevel,
bool keyPressed,
uint32_t& newMicLevel) = 0; // NOLINT
virtual int32_t RecordedDataIsAvailable(
const void* audioSamples,
size_t nSamples,
size_t nBytesPerSample,
size_t nChannels,
uint32_t samplesPerSec,
uint32_t totalDelayMS,
int32_t clockDrift,
uint32_t currentMicLevel,
bool keyPressed,
uint32_t& newMicLevel,
absl::optional<int64_t> estimatedCaptureTimeNS) { // NOLINT
// TODO(webrtc:13620) Make the default behaver of the new API to behave as
// the old API. This can be pure virtual if all uses of the old API is
// removed.
return RecordedDataIsAvailable(
audioSamples, nSamples, nBytesPerSample, nChannels, samplesPerSec,
totalDelayMS, clockDrift, currentMicLevel, keyPressed, newMicLevel);
}
// Implementation has to setup safe values for all specified out parameters.
virtual int32_t NeedMorePlayData(size_t nSamples,
size_t nBytesPerSample,
size_t nChannels,
uint32_t samplesPerSec,
void* audioSamples,
size_t& nSamplesOut, // NOLINT
int64_t* elapsed_time_ms,
int64_t* ntp_time_ms) = 0; // NOLINT
// Method to pull mixed render audio data from all active VoE channels.
// The data will not be passed as reference for audio processing internally.
virtual void PullRenderData(int bits_per_sample,
int sample_rate,
size_t number_of_channels,
size_t number_of_frames,
void* audio_data,
int64_t* elapsed_time_ms,
int64_t* ntp_time_ms) = 0;
protected:
virtual ~AudioTransport() {}
};
// Helper class for storage of fundamental audio parameters such as sample rate,
// number of channels, native buffer size etc.
// Note that one audio frame can contain more than one channel sample and each
// sample is assumed to be a 16-bit PCM sample. Hence, one audio frame in
// stereo contains 2 * (16/8) = 4 bytes of data.
class AudioParameters {
public:
// This implementation does only support 16-bit PCM samples.
static const size_t kBitsPerSample = 16;
AudioParameters()
: sample_rate_(0),
channels_(0),
frames_per_buffer_(0),
frames_per_10ms_buffer_(0) {}
AudioParameters(int sample_rate, size_t channels, size_t frames_per_buffer)
: sample_rate_(sample_rate),
channels_(channels),
frames_per_buffer_(frames_per_buffer),
frames_per_10ms_buffer_(static_cast<size_t>(sample_rate / 100)) {}
void reset(int sample_rate, size_t channels, size_t frames_per_buffer) {
sample_rate_ = sample_rate;
channels_ = channels;
frames_per_buffer_ = frames_per_buffer;
frames_per_10ms_buffer_ = static_cast<size_t>(sample_rate / 100);
}
size_t bits_per_sample() const { return kBitsPerSample; }
void reset(int sample_rate, size_t channels, double buffer_duration) {
reset(sample_rate, channels,
static_cast<size_t>(sample_rate * buffer_duration + 0.5));
}
void reset(int sample_rate, size_t channels) {
reset(sample_rate, channels, static_cast<size_t>(0));
}
int sample_rate() const { return sample_rate_; }
size_t channels() const { return channels_; }
size_t frames_per_buffer() const { return frames_per_buffer_; }
size_t frames_per_10ms_buffer() const { return frames_per_10ms_buffer_; }
size_t GetBytesPerFrame() const { return channels_ * kBitsPerSample / 8; }
size_t GetBytesPerBuffer() const {
return frames_per_buffer_ * GetBytesPerFrame();
}
// The WebRTC audio device buffer (ADB) only requires that the sample rate
// and number of channels are configured. Hence, to be "valid", only these
// two attributes must be set.
bool is_valid() const { return ((sample_rate_ > 0) && (channels_ > 0)); }
// Most platforms also require that a native buffer size is defined.
// An audio parameter instance is considered to be "complete" if it is both
// "valid" (can be used by the ADB) and also has a native frame size.
bool is_complete() const { return (is_valid() && (frames_per_buffer_ > 0)); }
size_t GetBytesPer10msBuffer() const {
return frames_per_10ms_buffer_ * GetBytesPerFrame();
}
double GetBufferSizeInMilliseconds() const {
if (sample_rate_ == 0)
return 0.0;
return frames_per_buffer_ / (sample_rate_ / 1000.0);
}
double GetBufferSizeInSeconds() const {
if (sample_rate_ == 0)
return 0.0;
return static_cast<double>(frames_per_buffer_) / (sample_rate_);
}
std::string ToString() const {
char ss_buf[1024];
rtc::SimpleStringBuilder ss(ss_buf);
ss << "AudioParameters: ";
ss << "sample_rate=" << sample_rate() << ", channels=" << channels();
ss << ", frames_per_buffer=" << frames_per_buffer();
ss << ", frames_per_10ms_buffer=" << frames_per_10ms_buffer();
ss << ", bytes_per_frame=" << GetBytesPerFrame();
ss << ", bytes_per_buffer=" << GetBytesPerBuffer();
ss << ", bytes_per_10ms_buffer=" << GetBytesPer10msBuffer();
ss << ", size_in_ms=" << GetBufferSizeInMilliseconds();
return ss.str();
}
private:
int sample_rate_;
size_t channels_;
size_t frames_per_buffer_;
size_t frames_per_10ms_buffer_;
};
} // namespace webrtc
// This is a transitional header forwarding to the new version in the api/
// folder.
#include "api/audio/audio_device_defines.h"
#endif // MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_DEFINES_H_

Просмотреть файл

@ -13,8 +13,8 @@
#include <memory>
#include "api/audio/audio_device.h"
#include "api/task_queue/task_queue_factory.h"
#include "modules/audio_device/include/audio_device.h"
namespace webrtc {

Просмотреть файл

@ -11,7 +11,7 @@
#ifndef MODULES_AUDIO_DEVICE_INCLUDE_FAKE_AUDIO_DEVICE_H_
#define MODULES_AUDIO_DEVICE_INCLUDE_FAKE_AUDIO_DEVICE_H_
#include "modules/audio_device/include/audio_device.h"
#include "api/audio/audio_device.h"
#include "modules/audio_device/include/audio_device_default.h"
namespace webrtc {

Просмотреть файл

@ -13,8 +13,8 @@
#include <string>
#include "api/audio/audio_device.h"
#include "api/make_ref_counted.h"
#include "modules/audio_device/include/audio_device.h"
#include "test/gmock.h"
namespace webrtc {

Просмотреть файл

@ -11,7 +11,7 @@
#ifndef MODULES_AUDIO_DEVICE_INCLUDE_MOCK_AUDIO_TRANSPORT_H_
#define MODULES_AUDIO_DEVICE_INCLUDE_MOCK_AUDIO_TRANSPORT_H_
#include "modules/audio_device/include/audio_device_defines.h"
#include "api/audio/audio_device_defines.h"
#include "test/gmock.h"
namespace webrtc {

Просмотреть файл

@ -18,10 +18,10 @@
#include "absl/strings/string_view.h"
#include "api/array_view.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_device_defines.h"
#include "api/scoped_refptr.h"
#include "api/task_queue/task_queue_factory.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_device/include/audio_device_defines.h"
#include "rtc_base/buffer.h"
namespace webrtc {

Просмотреть файл

@ -17,12 +17,12 @@
#include "absl/types/optional.h"
#include "api/array_view.h"
#include "api/audio/audio_device_defines.h"
#include "api/task_queue/task_queue_factory.h"
#include "api/units/time_delta.h"
#include "api/units/timestamp.h"
#include "common_audio/wav_file.h"
#include "common_audio/wav_header.h"
#include "modules/audio_device/include/audio_device_defines.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/synchronization/mutex.h"

Просмотреть файл

@ -13,11 +13,11 @@
#include <memory>
#include "api/audio/audio_device.h"
#include "api/audio/audio_device_defines.h"
#include "api/sequence_checker.h"
#include "modules/audio_device/audio_device_buffer.h"
#include "modules/audio_device/audio_device_generic.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_device/include/audio_device_defines.h"
#include "modules/audio_device/linux/audio_mixer_manager_pulse_linux.h"
#include "modules/audio_device/linux/pulseaudiosymboltable_linux.h"
#include "rtc_base/event.h"

Просмотреть файл

@ -13,7 +13,7 @@
#include <alsa/asoundlib.h>
#include "modules/audio_device/include/audio_device.h"
#include "api/audio/audio_device.h"
#include "modules/audio_device/linux/alsasymboltable_linux.h"
#include "rtc_base/synchronization/mutex.h"

Просмотреть файл

@ -13,7 +13,7 @@
#include <CoreAudio/CoreAudio.h>
#include "modules/audio_device/include/audio_device.h"
#include "api/audio/audio_device.h"
#include "rtc_base/logging.h"
#include "rtc_base/synchronization/mutex.h"

Просмотреть файл

@ -14,12 +14,12 @@
#include <memory>
#include <vector>
#include "api/audio/audio_device.h"
#include "api/audio/audio_device_defines.h"
#include "api/task_queue/task_queue_base.h"
#include "api/task_queue/task_queue_factory.h"
#include "modules/audio_device/audio_device_buffer.h"
#include "modules/audio_device/audio_device_generic.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_device/include/audio_device_defines.h"
#include "modules/audio_device/include/test_audio_device.h"
#include "rtc_base/buffer.h"
#include "rtc_base/synchronization/mutex.h"

Просмотреть файл

@ -13,13 +13,13 @@
#include <utility>
#include "absl/types/optional.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_device_defines.h"
#include "api/task_queue/task_queue_factory.h"
#include "api/units/time_delta.h"
#include "api/units/timestamp.h"
#include "modules/audio_device/audio_device_buffer.h"
#include "modules/audio_device/audio_device_generic.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_device/include/audio_device_defines.h"
#include "modules/audio_device/include/test_audio_device.h"
#include "rtc_base/checks.h"
#include "rtc_base/synchronization/mutex.h"

Просмотреть файл

@ -13,10 +13,10 @@
#include <memory>
#include <utility>
#include "api/audio/audio_device.h"
#include "api/make_ref_counted.h"
#include "api/sequence_checker.h"
#include "modules/audio_device/audio_device_buffer.h"
#include "modules/audio_device/include/audio_device.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/string_utils.h"

Просмотреть файл

@ -14,9 +14,9 @@
#include <memory>
#include <string>
#include "api/audio/audio_device.h"
#include "api/scoped_refptr.h"
#include "api/task_queue/task_queue_factory.h"
#include "modules/audio_device/include/audio_device.h"
namespace webrtc {

Просмотреть файл

@ -23,9 +23,9 @@
#include <string>
#include "absl/strings/string_view.h"
#include "api/audio/audio_device_defines.h"
#include "api/units/time_delta.h"
#include "modules/audio_device/audio_device_name.h"
#include "modules/audio_device/include/audio_device_defines.h"
#include "rtc_base/logging.h"
#include "rtc_base/string_utils.h"

Просмотреть файл

@ -416,7 +416,7 @@ index 3ff4b58a2e..ad0f3c9396 100644
bool RtpExtension::IsSupportedForVideo(absl::string_view uri) {
diff --git a/call/BUILD.gn b/call/BUILD.gn
index 43e32a3d09..d46c7f33c5 100644
index 00fa602c3e..fef7b8faa9 100644
--- a/call/BUILD.gn
+++ b/call/BUILD.gn
@@ -20,6 +20,7 @@ rtc_library("call_interfaces") {

Просмотреть файл

@ -206,7 +206,7 @@ index 571049f3e4..f393179bbb 100644
} else {
deps += [
diff --git a/api/BUILD.gn b/api/BUILD.gn
index 2b484f8d8c..cf2e49da82 100644
index 152f2cbc9d..e760e3b005 100644
--- a/api/BUILD.gn
+++ b/api/BUILD.gn
@@ -40,6 +40,9 @@ rtc_source_set("enable_media") {
@ -470,7 +470,7 @@ index 9f89df5d80..0f8ffce027 100644
if (rtc_include_tests) {
rtc_source_set("test_feedback_generator_interface") {
diff --git a/call/BUILD.gn b/call/BUILD.gn
index d46c7f33c5..c81a012660 100644
index fef7b8faa9..d3bfb30b6f 100644
--- a/call/BUILD.gn
+++ b/call/BUILD.gn
@@ -44,7 +44,7 @@ rtc_library("call_interfaces") {
@ -482,7 +482,7 @@ index d46c7f33c5..c81a012660 100644
"../api:scoped_refptr",
"../api:transport_api",
"../api/adaptation:resource_adaptation_api",
@@ -343,6 +343,16 @@ rtc_library("call") {
@@ -344,6 +344,16 @@ rtc_library("call") {
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
@ -499,7 +499,7 @@ index d46c7f33c5..c81a012660 100644
}
rtc_source_set("receive_stream_interface") {
@@ -370,7 +380,7 @@ rtc_library("video_stream_api") {
@@ -371,7 +381,7 @@ rtc_library("video_stream_api") {
"../api:frame_transformer_interface",
"../api:rtp_headers",
"../api:rtp_parameters",
@ -581,7 +581,7 @@ index 0000000000..f6ff7f218f
+ #endif
+#endif
diff --git a/media/BUILD.gn b/media/BUILD.gn
index 6a13f78c97..c652100a09 100644
index 5a0a5ef245..77487d1dc5 100644
--- a/media/BUILD.gn
+++ b/media/BUILD.gn
@@ -79,7 +79,7 @@ rtc_library("rtc_media_base") {
@ -773,7 +773,7 @@ index 8b23955d5b..a49df7e7d2 100644
}
diff --git a/modules/audio_device/BUILD.gn b/modules/audio_device/BUILD.gn
index 359867e50c..711b62006c 100644
index d15071cdd6..637c10da31 100644
--- a/modules/audio_device/BUILD.gn
+++ b/modules/audio_device/BUILD.gn
@@ -30,6 +30,7 @@ rtc_source_set("audio_device_default") {
@ -792,7 +792,7 @@ index 359867e50c..711b62006c 100644
rtc_source_set("audio_device_api") {
visibility = [ "*" ]
@@ -63,6 +65,7 @@ rtc_library("audio_device_config") {
@@ -55,6 +57,7 @@ rtc_library("audio_device_config") {
}
rtc_library("audio_device_buffer") {
@ -800,7 +800,7 @@ index 359867e50c..711b62006c 100644
sources = [
"audio_device_buffer.cc",
"audio_device_buffer.h",
@@ -89,6 +92,7 @@ rtc_library("audio_device_buffer") {
@@ -81,6 +84,7 @@ rtc_library("audio_device_buffer") {
]
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
@ -808,15 +808,15 @@ index 359867e50c..711b62006c 100644
rtc_library("audio_device_generic") {
sources = [
@@ -265,6 +269,7 @@ if (!build_with_chromium) {
@@ -257,6 +261,7 @@ if (!build_with_chromium) {
# Contains default implementations of webrtc::AudioDeviceModule for Windows,
# Linux, Mac, iOS and Android.
rtc_library("audio_device_impl") {
+if (!build_with_mozilla) { # See Bug 1820869.
visibility = [ "*" ]
deps = [
":audio_device_api",
@@ -313,9 +318,9 @@ rtc_library("audio_device_impl") {
":audio_device_buffer",
@@ -305,9 +310,9 @@ rtc_library("audio_device_impl") {
sources = [ "include/fake_audio_device.h" ]
if (build_with_mozilla) {
@ -829,7 +829,7 @@ index 359867e50c..711b62006c 100644
]
}
@@ -420,6 +425,7 @@ rtc_library("audio_device_impl") {
@@ -412,6 +417,7 @@ rtc_library("audio_device_impl") {
sources += [ "dummy/file_audio_device_factory.h" ]
}
}
@ -837,7 +837,7 @@ index 359867e50c..711b62006c 100644
if (is_mac) {
rtc_source_set("audio_device_impl_frameworks") {
@@ -437,6 +443,7 @@ if (is_mac) {
@@ -429,6 +435,7 @@ if (is_mac) {
}
}
@ -845,7 +845,7 @@ index 359867e50c..711b62006c 100644
rtc_source_set("mock_audio_device") {
visibility = [ "*" ]
testonly = true
@@ -454,8 +461,10 @@ rtc_source_set("mock_audio_device") {
@@ -447,8 +454,10 @@ rtc_source_set("mock_audio_device") {
]
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
@ -1231,7 +1231,7 @@ index 77f5139a2f..486b37590c 100644
deps += [
"..:logging",
diff --git a/test/BUILD.gn b/test/BUILD.gn
index 26ada7fcc3..40ef2882d8 100644
index d1554d750d..c8ea5030ab 100644
--- a/test/BUILD.gn
+++ b/test/BUILD.gn
@@ -243,6 +243,7 @@ rtc_library("audio_test_common") {
@ -1290,7 +1290,7 @@ index 26ada7fcc3..40ef2882d8 100644
rtc_library("call_config_utils") {
testonly = true
diff --git a/video/BUILD.gn b/video/BUILD.gn
index cf724b7a72..9eebd13f3c 100644
index 2f25d3a33a..ca5a4175a8 100644
--- a/video/BUILD.gn
+++ b/video/BUILD.gn
@@ -17,7 +17,7 @@ rtc_library("video_stream_encoder_interface") {

Просмотреть файл

@ -43,7 +43,7 @@ index 415ad0640a..1e8cff5441 100644
} // namespace
diff --git a/audio/channel_receive.cc b/audio/channel_receive.cc
index 17cf859ed8..b743b550ba 100644
index dc34d187a9..1bcd0fcb8d 100644
--- a/audio/channel_receive.cc
+++ b/audio/channel_receive.cc
@@ -105,7 +105,8 @@ class ChannelReceive : public ChannelReceiveInterface,

Просмотреть файл

@ -14,7 +14,7 @@ Subject: Bug 1766646 - (fix) breakout Call::Stats and SharedModuleThread into
create mode 100644 call/call_basic_stats.h
diff --git a/call/BUILD.gn b/call/BUILD.gn
index c81a012660..3edfc5bfe0 100644
index d3bfb30b6f..3883ea40a2 100644
--- a/call/BUILD.gn
+++ b/call/BUILD.gn
@@ -33,6 +33,12 @@ rtc_library("call_interfaces") {

Просмотреть файл

@ -26,7 +26,7 @@ index f595a2951a..7feca08e60 100644
deps += [ "logging:rtc_event_log_proto" ]
}
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
index 8dba298cdd..4f1a6430ad 100644
index 7620217690..e9af2f7835 100644
--- a/sdk/BUILD.gn
+++ b/sdk/BUILD.gn
@@ -533,6 +533,7 @@ if (is_ios || is_mac) {

Просмотреть файл

@ -9,7 +9,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/60304c5d8a86fdecf
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/media/BUILD.gn b/media/BUILD.gn
index c652100a09..df796ffa72 100644
index 77487d1dc5..3ec6f83413 100644
--- a/media/BUILD.gn
+++ b/media/BUILD.gn
@@ -58,6 +58,11 @@ rtc_library("rtc_media_base") {

9
third_party/libwebrtc/pc/BUILD.gn поставляемый
Просмотреть файл

@ -867,6 +867,7 @@ rtc_source_set("peer_connection_internal") {
":rtp_transmission_manager",
":sctp_data_channel",
"../api:libjingle_peerconnection_api",
"../api/audio:audio_device",
"../call:call_interfaces",
"../modules/audio_device",
]
@ -907,6 +908,7 @@ rtc_source_set("rtc_stats_collector") {
"../api:rtp_parameters",
"../api:scoped_refptr",
"../api:sequence_checker",
"../api/audio:audio_device",
"../api/audio:audio_processing_statistics",
"../api/task_queue:task_queue",
"../api/units:time_delta",
@ -2145,6 +2147,7 @@ if (rtc_include_tests && !build_with_chromium) {
"../api:rtc_error",
"../api:rtc_stats_api",
"../api:scoped_refptr",
"../api/audio:audio_device",
"../api/audio:audio_mixer_api",
"../api/audio:audio_processing",
"../api/audio_codecs:audio_codecs_api",
@ -2164,7 +2167,6 @@ if (rtc_include_tests && !build_with_chromium) {
"../api/video_codecs:video_encoder_factory_template_libvpx_vp9_adapter",
"../api/video_codecs:video_encoder_factory_template_open_h264_adapter",
"../media:rtc_media_tests_utils",
"../modules/audio_device:audio_device_api",
"../p2p:basic_port_allocator",
"../p2p:connection",
"../p2p:p2p_test_utils",
@ -2367,6 +2369,7 @@ if (rtc_include_tests && !build_with_chromium) {
"../api:rtp_transceiver_direction",
"../api:scoped_refptr",
"../api/adaptation:resource_adaptation_api",
"../api/audio:audio_device",
"../api/audio:audio_mixer_api",
"../api/audio:audio_processing",
"../api/audio:audio_processing_statistics",
@ -2404,7 +2407,6 @@ if (rtc_include_tests && !build_with_chromium) {
"../media:rtc_data_sctp_transport_internal",
"../media:rtc_media_config",
"../media:stream_params",
"../modules/audio_device:audio_device_api",
"../modules/rtp_rtcp:rtp_rtcp_format",
"../p2p:basic_port_allocator",
"../p2p:connection",
@ -2597,6 +2599,7 @@ if (rtc_include_tests && !build_with_chromium) {
"../api:rtp_sender_interface",
"../api:rtp_transceiver_direction",
"../api:scoped_refptr",
"../api/audio:audio_device",
"../api/audio:audio_mixer_api",
"../api/audio:audio_processing",
"../api/crypto:frame_decryptor_interface",
@ -2620,7 +2623,6 @@ if (rtc_include_tests && !build_with_chromium) {
"../media:rtc_media_config",
"../media:rtc_media_tests_utils",
"../media:stream_params",
"../modules/audio_device:audio_device_api",
"../modules/audio_processing:audioproc_test_utils",
"../modules/rtp_rtcp:rtp_rtcp_format",
"../p2p:basic_port_allocator",
@ -2748,6 +2750,7 @@ if (rtc_include_tests && !build_with_chromium) {
"../api:rtp_parameters",
"../api:scoped_refptr",
"../api:sequence_checker",
"../api/audio:audio_device",
"../api/audio:audio_mixer_api",
"../api/audio:audio_processing",
"../api/audio_codecs:audio_codecs_api",

Просмотреть файл

@ -19,6 +19,7 @@
#include <utility>
#include <vector>
#include "api/audio/audio_device.h"
#include "api/audio/audio_mixer.h"
#include "api/audio/audio_processing.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
@ -46,7 +47,6 @@
#include "api/video_codecs/video_encoder_factory_template_libvpx_vp9_adapter.h"
#include "api/video_codecs/video_encoder_factory_template_open_h264_adapter.h"
#include "media/base/stream_params.h"
#include "modules/audio_device/include/audio_device.h"
#include "p2p/base/p2p_constants.h"
#include "p2p/base/port.h"
#include "p2p/base/port_allocator.h"

Просмотреть файл

@ -19,6 +19,7 @@
#include <vector>
#include "absl/types/optional.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_mixer.h"
#include "api/audio/audio_processing.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
@ -38,7 +39,6 @@
#include "api/video_codecs/video_encoder_factory_template_libvpx_vp8_adapter.h"
#include "api/video_codecs/video_encoder_factory_template_libvpx_vp9_adapter.h"
#include "api/video_codecs/video_encoder_factory_template_open_h264_adapter.h"
#include "modules/audio_device/include/audio_device.h"
#include "p2p/base/fake_port_allocator.h"
#include "p2p/base/port_allocator.h"
#include "p2p/base/transport_description.h"

Просмотреть файл

@ -15,6 +15,7 @@
#include <utility>
#include <vector>
#include "api/audio/audio_device.h"
#include "api/audio/audio_mixer.h"
#include "api/audio/audio_processing.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
@ -38,7 +39,6 @@
#include "api/video_codecs/video_encoder_factory_template_libvpx_vp9_adapter.h"
#include "api/video_codecs/video_encoder_factory_template_open_h264_adapter.h"
#include "media/base/fake_frame_source.h"
#include "modules/audio_device/include/audio_device.h"
#include "p2p/base/fake_port_allocator.h"
#include "p2p/base/port.h"
#include "p2p/base/port_allocator.h"

Просмотреть файл

@ -19,6 +19,7 @@
#include <vector>
#include "absl/types/optional.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_mixer.h"
#include "api/audio/audio_processing.h"
#include "api/candidate.h"
@ -28,7 +29,6 @@
#include "api/peer_connection_interface.h"
#include "api/rtc_error.h"
#include "api/scoped_refptr.h"
#include "modules/audio_device/include/audio_device.h"
#include "p2p/base/fake_port_allocator.h"
#include "p2p/base/ice_transport_internal.h"
#include "p2p/base/p2p_constants.h"

Просмотреть файл

@ -19,6 +19,7 @@
#include "absl/strings/str_replace.h"
#include "absl/types/optional.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_mixer.h"
#include "api/audio/audio_processing.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
@ -55,7 +56,6 @@
#include "media/base/stream_params.h"
#include "media/engine/webrtc_media_engine.h"
#include "media/sctp/sctp_transport_internal.h"
#include "modules/audio_device/include/audio_device.h"
#include "p2p/base/fake_port_allocator.h"
#include "p2p/base/p2p_constants.h"
#include "p2p/base/port.h"

Просмотреть файл

@ -18,9 +18,9 @@
#include <vector>
#include "absl/types/optional.h"
#include "api/audio/audio_device.h"
#include "api/peer_connection_interface.h"
#include "call/call.h"
#include "modules/audio_device/include/audio_device.h"
#include "pc/jsep_transport_controller.h"
#include "pc/peer_connection_message_handler.h"
#include "pc/rtp_transceiver.h"

Просмотреть файл

@ -20,6 +20,7 @@
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "api/audio/audio_device.h"
#include "api/enable_media_with_defaults.h"
#include "api/field_trials_view.h"
#include "api/jsep.h"
@ -40,7 +41,6 @@
#include "media/base/media_engine.h"
#include "media/base/stream_params.h"
#include "media/engine/webrtc_media_engine.h"
#include "modules/audio_device/include/audio_device.h"
#include "p2p/base/p2p_constants.h"
#include "p2p/base/port_allocator.h"
#include "p2p/base/transport_info.h"

Просмотреть файл

@ -14,6 +14,7 @@
#include <vector>
#include "absl/types/optional.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_mixer.h"
#include "api/audio/audio_processing.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
@ -40,7 +41,6 @@
#include "api/video_codecs/video_encoder_factory_template_libvpx_vp8_adapter.h"
#include "api/video_codecs/video_encoder_factory_template_libvpx_vp9_adapter.h"
#include "api/video_codecs/video_encoder_factory_template_open_h264_adapter.h"
#include "modules/audio_device/include/audio_device.h"
#include "p2p/base/port_allocator.h"
#include "p2p/base/port_interface.h"
#include "p2p/base/test_turn_server.h"

Просмотреть файл

@ -17,6 +17,7 @@
#include <vector>
#include "absl/types/optional.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_mixer.h"
#include "api/audio/audio_processing.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
@ -46,7 +47,6 @@
#include "api/video_codecs/video_encoder_factory_template_libvpx_vp9_adapter.h"
#include "api/video_codecs/video_encoder_factory_template_open_h264_adapter.h"
#include "media/base/stream_params.h"
#include "modules/audio_device/include/audio_device.h"
#include "p2p/base/port_allocator.h"
#include "pc/media_session.h"
#include "pc/peer_connection_wrapper.h"

Просмотреть файл

@ -24,6 +24,7 @@
#include <vector>
#include "absl/types/optional.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_mixer.h"
#include "api/audio/audio_processing.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
@ -51,7 +52,6 @@
#include "api/video_codecs/video_encoder_factory_template_libvpx_vp9_adapter.h"
#include "api/video_codecs/video_encoder_factory_template_open_h264_adapter.h"
#include "media/base/codec.h"
#include "modules/audio_device/include/audio_device.h"
#include "p2p/base/port_allocator.h"
#include "pc/peer_connection.h"
#include "pc/peer_connection_proxy.h"

Просмотреть файл

@ -20,6 +20,7 @@
#include "absl/algorithm/container.h"
#include "absl/strings/match.h"
#include "absl/strings/string_view.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_mixer.h"
#include "api/audio/audio_processing.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
@ -51,7 +52,6 @@
#include "media/base/media_constants.h"
#include "media/base/rid_description.h"
#include "media/base/stream_params.h"
#include "modules/audio_device/include/audio_device.h"
#include "pc/channel_interface.h"
#include "pc/peer_connection_wrapper.h"
#include "pc/sdp_utils.h"

Просмотреть файл

@ -25,6 +25,7 @@
#include "absl/functional/bind_front.h"
#include "absl/strings/string_view.h"
#include "api/array_view.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_processing_statistics.h"
#include "api/candidate.h"
#include "api/dtls_transport_interface.h"
@ -40,7 +41,6 @@
#include "common_video/include/quality_limitation_reason.h"
#include "media/base/media_channel.h"
#include "media/base/media_channel_impl.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/rtp_rtcp/include/report_block_data.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "p2p/base/connection_info.h"

Просмотреть файл

@ -20,6 +20,7 @@
#include <vector>
#include "absl/types/optional.h"
#include "api/audio/audio_device.h"
#include "api/data_channel_interface.h"
#include "api/media_types.h"
#include "api/scoped_refptr.h"
@ -28,7 +29,6 @@
#include "api/stats/rtcstats_objects.h"
#include "call/call.h"
#include "media/base/media_channel.h"
#include "modules/audio_device/include/audio_device.h"
#include "pc/data_channel_utils.h"
#include "pc/peer_connection_internal.h"
#include "pc/rtp_receiver.h"

Просмотреть файл

@ -24,6 +24,7 @@
#include "absl/strings/str_replace.h"
#include "absl/types/optional.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_processing_statistics.h"
#include "api/candidate.h"
#include "api/dtls_transport_interface.h"
@ -46,7 +47,6 @@
#include "api/video_codecs/scalability_mode.h"
#include "common_video/include/quality_limitation_reason.h"
#include "media/base/media_channel.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/rtp_rtcp/include/report_block_data.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "p2p/base/connection_info.h"

Просмотреть файл

@ -13,6 +13,7 @@
#include <vector>
#include "absl/strings/str_replace.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_mixer.h"
#include "api/audio/audio_processing.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
@ -32,7 +33,6 @@
#include "api/video_codecs/video_encoder_factory_template_libvpx_vp8_adapter.h"
#include "api/video_codecs/video_encoder_factory_template_libvpx_vp9_adapter.h"
#include "api/video_codecs/video_encoder_factory_template_open_h264_adapter.h"
#include "modules/audio_device/include/audio_device.h"
#include "p2p/base/port_allocator.h"
#include "pc/peer_connection_wrapper.h"
#include "pc/session_description.h"

Просмотреть файл

@ -25,10 +25,10 @@
#include <memory>
#include "api/audio/audio_device.h"
#include "api/audio/audio_device_defines.h"
#include "api/scoped_refptr.h"
#include "api/sequence_checker.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_device/include/audio_device_defines.h"
#include "rtc_base/synchronization/mutex.h"
#include "rtc_base/thread_annotations.h"

Просмотреть файл

@ -30,6 +30,7 @@
#include "absl/memory/memory.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_processing.h"
#include "api/audio_options.h"
#include "api/candidate.h"
@ -69,7 +70,6 @@
#include "media/base/media_engine.h"
#include "media/base/stream_params.h"
#include "media/engine/fake_webrtc_video_engine.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_processing/test/audio_processing_builder_for_testing.h"
#include "p2p/base/fake_ice_transport.h"
#include "p2p/base/ice_transport_internal.h"

Просмотреть файл

@ -17,7 +17,7 @@
#include <string>
#include <vector>
#include "modules/audio_device/include/audio_device.h"
#include "api/audio/audio_device.h"
#include "pc/peer_connection_internal.h"
#include "test/gmock.h"

Просмотреть файл

@ -19,6 +19,7 @@
#include "absl/strings/match.h"
#include "absl/types/optional.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_mixer.h"
#include "api/audio/audio_processing.h"
#include "api/create_peerconnection_factory.h"
@ -38,7 +39,6 @@
#include "api/video_codecs/video_encoder_factory_template_libvpx_vp9_adapter.h"
#include "api/video_codecs/video_encoder_factory_template_open_h264_adapter.h"
#include "media/engine/simulcast_encoder_adapter.h"
#include "modules/audio_device/include/audio_device.h"
#include "p2p/base/fake_port_allocator.h"
#include "p2p/base/port_allocator.h"
#include "pc/test/fake_periodic_video_source.h"

12
third_party/libwebrtc/sdk/BUILD.gn поставляемый
Просмотреть файл

@ -234,7 +234,7 @@ if (is_ios || is_mac) {
deps = [
":audio_device",
"../api:make_ref_counted",
"../modules/audio_device:audio_device_api",
"../api/audio:audio_device",
"../modules/audio_device:audio_device_generic",
"../rtc_base:checks",
"../rtc_base:logging",
@ -298,10 +298,10 @@ if (is_ios || is_mac) {
"../api:array_view",
"../api:scoped_refptr",
"../api:sequence_checker",
"../api/audio:audio_device",
"../api/task_queue",
"../api/task_queue:default_task_queue_factory",
"../api/task_queue:pending_task_safety_flag",
"../modules/audio_device:audio_device_api",
"../modules/audio_device:audio_device_buffer",
"../modules/audio_device:audio_device_config",
"../modules/audio_device:audio_device_generic",
@ -497,9 +497,9 @@ if (is_ios || is_mac) {
"../api:refcountedbase",
"../api:scoped_refptr",
"../api:sequence_checker",
"../api/audio:audio_device",
"../api/task_queue",
"../api/task_queue:default_task_queue_factory",
"../modules/audio_device:audio_device_api",
"../modules/audio_device:audio_device_buffer",
"../rtc_base:buffer",
"../rtc_base:checks",
@ -525,7 +525,7 @@ if (is_ios || is_mac) {
":audio_device_api_objc",
":audio_device_objc",
"../api:make_ref_counted",
"../modules/audio_device:audio_device_api",
"../api/audio:audio_device",
"../rtc_base:logging",
]
if (is_mac) {
@ -1071,6 +1071,7 @@ if (is_ios || is_mac) {
"../api:rtp_parameters",
"../api:rtp_sender_interface",
"../api:scoped_refptr",
"../api/audio:audio_device",
"../api/audio:audio_processing",
"../api/audio_codecs:audio_codecs_api",
"../api/audio_codecs:builtin_audio_decoder_factory",
@ -1086,7 +1087,6 @@ if (is_ios || is_mac) {
"../common_video",
"../media:media_constants",
"../media:rtc_media_base",
"../modules/audio_device:audio_device_api",
"../modules/audio_processing",
"../modules/video_coding:video_codec_interface",
"../pc:peer_connection_factory",
@ -1174,6 +1174,7 @@ if (is_ios || is_mac) {
":videosource_objc",
":videotoolbox_objc",
"../api:scoped_refptr",
"../api/audio:audio_device",
"../api/audio:audio_processing",
"../api/audio_codecs:builtin_audio_decoder_factory",
"../api/audio_codecs:builtin_audio_encoder_factory",
@ -1185,7 +1186,6 @@ if (is_ios || is_mac) {
"../media:codec",
"../media:rtc_media_base",
"../media:rtc_media_tests_utils",
"../modules/audio_device:audio_device_api",
"../modules/video_coding:video_codec_interface",
"../rtc_base:gunit_helpers",
"../rtc_base:macromagic",

Просмотреть файл

@ -31,6 +31,7 @@
#include "sdk/objc/native/api/ssl_certificate_verifier.h"
#include "system_wrappers/include/field_trial.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_processing.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
@ -41,7 +42,6 @@
#import "components/video_codec/RTCVideoDecoderFactoryH264.h"
#import "components/video_codec/RTCVideoEncoderFactoryH264.h"
#include "media/base/media_constants.h"
#include "modules/audio_device/include/audio_device.h"
#include "sdk/objc/native/api/objc_audio_device_module.h"
#include "sdk/objc/native/api/video_decoder_factory.h"

Просмотреть файл

@ -11,12 +11,12 @@
#import "RTCPeerConnectionFactoryBuilder.h"
#import "RTCPeerConnectionFactory+Native.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_processing.h"
#include "api/audio_codecs/audio_decoder_factory.h"
#include "api/audio_codecs/audio_encoder_factory.h"
#include "api/video_codecs/video_decoder_factory.h"
#include "api/video_codecs/video_encoder_factory.h"
#include "modules/audio_device/include/audio_device.h"
@implementation RTCPeerConnectionFactoryBuilder {
std::unique_ptr<webrtc::VideoEncoderFactory> _videoEncoderFactory;

Просмотреть файл

@ -13,7 +13,7 @@
#include <memory>
#include "modules/audio_device/include/audio_device.h"
#include "api/audio/audio_device.h"
namespace webrtc {

Просмотреть файл

@ -11,8 +11,8 @@
#ifndef SDK_OBJC_NATIVE_API_OBJC_AUDIO_DEVICE_MODULE_H_
#define SDK_OBJC_NATIVE_API_OBJC_AUDIO_DEVICE_MODULE_H_
#include "api/audio/audio_device.h"
#import "components/audio/RTCAudioDevice.h"
#include "modules/audio_device/include/audio_device.h"
namespace webrtc {

Просмотреть файл

@ -13,10 +13,10 @@
#include <memory>
#include "api/audio/audio_device.h"
#include "api/task_queue/task_queue_factory.h"
#include "audio_device_ios.h"
#include "modules/audio_device/audio_device_buffer.h"
#include "modules/audio_device/include/audio_device.h"
#include "rtc_base/checks.h"
namespace webrtc {

Просмотреть файл

@ -15,8 +15,8 @@
#import "components/audio/RTCAudioDevice.h"
#include "api/audio/audio_device.h"
#include "modules/audio_device/audio_device_buffer.h"
#include "modules/audio_device/include/audio_device.h"
#include "rtc_base/thread.h"
@class ObjCAudioDeviceDelegate;

Просмотреть файл

@ -21,12 +21,12 @@ extern "C" {
#import "api/peerconnection/RTCPeerConnectionFactoryBuilder+DefaultComponents.h"
#import "api/peerconnection/RTCPeerConnectionFactoryBuilder.h"
#include "api/audio/audio_device.h"
#include "api/audio/audio_processing.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
#include "api/video_codecs/video_decoder_factory.h"
#include "api/video_codecs/video_encoder_factory.h"
#include "modules/audio_device/include/audio_device.h"
#include "rtc_base/gunit.h"
#include "rtc_base/system/unused.h"

2
third_party/libwebrtc/test/BUILD.gn поставляемый
Просмотреть файл

@ -1278,6 +1278,7 @@ if (!build_with_chromium) {
"../api:rtp_parameters",
"../api:simulated_network_api",
"../api:transport_api",
"../api/audio:audio_device",
"../api/audio_codecs:builtin_audio_decoder_factory",
"../api/audio_codecs:builtin_audio_encoder_factory",
"../api/environment",
@ -1297,7 +1298,6 @@ if (!build_with_chromium) {
"../call:simulated_network",
"../call:simulated_packet_receiver",
"../call:video_stream_api",
"../modules/audio_device:audio_device_api",
"../modules/audio_device:test_audio_device_module",
"../modules/audio_mixer:audio_mixer_impl",
"../modules/rtp_rtcp",

2
third_party/libwebrtc/test/call_test.cc поставляемый
Просмотреть файл

@ -13,6 +13,7 @@
#include <algorithm>
#include <memory>
#include "api/audio/audio_device.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
#include "api/environment/environment.h"
@ -23,7 +24,6 @@
#include "call/fake_network_pipe.h"
#include "call/packet_receiver.h"
#include "call/simulated_network.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_device/include/test_audio_device.h"
#include "modules/audio_mixer/audio_mixer_impl.h"
#include "rtc_base/checks.h"

2
third_party/libwebrtc/test/call_test.h поставляемый
Просмотреть файл

@ -17,6 +17,7 @@
#include "absl/types/optional.h"
#include "api/array_view.h"
#include "api/audio/audio_device.h"
#include "api/environment/environment.h"
#include "api/rtc_event_log/rtc_event_log.h"
#include "api/task_queue/task_queue_base.h"
@ -27,7 +28,6 @@
#include "api/units/time_delta.h"
#include "api/video/video_bitrate_allocator_factory.h"
#include "call/call.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_device/include/test_audio_device.h"
#include "test/encoder_settings.h"
#include "test/fake_decoder.h"

Просмотреть файл

@ -87,6 +87,7 @@ if (rtc_include_tests && !build_with_chromium) {
"../../api:sequence_checker",
"../../api:time_controller",
"../../api:transport_api",
"../../api/audio:audio_device",
"../../api/audio_codecs:builtin_audio_decoder_factory",
"../../api/audio_codecs:builtin_audio_encoder_factory",
"../../api/environment",

Просмотреть файл

@ -17,13 +17,13 @@
#include <vector>
#include "api/array_view.h"
#include "api/audio/audio_device.h"
#include "api/environment/environment.h"
#include "api/rtc_event_log/rtc_event_log.h"
#include "api/rtp_parameters.h"
#include "api/test/time_controller.h"
#include "api/units/data_rate.h"
#include "call/call.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/congestion_controller/goog_cc/test/goog_cc_printer.h"
#include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
#include "rtc_base/task_queue_for_test.h"

2
third_party/libwebrtc/video/BUILD.gn поставляемый
Просмотреть файл

@ -520,6 +520,7 @@ if (rtc_include_tests) {
"../api:rtc_event_log_output_file",
"../api:test_dependency_factory",
"../api:video_quality_test_fixture_api",
"../api/audio:audio_device",
"../api/environment",
"../api/numerics",
"../api/rtc_event_log:rtc_event_log_factory",
@ -539,7 +540,6 @@ if (rtc_include_tests) {
"../media:rtc_audio_video",
"../media:rtc_internal_video_codecs",
"../media:rtc_simulcast_encoder_adapter",
"../modules/audio_device:audio_device_api",
"../modules/audio_device:audio_device_module_from_input_and_output",
"../modules/audio_device:windows_core_audio_utility",
"../modules/audio_mixer:audio_mixer_impl",

Просмотреть файл

@ -22,6 +22,7 @@
#include <string>
#include <vector>
#include "api/audio/audio_device.h"
#include "api/fec_controller_override.h"
#include "api/rtc_event_log_output_file.h"
#include "api/task_queue/default_task_queue_factory.h"
@ -37,7 +38,6 @@
#include "media/engine/internal_encoder_factory.h"
#include "media/engine/simulcast_encoder_adapter.h"
#include "media/engine/webrtc_video_engine.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_mixer/audio_mixer_impl.h"
#include "modules/video_coding/codecs/h264/include/h264.h"
#include "modules/video_coding/codecs/vp8/include/vp8.h"

Просмотреть файл

@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "api/audio/audio_device.h"
#include "api/audio/audio_processing.h"
#include "api/audio_codecs/audio_decoder_factory_template.h"
#include "api/audio_codecs/audio_encoder_factory_template.h"
@ -29,7 +30,6 @@
#include "api/video_codecs/video_encoder_factory_template_libvpx_vp8_adapter.h"
#include "api/video_codecs/video_encoder_factory_template_libvpx_vp9_adapter.h"
#include "api/video_codecs/video_encoder_factory_template_open_h264_adapter.h"
#include "modules/audio_device/include/audio_device.h"
namespace webrtc {