Remove RTC_DISALLOW_COPY_AND_ASSIGN from modules/
Bug: webrtc:13555, webrtc:13082 Change-Id: I2c2cbcbd918f0cfa970c1a964893220ba11d4b41 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/247960 Reviewed-by: Artem Titov <titovartem@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com> Cr-Commit-Position: refs/heads/main@{#35771}
This commit is contained in:

committed by
WebRTC LUCI CQ

parent
ce6170fcdf
commit
604fd2f1ab
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#include "api/audio_codecs/audio_decoder_factory.h"
|
#include "api/audio_codecs/audio_decoder_factory.h"
|
||||||
#include "api/scoped_refptr.h"
|
#include "api/scoped_refptr.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "system_wrappers/include/clock.h"
|
#include "system_wrappers/include/clock.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
@ -45,6 +44,9 @@ class AcmReceiveTestOldApi {
|
|||||||
rtc::scoped_refptr<AudioDecoderFactory> decoder_factory);
|
rtc::scoped_refptr<AudioDecoderFactory> decoder_factory);
|
||||||
virtual ~AcmReceiveTestOldApi();
|
virtual ~AcmReceiveTestOldApi();
|
||||||
|
|
||||||
|
AcmReceiveTestOldApi(const AcmReceiveTestOldApi&) = delete;
|
||||||
|
AcmReceiveTestOldApi& operator=(const AcmReceiveTestOldApi&) = delete;
|
||||||
|
|
||||||
// Registers the codecs with default parameters from ACM.
|
// Registers the codecs with default parameters from ACM.
|
||||||
void RegisterDefaultCodecs();
|
void RegisterDefaultCodecs();
|
||||||
|
|
||||||
@ -67,8 +69,6 @@ class AcmReceiveTestOldApi {
|
|||||||
AudioSink* audio_sink_;
|
AudioSink* audio_sink_;
|
||||||
int output_freq_hz_;
|
int output_freq_hz_;
|
||||||
NumOutputChannels exptected_output_channels_;
|
NumOutputChannels exptected_output_channels_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AcmReceiveTestOldApi);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// This test toggles the output frequency every `toggle_period_ms`. The test
|
// This test toggles the output frequency every `toggle_period_ms`. The test
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
#include "api/audio/audio_frame.h"
|
#include "api/audio/audio_frame.h"
|
||||||
#include "modules/audio_coding/include/audio_coding_module.h"
|
#include "modules/audio_coding/include/audio_coding_module.h"
|
||||||
#include "modules/audio_coding/neteq/tools/packet_source.h"
|
#include "modules/audio_coding/neteq/tools/packet_source.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "system_wrappers/include/clock.h"
|
#include "system_wrappers/include/clock.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
@ -35,6 +34,9 @@ class AcmSendTestOldApi : public AudioPacketizationCallback,
|
|||||||
int test_duration_ms);
|
int test_duration_ms);
|
||||||
~AcmSendTestOldApi() override;
|
~AcmSendTestOldApi() override;
|
||||||
|
|
||||||
|
AcmSendTestOldApi(const AcmSendTestOldApi&) = delete;
|
||||||
|
AcmSendTestOldApi& operator=(const AcmSendTestOldApi&) = delete;
|
||||||
|
|
||||||
// Registers the send codec. Returns true on success, false otherwise.
|
// Registers the send codec. Returns true on success, false otherwise.
|
||||||
bool RegisterCodec(const char* payload_name,
|
bool RegisterCodec(const char* payload_name,
|
||||||
int sampling_freq_hz,
|
int sampling_freq_hz,
|
||||||
@ -81,8 +83,6 @@ class AcmSendTestOldApi : public AudioPacketizationCallback,
|
|||||||
uint16_t sequence_number_;
|
uint16_t sequence_number_;
|
||||||
std::vector<uint8_t> last_payload_vec_;
|
std::vector<uint8_t> last_payload_vec_;
|
||||||
bool data_to_send_;
|
bool data_to_send_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AcmSendTestOldApi);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace test
|
} // namespace test
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include "modules/audio_coding/audio_network_adaptor/debug_dump_writer.h"
|
#include "modules/audio_coding/audio_network_adaptor/debug_dump_writer.h"
|
||||||
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h"
|
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h"
|
||||||
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
|
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -44,6 +43,9 @@ class AudioNetworkAdaptorImpl final : public AudioNetworkAdaptor {
|
|||||||
|
|
||||||
~AudioNetworkAdaptorImpl() override;
|
~AudioNetworkAdaptorImpl() override;
|
||||||
|
|
||||||
|
AudioNetworkAdaptorImpl(const AudioNetworkAdaptorImpl&) = delete;
|
||||||
|
AudioNetworkAdaptorImpl& operator=(const AudioNetworkAdaptorImpl&) = delete;
|
||||||
|
|
||||||
void SetUplinkBandwidth(int uplink_bandwidth_bps) override;
|
void SetUplinkBandwidth(int uplink_bandwidth_bps) override;
|
||||||
|
|
||||||
void SetUplinkPacketLossFraction(float uplink_packet_loss_fraction) override;
|
void SetUplinkPacketLossFraction(float uplink_packet_loss_fraction) override;
|
||||||
@ -80,8 +82,6 @@ class AudioNetworkAdaptorImpl final : public AudioNetworkAdaptor {
|
|||||||
absl::optional<AudioEncoderRuntimeConfig> prev_config_;
|
absl::optional<AudioEncoderRuntimeConfig> prev_config_;
|
||||||
|
|
||||||
ANAStats stats_;
|
ANAStats stats_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioNetworkAdaptorImpl);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include "absl/types/optional.h"
|
#include "absl/types/optional.h"
|
||||||
#include "modules/audio_coding/audio_network_adaptor/controller.h"
|
#include "modules/audio_coding/audio_network_adaptor/controller.h"
|
||||||
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
|
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace audio_network_adaptor {
|
namespace audio_network_adaptor {
|
||||||
@ -39,6 +38,9 @@ class BitrateController final : public Controller {
|
|||||||
|
|
||||||
~BitrateController() override;
|
~BitrateController() override;
|
||||||
|
|
||||||
|
BitrateController(const BitrateController&) = delete;
|
||||||
|
BitrateController& operator=(const BitrateController&) = delete;
|
||||||
|
|
||||||
void UpdateNetworkMetrics(const NetworkMetrics& network_metrics) override;
|
void UpdateNetworkMetrics(const NetworkMetrics& network_metrics) override;
|
||||||
|
|
||||||
void MakeDecision(AudioEncoderRuntimeConfig* config) override;
|
void MakeDecision(AudioEncoderRuntimeConfig* config) override;
|
||||||
@ -49,7 +51,6 @@ class BitrateController final : public Controller {
|
|||||||
int frame_length_ms_;
|
int frame_length_ms_;
|
||||||
absl::optional<int> target_audio_bitrate_bps_;
|
absl::optional<int> target_audio_bitrate_bps_;
|
||||||
absl::optional<size_t> overhead_bytes_per_packet_;
|
absl::optional<size_t> overhead_bytes_per_packet_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(BitrateController);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace audio_network_adaptor
|
} // namespace audio_network_adaptor
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include "absl/types/optional.h"
|
#include "absl/types/optional.h"
|
||||||
#include "modules/audio_coding/audio_network_adaptor/controller.h"
|
#include "modules/audio_coding/audio_network_adaptor/controller.h"
|
||||||
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
|
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -41,6 +40,9 @@ class ChannelController final : public Controller {
|
|||||||
|
|
||||||
~ChannelController() override;
|
~ChannelController() override;
|
||||||
|
|
||||||
|
ChannelController(const ChannelController&) = delete;
|
||||||
|
ChannelController& operator=(const ChannelController&) = delete;
|
||||||
|
|
||||||
void UpdateNetworkMetrics(const NetworkMetrics& network_metrics) override;
|
void UpdateNetworkMetrics(const NetworkMetrics& network_metrics) override;
|
||||||
|
|
||||||
void MakeDecision(AudioEncoderRuntimeConfig* config) override;
|
void MakeDecision(AudioEncoderRuntimeConfig* config) override;
|
||||||
@ -49,7 +51,6 @@ class ChannelController final : public Controller {
|
|||||||
const Config config_;
|
const Config config_;
|
||||||
size_t channels_to_encode_;
|
size_t channels_to_encode_;
|
||||||
absl::optional<int> uplink_bandwidth_bps_;
|
absl::optional<int> uplink_bandwidth_bps_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ChannelController);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "modules/audio_coding/audio_network_adaptor/controller.h"
|
#include "modules/audio_coding/audio_network_adaptor/controller.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -80,6 +79,9 @@ class ControllerManagerImpl final : public ControllerManager {
|
|||||||
|
|
||||||
~ControllerManagerImpl() override;
|
~ControllerManagerImpl() override;
|
||||||
|
|
||||||
|
ControllerManagerImpl(const ControllerManagerImpl&) = delete;
|
||||||
|
ControllerManagerImpl& operator=(const ControllerManagerImpl&) = delete;
|
||||||
|
|
||||||
// Sort controllers based on their significance.
|
// Sort controllers based on their significance.
|
||||||
std::vector<Controller*> GetSortedControllers(
|
std::vector<Controller*> GetSortedControllers(
|
||||||
const Controller::NetworkMetrics& metrics) override;
|
const Controller::NetworkMetrics& metrics) override;
|
||||||
@ -114,8 +116,6 @@ class ControllerManagerImpl final : public ControllerManager {
|
|||||||
// `scoring_points_` saves the scoring points of various
|
// `scoring_points_` saves the scoring points of various
|
||||||
// controllers.
|
// controllers.
|
||||||
std::map<const Controller*, ScoringPoint> controller_scoring_points_;
|
std::map<const Controller*, ScoringPoint> controller_scoring_points_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ControllerManagerImpl);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include "absl/types/optional.h"
|
#include "absl/types/optional.h"
|
||||||
#include "modules/audio_coding/audio_network_adaptor/controller.h"
|
#include "modules/audio_coding/audio_network_adaptor/controller.h"
|
||||||
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
|
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -35,6 +34,9 @@ class DtxController final : public Controller {
|
|||||||
|
|
||||||
~DtxController() override;
|
~DtxController() override;
|
||||||
|
|
||||||
|
DtxController(const DtxController&) = delete;
|
||||||
|
DtxController& operator=(const DtxController&) = delete;
|
||||||
|
|
||||||
void UpdateNetworkMetrics(const NetworkMetrics& network_metrics) override;
|
void UpdateNetworkMetrics(const NetworkMetrics& network_metrics) override;
|
||||||
|
|
||||||
void MakeDecision(AudioEncoderRuntimeConfig* config) override;
|
void MakeDecision(AudioEncoderRuntimeConfig* config) override;
|
||||||
@ -43,7 +45,6 @@ class DtxController final : public Controller {
|
|||||||
const Config config_;
|
const Config config_;
|
||||||
bool dtx_enabled_;
|
bool dtx_enabled_;
|
||||||
absl::optional<int> uplink_bandwidth_bps_;
|
absl::optional<int> uplink_bandwidth_bps_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(DtxController);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#define MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_EVENT_LOG_WRITER_H_
|
#define MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_EVENT_LOG_WRITER_H_
|
||||||
|
|
||||||
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
|
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
class RtcEventLog;
|
class RtcEventLog;
|
||||||
@ -24,6 +23,10 @@ class EventLogWriter final {
|
|||||||
float min_bitrate_change_fraction,
|
float min_bitrate_change_fraction,
|
||||||
float min_packet_loss_change_fraction);
|
float min_packet_loss_change_fraction);
|
||||||
~EventLogWriter();
|
~EventLogWriter();
|
||||||
|
|
||||||
|
EventLogWriter(const EventLogWriter&) = delete;
|
||||||
|
EventLogWriter& operator=(const EventLogWriter&) = delete;
|
||||||
|
|
||||||
void MaybeLogEncoderConfig(const AudioEncoderRuntimeConfig& config);
|
void MaybeLogEncoderConfig(const AudioEncoderRuntimeConfig& config);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -34,7 +37,6 @@ class EventLogWriter final {
|
|||||||
const float min_bitrate_change_fraction_;
|
const float min_bitrate_change_fraction_;
|
||||||
const float min_packet_loss_change_fraction_;
|
const float min_packet_loss_change_fraction_;
|
||||||
AudioEncoderRuntimeConfig last_logged_config_;
|
AudioEncoderRuntimeConfig last_logged_config_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(EventLogWriter);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
#include "modules/audio_coding/audio_network_adaptor/controller.h"
|
#include "modules/audio_coding/audio_network_adaptor/controller.h"
|
||||||
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
|
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
|
||||||
#include "modules/audio_coding/audio_network_adaptor/util/threshold_curve.h"
|
#include "modules/audio_coding/audio_network_adaptor/util/threshold_curve.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -53,6 +52,9 @@ class FecControllerPlrBased final : public Controller {
|
|||||||
|
|
||||||
~FecControllerPlrBased() override;
|
~FecControllerPlrBased() override;
|
||||||
|
|
||||||
|
FecControllerPlrBased(const FecControllerPlrBased&) = delete;
|
||||||
|
FecControllerPlrBased& operator=(const FecControllerPlrBased&) = delete;
|
||||||
|
|
||||||
void UpdateNetworkMetrics(const NetworkMetrics& network_metrics) override;
|
void UpdateNetworkMetrics(const NetworkMetrics& network_metrics) override;
|
||||||
|
|
||||||
void MakeDecision(AudioEncoderRuntimeConfig* config) override;
|
void MakeDecision(AudioEncoderRuntimeConfig* config) override;
|
||||||
@ -65,8 +67,6 @@ class FecControllerPlrBased final : public Controller {
|
|||||||
bool fec_enabled_;
|
bool fec_enabled_;
|
||||||
absl::optional<int> uplink_bandwidth_bps_;
|
absl::optional<int> uplink_bandwidth_bps_;
|
||||||
const std::unique_ptr<SmoothingFilter> packet_loss_smoother_;
|
const std::unique_ptr<SmoothingFilter> packet_loss_smoother_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(FecControllerPlrBased);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include "absl/types/optional.h"
|
#include "absl/types/optional.h"
|
||||||
#include "modules/audio_coding/audio_network_adaptor/controller.h"
|
#include "modules/audio_coding/audio_network_adaptor/controller.h"
|
||||||
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
|
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -62,6 +61,9 @@ class FrameLengthController final : public Controller {
|
|||||||
|
|
||||||
~FrameLengthController() override;
|
~FrameLengthController() override;
|
||||||
|
|
||||||
|
FrameLengthController(const FrameLengthController&) = delete;
|
||||||
|
FrameLengthController& operator=(const FrameLengthController&) = delete;
|
||||||
|
|
||||||
void UpdateNetworkMetrics(const NetworkMetrics& network_metrics) override;
|
void UpdateNetworkMetrics(const NetworkMetrics& network_metrics) override;
|
||||||
|
|
||||||
void MakeDecision(AudioEncoderRuntimeConfig* config) override;
|
void MakeDecision(AudioEncoderRuntimeConfig* config) override;
|
||||||
@ -84,8 +86,6 @@ class FrameLengthController final : public Controller {
|
|||||||
// True if the previous frame length decision was an increase, otherwise
|
// True if the previous frame length decision was an increase, otherwise
|
||||||
// false.
|
// false.
|
||||||
bool prev_decision_increase_ = false;
|
bool prev_decision_increase_ = false;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(FrameLengthController);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include "api/audio_codecs/audio_decoder.h"
|
#include "api/audio_codecs/audio_decoder.h"
|
||||||
#include "rtc_base/buffer.h"
|
#include "rtc_base/buffer.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -28,6 +27,10 @@ class AudioDecoderPcmU final : public AudioDecoder {
|
|||||||
explicit AudioDecoderPcmU(size_t num_channels) : num_channels_(num_channels) {
|
explicit AudioDecoderPcmU(size_t num_channels) : num_channels_(num_channels) {
|
||||||
RTC_DCHECK_GE(num_channels, 1);
|
RTC_DCHECK_GE(num_channels, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AudioDecoderPcmU(const AudioDecoderPcmU&) = delete;
|
||||||
|
AudioDecoderPcmU& operator=(const AudioDecoderPcmU&) = delete;
|
||||||
|
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload,
|
std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload,
|
||||||
uint32_t timestamp) override;
|
uint32_t timestamp) override;
|
||||||
@ -44,7 +47,6 @@ class AudioDecoderPcmU final : public AudioDecoder {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
const size_t num_channels_;
|
const size_t num_channels_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcmU);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class AudioDecoderPcmA final : public AudioDecoder {
|
class AudioDecoderPcmA final : public AudioDecoder {
|
||||||
@ -52,6 +54,10 @@ class AudioDecoderPcmA final : public AudioDecoder {
|
|||||||
explicit AudioDecoderPcmA(size_t num_channels) : num_channels_(num_channels) {
|
explicit AudioDecoderPcmA(size_t num_channels) : num_channels_(num_channels) {
|
||||||
RTC_DCHECK_GE(num_channels, 1);
|
RTC_DCHECK_GE(num_channels, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AudioDecoderPcmA(const AudioDecoderPcmA&) = delete;
|
||||||
|
AudioDecoderPcmA& operator=(const AudioDecoderPcmA&) = delete;
|
||||||
|
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload,
|
std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload,
|
||||||
uint32_t timestamp) override;
|
uint32_t timestamp) override;
|
||||||
@ -68,7 +74,6 @@ class AudioDecoderPcmA final : public AudioDecoder {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
const size_t num_channels_;
|
const size_t num_channels_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcmA);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
#include "absl/types/optional.h"
|
#include "absl/types/optional.h"
|
||||||
#include "api/audio_codecs/audio_encoder.h"
|
#include "api/audio_codecs/audio_encoder.h"
|
||||||
#include "api/units/time_delta.h"
|
#include "api/units/time_delta.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -83,6 +82,9 @@ class AudioEncoderPcmA final : public AudioEncoderPcm {
|
|||||||
explicit AudioEncoderPcmA(const Config& config)
|
explicit AudioEncoderPcmA(const Config& config)
|
||||||
: AudioEncoderPcm(config, kSampleRateHz) {}
|
: AudioEncoderPcm(config, kSampleRateHz) {}
|
||||||
|
|
||||||
|
AudioEncoderPcmA(const AudioEncoderPcmA&) = delete;
|
||||||
|
AudioEncoderPcmA& operator=(const AudioEncoderPcmA&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
size_t EncodeCall(const int16_t* audio,
|
size_t EncodeCall(const int16_t* audio,
|
||||||
size_t input_len,
|
size_t input_len,
|
||||||
@ -94,7 +96,6 @@ class AudioEncoderPcmA final : public AudioEncoderPcm {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
static const int kSampleRateHz = 8000;
|
static const int kSampleRateHz = 8000;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderPcmA);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class AudioEncoderPcmU final : public AudioEncoderPcm {
|
class AudioEncoderPcmU final : public AudioEncoderPcm {
|
||||||
@ -106,6 +107,9 @@ class AudioEncoderPcmU final : public AudioEncoderPcm {
|
|||||||
explicit AudioEncoderPcmU(const Config& config)
|
explicit AudioEncoderPcmU(const Config& config)
|
||||||
: AudioEncoderPcm(config, kSampleRateHz) {}
|
: AudioEncoderPcm(config, kSampleRateHz) {}
|
||||||
|
|
||||||
|
AudioEncoderPcmU(const AudioEncoderPcmU&) = delete;
|
||||||
|
AudioEncoderPcmU& operator=(const AudioEncoderPcmU&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
size_t EncodeCall(const int16_t* audio,
|
size_t EncodeCall(const int16_t* audio,
|
||||||
size_t input_len,
|
size_t input_len,
|
||||||
@ -117,7 +121,6 @@ class AudioEncoderPcmU final : public AudioEncoderPcm {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
static const int kSampleRateHz = 8000;
|
static const int kSampleRateHz = 8000;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderPcmU);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#define MODULES_AUDIO_CODING_CODECS_G722_AUDIO_DECODER_G722_H_
|
#define MODULES_AUDIO_CODING_CODECS_G722_AUDIO_DECODER_G722_H_
|
||||||
|
|
||||||
#include "api/audio_codecs/audio_decoder.h"
|
#include "api/audio_codecs/audio_decoder.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
typedef struct WebRtcG722DecInst G722DecInst;
|
typedef struct WebRtcG722DecInst G722DecInst;
|
||||||
|
|
||||||
@ -22,6 +21,10 @@ class AudioDecoderG722Impl final : public AudioDecoder {
|
|||||||
public:
|
public:
|
||||||
AudioDecoderG722Impl();
|
AudioDecoderG722Impl();
|
||||||
~AudioDecoderG722Impl() override;
|
~AudioDecoderG722Impl() override;
|
||||||
|
|
||||||
|
AudioDecoderG722Impl(const AudioDecoderG722Impl&) = delete;
|
||||||
|
AudioDecoderG722Impl& operator=(const AudioDecoderG722Impl&) = delete;
|
||||||
|
|
||||||
bool HasDecodePlc() const override;
|
bool HasDecodePlc() const override;
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload,
|
std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload,
|
||||||
@ -39,13 +42,17 @@ class AudioDecoderG722Impl final : public AudioDecoder {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
G722DecInst* dec_state_;
|
G722DecInst* dec_state_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderG722Impl);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class AudioDecoderG722StereoImpl final : public AudioDecoder {
|
class AudioDecoderG722StereoImpl final : public AudioDecoder {
|
||||||
public:
|
public:
|
||||||
AudioDecoderG722StereoImpl();
|
AudioDecoderG722StereoImpl();
|
||||||
~AudioDecoderG722StereoImpl() override;
|
~AudioDecoderG722StereoImpl() override;
|
||||||
|
|
||||||
|
AudioDecoderG722StereoImpl(const AudioDecoderG722StereoImpl&) = delete;
|
||||||
|
AudioDecoderG722StereoImpl& operator=(const AudioDecoderG722StereoImpl&) =
|
||||||
|
delete;
|
||||||
|
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload,
|
std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload,
|
||||||
uint32_t timestamp) override;
|
uint32_t timestamp) override;
|
||||||
@ -71,7 +78,6 @@ class AudioDecoderG722StereoImpl final : public AudioDecoder {
|
|||||||
|
|
||||||
G722DecInst* dec_state_left_;
|
G722DecInst* dec_state_left_;
|
||||||
G722DecInst* dec_state_right_;
|
G722DecInst* dec_state_right_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderG722StereoImpl);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include "api/units/time_delta.h"
|
#include "api/units/time_delta.h"
|
||||||
#include "modules/audio_coding/codecs/g722/g722_interface.h"
|
#include "modules/audio_coding/codecs/g722/g722_interface.h"
|
||||||
#include "rtc_base/buffer.h"
|
#include "rtc_base/buffer.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -29,6 +28,9 @@ class AudioEncoderG722Impl final : public AudioEncoder {
|
|||||||
AudioEncoderG722Impl(const AudioEncoderG722Config& config, int payload_type);
|
AudioEncoderG722Impl(const AudioEncoderG722Config& config, int payload_type);
|
||||||
~AudioEncoderG722Impl() override;
|
~AudioEncoderG722Impl() override;
|
||||||
|
|
||||||
|
AudioEncoderG722Impl(const AudioEncoderG722Impl&) = delete;
|
||||||
|
AudioEncoderG722Impl& operator=(const AudioEncoderG722Impl&) = delete;
|
||||||
|
|
||||||
int SampleRateHz() const override;
|
int SampleRateHz() const override;
|
||||||
size_t NumChannels() const override;
|
size_t NumChannels() const override;
|
||||||
int RtpTimestampRateHz() const override;
|
int RtpTimestampRateHz() const override;
|
||||||
@ -63,7 +65,6 @@ class AudioEncoderG722Impl final : public AudioEncoder {
|
|||||||
uint32_t first_timestamp_in_buffer_;
|
uint32_t first_timestamp_in_buffer_;
|
||||||
const std::unique_ptr<EncoderState[]> encoders_;
|
const std::unique_ptr<EncoderState[]> encoders_;
|
||||||
rtc::Buffer interleave_buffer_;
|
rtc::Buffer interleave_buffer_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderG722Impl);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#include "api/audio_codecs/audio_decoder.h"
|
#include "api/audio_codecs/audio_decoder.h"
|
||||||
#include "rtc_base/buffer.h"
|
#include "rtc_base/buffer.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
typedef struct iLBC_decinst_t_ IlbcDecoderInstance;
|
typedef struct iLBC_decinst_t_ IlbcDecoderInstance;
|
||||||
|
|
||||||
@ -28,6 +27,10 @@ class AudioDecoderIlbcImpl final : public AudioDecoder {
|
|||||||
public:
|
public:
|
||||||
AudioDecoderIlbcImpl();
|
AudioDecoderIlbcImpl();
|
||||||
~AudioDecoderIlbcImpl() override;
|
~AudioDecoderIlbcImpl() override;
|
||||||
|
|
||||||
|
AudioDecoderIlbcImpl(const AudioDecoderIlbcImpl&) = delete;
|
||||||
|
AudioDecoderIlbcImpl& operator=(const AudioDecoderIlbcImpl&) = delete;
|
||||||
|
|
||||||
bool HasDecodePlc() const override;
|
bool HasDecodePlc() const override;
|
||||||
size_t DecodePlc(size_t num_frames, int16_t* decoded) override;
|
size_t DecodePlc(size_t num_frames, int16_t* decoded) override;
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
@ -45,7 +48,6 @@ class AudioDecoderIlbcImpl final : public AudioDecoder {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
IlbcDecoderInstance* dec_state_;
|
IlbcDecoderInstance* dec_state_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderIlbcImpl);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include "api/audio_codecs/ilbc/audio_encoder_ilbc_config.h"
|
#include "api/audio_codecs/ilbc/audio_encoder_ilbc_config.h"
|
||||||
#include "api/units/time_delta.h"
|
#include "api/units/time_delta.h"
|
||||||
#include "modules/audio_coding/codecs/ilbc/ilbc.h"
|
#include "modules/audio_coding/codecs/ilbc/ilbc.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -30,6 +29,9 @@ class AudioEncoderIlbcImpl final : public AudioEncoder {
|
|||||||
AudioEncoderIlbcImpl(const AudioEncoderIlbcConfig& config, int payload_type);
|
AudioEncoderIlbcImpl(const AudioEncoderIlbcConfig& config, int payload_type);
|
||||||
~AudioEncoderIlbcImpl() override;
|
~AudioEncoderIlbcImpl() override;
|
||||||
|
|
||||||
|
AudioEncoderIlbcImpl(const AudioEncoderIlbcImpl&) = delete;
|
||||||
|
AudioEncoderIlbcImpl& operator=(const AudioEncoderIlbcImpl&) = delete;
|
||||||
|
|
||||||
int SampleRateHz() const override;
|
int SampleRateHz() const override;
|
||||||
size_t NumChannels() const override;
|
size_t NumChannels() const override;
|
||||||
size_t Num10MsFramesInNextPacket() const override;
|
size_t Num10MsFramesInNextPacket() const override;
|
||||||
@ -53,7 +55,6 @@ class AudioEncoderIlbcImpl final : public AudioEncoder {
|
|||||||
uint32_t first_timestamp_in_buffer_;
|
uint32_t first_timestamp_in_buffer_;
|
||||||
int16_t input_buffer_[kMaxSamplesPerPacket];
|
int16_t input_buffer_[kMaxSamplesPerPacket];
|
||||||
IlbcEncoderInstance* encoder_;
|
IlbcEncoderInstance* encoder_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderIlbcImpl);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include "absl/types/optional.h"
|
#include "absl/types/optional.h"
|
||||||
#include "api/audio_codecs/audio_decoder.h"
|
#include "api/audio_codecs/audio_decoder.h"
|
||||||
#include "api/scoped_refptr.h"
|
#include "api/scoped_refptr.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -30,6 +29,9 @@ class AudioDecoderIsacT final : public AudioDecoder {
|
|||||||
explicit AudioDecoderIsacT(const Config& config);
|
explicit AudioDecoderIsacT(const Config& config);
|
||||||
virtual ~AudioDecoderIsacT() override;
|
virtual ~AudioDecoderIsacT() override;
|
||||||
|
|
||||||
|
AudioDecoderIsacT(const AudioDecoderIsacT&) = delete;
|
||||||
|
AudioDecoderIsacT& operator=(const AudioDecoderIsacT&) = delete;
|
||||||
|
|
||||||
bool HasDecodePlc() const override;
|
bool HasDecodePlc() const override;
|
||||||
size_t DecodePlc(size_t num_frames, int16_t* decoded) override;
|
size_t DecodePlc(size_t num_frames, int16_t* decoded) override;
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
@ -45,8 +47,6 @@ class AudioDecoderIsacT final : public AudioDecoder {
|
|||||||
private:
|
private:
|
||||||
typename T::instance_type* isac_state_;
|
typename T::instance_type* isac_state_;
|
||||||
int sample_rate_hz_;
|
int sample_rate_hz_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderIsacT);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
#include "api/audio_codecs/audio_encoder.h"
|
#include "api/audio_codecs/audio_encoder.h"
|
||||||
#include "api/scoped_refptr.h"
|
#include "api/scoped_refptr.h"
|
||||||
#include "api/units/time_delta.h"
|
#include "api/units/time_delta.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "system_wrappers/include/field_trial.h"
|
#include "system_wrappers/include/field_trial.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
@ -44,6 +43,9 @@ class AudioEncoderIsacT final : public AudioEncoder {
|
|||||||
explicit AudioEncoderIsacT(const Config& config);
|
explicit AudioEncoderIsacT(const Config& config);
|
||||||
~AudioEncoderIsacT() override;
|
~AudioEncoderIsacT() override;
|
||||||
|
|
||||||
|
AudioEncoderIsacT(const AudioEncoderIsacT&) = delete;
|
||||||
|
AudioEncoderIsacT& operator=(const AudioEncoderIsacT&) = delete;
|
||||||
|
|
||||||
int SampleRateHz() const override;
|
int SampleRateHz() const override;
|
||||||
size_t NumChannels() const override;
|
size_t NumChannels() const override;
|
||||||
size_t Num10MsFramesInNextPacket() const override;
|
size_t Num10MsFramesInNextPacket() const override;
|
||||||
@ -99,8 +101,6 @@ class AudioEncoderIsacT final : public AudioEncoder {
|
|||||||
// Start out with a reasonable default that we can use until we receive a real
|
// Start out with a reasonable default that we can use until we receive a real
|
||||||
// value.
|
// value.
|
||||||
DataSize overhead_per_packet_ = DataSize::Bytes(28);
|
DataSize overhead_per_packet_ = DataSize::Bytes(28);
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderIsacT);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include "api/audio_codecs/opus/audio_decoder_multi_channel_opus_config.h"
|
#include "api/audio_codecs/opus/audio_decoder_multi_channel_opus_config.h"
|
||||||
#include "modules/audio_coding/codecs/opus/opus_interface.h"
|
#include "modules/audio_coding/codecs/opus/opus_interface.h"
|
||||||
#include "rtc_base/buffer.h"
|
#include "rtc_base/buffer.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -32,6 +31,11 @@ class AudioDecoderMultiChannelOpusImpl final : public AudioDecoder {
|
|||||||
|
|
||||||
~AudioDecoderMultiChannelOpusImpl() override;
|
~AudioDecoderMultiChannelOpusImpl() override;
|
||||||
|
|
||||||
|
AudioDecoderMultiChannelOpusImpl(const AudioDecoderMultiChannelOpusImpl&) =
|
||||||
|
delete;
|
||||||
|
AudioDecoderMultiChannelOpusImpl& operator=(
|
||||||
|
const AudioDecoderMultiChannelOpusImpl&) = delete;
|
||||||
|
|
||||||
std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload,
|
std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload,
|
||||||
uint32_t timestamp) override;
|
uint32_t timestamp) override;
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
@ -63,7 +67,6 @@ class AudioDecoderMultiChannelOpusImpl final : public AudioDecoder {
|
|||||||
|
|
||||||
OpusDecInst* dec_state_;
|
OpusDecInst* dec_state_;
|
||||||
const AudioDecoderMultiChannelOpusConfig config_;
|
const AudioDecoderMultiChannelOpusConfig config_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderMultiChannelOpusImpl);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include "api/audio_codecs/audio_decoder.h"
|
#include "api/audio_codecs/audio_decoder.h"
|
||||||
#include "modules/audio_coding/codecs/opus/opus_interface.h"
|
#include "modules/audio_coding/codecs/opus/opus_interface.h"
|
||||||
#include "rtc_base/buffer.h"
|
#include "rtc_base/buffer.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -29,6 +28,9 @@ class AudioDecoderOpusImpl final : public AudioDecoder {
|
|||||||
int sample_rate_hz = 48000);
|
int sample_rate_hz = 48000);
|
||||||
~AudioDecoderOpusImpl() override;
|
~AudioDecoderOpusImpl() override;
|
||||||
|
|
||||||
|
AudioDecoderOpusImpl(const AudioDecoderOpusImpl&) = delete;
|
||||||
|
AudioDecoderOpusImpl& operator=(const AudioDecoderOpusImpl&) = delete;
|
||||||
|
|
||||||
std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload,
|
std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload,
|
||||||
uint32_t timestamp) override;
|
uint32_t timestamp) override;
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
@ -55,7 +57,6 @@ class AudioDecoderOpusImpl final : public AudioDecoder {
|
|||||||
OpusDecInst* dec_state_;
|
OpusDecInst* dec_state_;
|
||||||
const size_t channels_;
|
const size_t channels_;
|
||||||
const int sample_rate_hz_;
|
const int sample_rate_hz_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderOpusImpl);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include "api/audio_codecs/opus/audio_encoder_multi_channel_opus_config.h"
|
#include "api/audio_codecs/opus/audio_encoder_multi_channel_opus_config.h"
|
||||||
#include "api/units/time_delta.h"
|
#include "api/units/time_delta.h"
|
||||||
#include "modules/audio_coding/codecs/opus/opus_interface.h"
|
#include "modules/audio_coding/codecs/opus/opus_interface.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -34,6 +33,11 @@ class AudioEncoderMultiChannelOpusImpl final : public AudioEncoder {
|
|||||||
int payload_type);
|
int payload_type);
|
||||||
~AudioEncoderMultiChannelOpusImpl() override;
|
~AudioEncoderMultiChannelOpusImpl() override;
|
||||||
|
|
||||||
|
AudioEncoderMultiChannelOpusImpl(const AudioEncoderMultiChannelOpusImpl&) =
|
||||||
|
delete;
|
||||||
|
AudioEncoderMultiChannelOpusImpl& operator=(
|
||||||
|
const AudioEncoderMultiChannelOpusImpl&) = delete;
|
||||||
|
|
||||||
// Static interface for use by BuiltinAudioEncoderFactory.
|
// Static interface for use by BuiltinAudioEncoderFactory.
|
||||||
static constexpr const char* GetPayloadName() { return "multiopus"; }
|
static constexpr const char* GetPayloadName() { return "multiopus"; }
|
||||||
static absl::optional<AudioCodecInfo> QueryAudioEncoder(
|
static absl::optional<AudioCodecInfo> QueryAudioEncoder(
|
||||||
@ -81,7 +85,6 @@ class AudioEncoderMultiChannelOpusImpl final : public AudioEncoder {
|
|||||||
int next_frame_length_ms_;
|
int next_frame_length_ms_;
|
||||||
|
|
||||||
friend struct AudioEncoderMultiChannelOpus;
|
friend struct AudioEncoderMultiChannelOpus;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderMultiChannelOpusImpl);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include "common_audio/smoothing_filter.h"
|
#include "common_audio/smoothing_filter.h"
|
||||||
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h"
|
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h"
|
||||||
#include "modules/audio_coding/codecs/opus/opus_interface.h"
|
#include "modules/audio_coding/codecs/opus/opus_interface.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -61,6 +60,9 @@ class AudioEncoderOpusImpl final : public AudioEncoder {
|
|||||||
AudioEncoderOpusImpl(int payload_type, const SdpAudioFormat& format);
|
AudioEncoderOpusImpl(int payload_type, const SdpAudioFormat& format);
|
||||||
~AudioEncoderOpusImpl() override;
|
~AudioEncoderOpusImpl() override;
|
||||||
|
|
||||||
|
AudioEncoderOpusImpl(const AudioEncoderOpusImpl&) = delete;
|
||||||
|
AudioEncoderOpusImpl& operator=(const AudioEncoderOpusImpl&) = delete;
|
||||||
|
|
||||||
int SampleRateHz() const override;
|
int SampleRateHz() const override;
|
||||||
size_t NumChannels() const override;
|
size_t NumChannels() const override;
|
||||||
int RtpTimestampRateHz() const override;
|
int RtpTimestampRateHz() const override;
|
||||||
@ -175,7 +177,6 @@ class AudioEncoderOpusImpl final : public AudioEncoder {
|
|||||||
int consecutive_dtx_frames_;
|
int consecutive_dtx_frames_;
|
||||||
|
|
||||||
friend struct AudioEncoderOpus;
|
friend struct AudioEncoderOpus;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderOpusImpl);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -18,13 +18,16 @@
|
|||||||
|
|
||||||
#include "api/audio_codecs/audio_decoder.h"
|
#include "api/audio_codecs/audio_decoder.h"
|
||||||
#include "rtc_base/buffer.h"
|
#include "rtc_base/buffer.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
class AudioDecoderPcm16B final : public AudioDecoder {
|
class AudioDecoderPcm16B final : public AudioDecoder {
|
||||||
public:
|
public:
|
||||||
AudioDecoderPcm16B(int sample_rate_hz, size_t num_channels);
|
AudioDecoderPcm16B(int sample_rate_hz, size_t num_channels);
|
||||||
|
|
||||||
|
AudioDecoderPcm16B(const AudioDecoderPcm16B&) = delete;
|
||||||
|
AudioDecoderPcm16B& operator=(const AudioDecoderPcm16B&) = delete;
|
||||||
|
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload,
|
std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload,
|
||||||
uint32_t timestamp) override;
|
uint32_t timestamp) override;
|
||||||
@ -42,7 +45,6 @@ class AudioDecoderPcm16B final : public AudioDecoder {
|
|||||||
private:
|
private:
|
||||||
const int sample_rate_hz_;
|
const int sample_rate_hz_;
|
||||||
const size_t num_channels_;
|
const size_t num_channels_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcm16B);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#define MODULES_AUDIO_CODING_CODECS_PCM16B_AUDIO_ENCODER_PCM16B_H_
|
#define MODULES_AUDIO_CODING_CODECS_PCM16B_AUDIO_ENCODER_PCM16B_H_
|
||||||
|
|
||||||
#include "modules/audio_coding/codecs/g711/audio_encoder_pcm.h"
|
#include "modules/audio_coding/codecs/g711/audio_encoder_pcm.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -29,6 +28,9 @@ class AudioEncoderPcm16B final : public AudioEncoderPcm {
|
|||||||
explicit AudioEncoderPcm16B(const Config& config)
|
explicit AudioEncoderPcm16B(const Config& config)
|
||||||
: AudioEncoderPcm(config, config.sample_rate_hz) {}
|
: AudioEncoderPcm(config, config.sample_rate_hz) {}
|
||||||
|
|
||||||
|
AudioEncoderPcm16B(const AudioEncoderPcm16B&) = delete;
|
||||||
|
AudioEncoderPcm16B& operator=(const AudioEncoderPcm16B&) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
size_t EncodeCall(const int16_t* audio,
|
size_t EncodeCall(const int16_t* audio,
|
||||||
size_t input_len,
|
size_t input_len,
|
||||||
@ -37,9 +39,6 @@ class AudioEncoderPcm16B final : public AudioEncoderPcm {
|
|||||||
size_t BytesPerSample() const override;
|
size_t BytesPerSample() const override;
|
||||||
|
|
||||||
AudioEncoder::CodecType GetCodecType() const override;
|
AudioEncoder::CodecType GetCodecType() const override;
|
||||||
|
|
||||||
private:
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderPcm16B);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include "api/audio_codecs/audio_encoder.h"
|
#include "api/audio_codecs/audio_encoder.h"
|
||||||
#include "api/units/time_delta.h"
|
#include "api/units/time_delta.h"
|
||||||
#include "rtc_base/buffer.h"
|
#include "rtc_base/buffer.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -47,6 +46,9 @@ class AudioEncoderCopyRed final : public AudioEncoder {
|
|||||||
|
|
||||||
~AudioEncoderCopyRed() override;
|
~AudioEncoderCopyRed() override;
|
||||||
|
|
||||||
|
AudioEncoderCopyRed(const AudioEncoderCopyRed&) = delete;
|
||||||
|
AudioEncoderCopyRed& operator=(const AudioEncoderCopyRed&) = delete;
|
||||||
|
|
||||||
int SampleRateHz() const override;
|
int SampleRateHz() const override;
|
||||||
size_t NumChannels() const override;
|
size_t NumChannels() const override;
|
||||||
int RtpTimestampRateHz() const override;
|
int RtpTimestampRateHz() const override;
|
||||||
@ -92,8 +94,6 @@ class AudioEncoderCopyRed final : public AudioEncoder {
|
|||||||
size_t max_packet_length_;
|
size_t max_packet_length_;
|
||||||
int red_payload_type_;
|
int red_payload_type_;
|
||||||
std::list<std::pair<EncodedInfo, rtc::Buffer>> redundant_encodings_;
|
std::list<std::pair<EncodedInfo, rtc::Buffer>> redundant_encodings_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderCopyRed);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "modules/audio_coding/neteq/time_stretch.h"
|
#include "modules/audio_coding/neteq/time_stretch.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -33,6 +32,9 @@ class Accelerate : public TimeStretch {
|
|||||||
const BackgroundNoise& background_noise)
|
const BackgroundNoise& background_noise)
|
||||||
: TimeStretch(sample_rate_hz, num_channels, background_noise) {}
|
: TimeStretch(sample_rate_hz, num_channels, background_noise) {}
|
||||||
|
|
||||||
|
Accelerate(const Accelerate&) = delete;
|
||||||
|
Accelerate& operator=(const Accelerate&) = delete;
|
||||||
|
|
||||||
// This method performs the actual Accelerate operation. The samples are
|
// This method performs the actual Accelerate operation. The samples are
|
||||||
// read from `input`, of length `input_length` elements, and are written to
|
// read from `input`, of length `input_length` elements, and are written to
|
||||||
// `output`. The number of samples removed through time-stretching is
|
// `output`. The number of samples removed through time-stretching is
|
||||||
@ -62,9 +64,6 @@ class Accelerate : public TimeStretch {
|
|||||||
bool active_speech,
|
bool active_speech,
|
||||||
bool fast_mode,
|
bool fast_mode,
|
||||||
AudioMultiVector* output) const override;
|
AudioMultiVector* output) const override;
|
||||||
|
|
||||||
private:
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(Accelerate);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AccelerateFactory {
|
struct AccelerateFactory {
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#include "api/array_view.h"
|
#include "api/array_view.h"
|
||||||
#include "modules/audio_coding/neteq/audio_vector.h"
|
#include "modules/audio_coding/neteq/audio_vector.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -34,6 +33,9 @@ class AudioMultiVector {
|
|||||||
|
|
||||||
virtual ~AudioMultiVector();
|
virtual ~AudioMultiVector();
|
||||||
|
|
||||||
|
AudioMultiVector(const AudioMultiVector&) = delete;
|
||||||
|
AudioMultiVector& operator=(const AudioMultiVector&) = delete;
|
||||||
|
|
||||||
// Deletes all values and make the vector empty.
|
// Deletes all values and make the vector empty.
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
|
|
||||||
@ -130,9 +132,6 @@ class AudioMultiVector {
|
|||||||
protected:
|
protected:
|
||||||
std::vector<AudioVector*> channels_;
|
std::vector<AudioVector*> channels_;
|
||||||
size_t num_channels_;
|
size_t num_channels_;
|
||||||
|
|
||||||
private:
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioMultiVector);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -31,6 +30,9 @@ class AudioVector {
|
|||||||
|
|
||||||
virtual ~AudioVector();
|
virtual ~AudioVector();
|
||||||
|
|
||||||
|
AudioVector(const AudioVector&) = delete;
|
||||||
|
AudioVector& operator=(const AudioVector&) = delete;
|
||||||
|
|
||||||
// Deletes all values and make the vector empty.
|
// Deletes all values and make the vector empty.
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
|
|
||||||
@ -164,8 +166,6 @@ class AudioVector {
|
|||||||
|
|
||||||
// The index of the sample after the last sample in `array_`.
|
// The index of the sample after the last sample in `array_`.
|
||||||
size_t end_index_;
|
size_t end_index_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioVector);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "api/array_view.h"
|
#include "api/array_view.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -34,6 +33,9 @@ class BackgroundNoise {
|
|||||||
explicit BackgroundNoise(size_t num_channels);
|
explicit BackgroundNoise(size_t num_channels);
|
||||||
virtual ~BackgroundNoise();
|
virtual ~BackgroundNoise();
|
||||||
|
|
||||||
|
BackgroundNoise(const BackgroundNoise&) = delete;
|
||||||
|
BackgroundNoise& operator=(const BackgroundNoise&) = delete;
|
||||||
|
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
// Updates the parameter estimates based on the signal currently in the
|
// Updates the parameter estimates based on the signal currently in the
|
||||||
@ -130,8 +132,6 @@ class BackgroundNoise {
|
|||||||
size_t num_channels_;
|
size_t num_channels_;
|
||||||
std::unique_ptr<ChannelParameters[]> channel_parameters_;
|
std::unique_ptr<ChannelParameters[]> channel_parameters_;
|
||||||
bool initialized_;
|
bool initialized_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(BackgroundNoise);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -14,14 +14,16 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
class BufferLevelFilter {
|
class BufferLevelFilter {
|
||||||
public:
|
public:
|
||||||
BufferLevelFilter();
|
BufferLevelFilter();
|
||||||
virtual ~BufferLevelFilter() {}
|
virtual ~BufferLevelFilter() {}
|
||||||
|
|
||||||
|
BufferLevelFilter(const BufferLevelFilter&) = delete;
|
||||||
|
BufferLevelFilter& operator=(const BufferLevelFilter&) = delete;
|
||||||
|
|
||||||
virtual void Reset();
|
virtual void Reset();
|
||||||
|
|
||||||
// Updates the filter. Current buffer size is `buffer_size_samples`.
|
// Updates the filter. Current buffer size is `buffer_size_samples`.
|
||||||
@ -46,8 +48,6 @@ class BufferLevelFilter {
|
|||||||
private:
|
private:
|
||||||
int level_factor_; // Filter factor for the buffer level filter in Q8.
|
int level_factor_; // Filter factor for the buffer level filter in Q8.
|
||||||
int filtered_current_level_; // Filtered current buffer level in Q8.
|
int filtered_current_level_; // Filtered current buffer level in Q8.
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(BufferLevelFilter);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -13,8 +13,6 @@
|
|||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
// Forward declarations.
|
// Forward declarations.
|
||||||
@ -42,6 +40,9 @@ class ComfortNoise {
|
|||||||
decoder_database_(decoder_database),
|
decoder_database_(decoder_database),
|
||||||
sync_buffer_(sync_buffer) {}
|
sync_buffer_(sync_buffer) {}
|
||||||
|
|
||||||
|
ComfortNoise(const ComfortNoise&) = delete;
|
||||||
|
ComfortNoise& operator=(const ComfortNoise&) = delete;
|
||||||
|
|
||||||
// Resets the state. Should be called before each new comfort noise period.
|
// Resets the state. Should be called before each new comfort noise period.
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
@ -65,7 +66,6 @@ class ComfortNoise {
|
|||||||
DecoderDatabase* decoder_database_;
|
DecoderDatabase* decoder_database_;
|
||||||
SyncBuffer* sync_buffer_;
|
SyncBuffer* sync_buffer_;
|
||||||
int internal_error_code_;
|
int internal_error_code_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ComfortNoise);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
#include "api/neteq/tick_timer.h"
|
#include "api/neteq/tick_timer.h"
|
||||||
#include "modules/audio_coding/neteq/buffer_level_filter.h"
|
#include "modules/audio_coding/neteq/buffer_level_filter.h"
|
||||||
#include "modules/audio_coding/neteq/delay_manager.h"
|
#include "modules/audio_coding/neteq/delay_manager.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/experiments/field_trial_parser.h"
|
#include "rtc_base/experiments/field_trial_parser.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
@ -37,6 +36,9 @@ class DecisionLogic : public NetEqController {
|
|||||||
|
|
||||||
~DecisionLogic() override;
|
~DecisionLogic() override;
|
||||||
|
|
||||||
|
DecisionLogic(const DecisionLogic&) = delete;
|
||||||
|
DecisionLogic& operator=(const DecisionLogic&) = delete;
|
||||||
|
|
||||||
// Resets object to a clean state.
|
// Resets object to a clean state.
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
|
|
||||||
@ -192,8 +194,6 @@ class DecisionLogic : public NetEqController {
|
|||||||
FieldTrialParameter<bool> estimate_dtx_delay_;
|
FieldTrialParameter<bool> estimate_dtx_delay_;
|
||||||
FieldTrialParameter<bool> time_stretch_cn_;
|
FieldTrialParameter<bool> time_stretch_cn_;
|
||||||
FieldTrialConstrained<int> target_level_window_ms_;
|
FieldTrialConstrained<int> target_level_window_ms_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(DecisionLogic);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include "api/scoped_refptr.h"
|
#include "api/scoped_refptr.h"
|
||||||
#include "modules/audio_coding/codecs/cng/webrtc_cng.h"
|
#include "modules/audio_coding/codecs/cng/webrtc_cng.h"
|
||||||
#include "modules/audio_coding/neteq/packet.h"
|
#include "modules/audio_coding/neteq/packet.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -122,6 +121,9 @@ class DecoderDatabase {
|
|||||||
|
|
||||||
virtual ~DecoderDatabase();
|
virtual ~DecoderDatabase();
|
||||||
|
|
||||||
|
DecoderDatabase(const DecoderDatabase&) = delete;
|
||||||
|
DecoderDatabase& operator=(const DecoderDatabase&) = delete;
|
||||||
|
|
||||||
// Returns true if the database is empty.
|
// Returns true if the database is empty.
|
||||||
virtual bool Empty() const;
|
virtual bool Empty() const;
|
||||||
|
|
||||||
@ -208,8 +210,6 @@ class DecoderDatabase {
|
|||||||
mutable std::unique_ptr<ComfortNoiseDecoder> active_cng_decoder_;
|
mutable std::unique_ptr<ComfortNoiseDecoder> active_cng_decoder_;
|
||||||
rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_;
|
rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_;
|
||||||
const absl::optional<AudioCodecPairId> codec_pair_id_;
|
const absl::optional<AudioCodecPairId> codec_pair_id_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(DecoderDatabase);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include "modules/audio_coding/neteq/relative_arrival_delay_tracker.h"
|
#include "modules/audio_coding/neteq/relative_arrival_delay_tracker.h"
|
||||||
#include "modules/audio_coding/neteq/reorder_optimizer.h"
|
#include "modules/audio_coding/neteq/reorder_optimizer.h"
|
||||||
#include "modules/audio_coding/neteq/underrun_optimizer.h"
|
#include "modules/audio_coding/neteq/underrun_optimizer.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -52,6 +51,9 @@ class DelayManager {
|
|||||||
|
|
||||||
virtual ~DelayManager();
|
virtual ~DelayManager();
|
||||||
|
|
||||||
|
DelayManager(const DelayManager&) = delete;
|
||||||
|
DelayManager& operator=(const DelayManager&) = delete;
|
||||||
|
|
||||||
// Updates the delay manager with a new incoming packet, with `timestamp` from
|
// Updates the delay manager with a new incoming packet, with `timestamp` from
|
||||||
// the RTP header. This updates the statistics and a new target buffer level
|
// the RTP header. This updates the statistics and a new target buffer level
|
||||||
// is calculated. Returns the relative delay if it can be calculated. If
|
// is calculated. Returns the relative delay if it can be calculated. If
|
||||||
@ -112,8 +114,6 @@ class DelayManager {
|
|||||||
|
|
||||||
int packet_len_ms_ = 0;
|
int packet_len_ms_ = 0;
|
||||||
int target_level_ms_; // Currently preferred buffer level.
|
int target_level_ms_; // Currently preferred buffer level.
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(DelayManager);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
#include "modules/audio_coding/neteq/audio_multi_vector.h"
|
#include "modules/audio_coding/neteq/audio_multi_vector.h"
|
||||||
#include "modules/audio_coding/neteq/audio_vector.h"
|
#include "modules/audio_coding/neteq/audio_vector.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -150,11 +149,12 @@ class DspHelper {
|
|||||||
bool compensate_delay,
|
bool compensate_delay,
|
||||||
int16_t* output);
|
int16_t* output);
|
||||||
|
|
||||||
|
DspHelper(const DspHelper&) = delete;
|
||||||
|
DspHelper& operator=(const DspHelper&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Table of constants used in method DspHelper::ParabolicFit().
|
// Table of constants used in method DspHelper::ParabolicFit().
|
||||||
static const int16_t kParabolaCoefficients[17][3];
|
static const int16_t kParabolaCoefficients[17][3];
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(DspHelper);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -16,8 +16,6 @@
|
|||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
struct DtmfEvent {
|
struct DtmfEvent {
|
||||||
@ -50,6 +48,9 @@ class DtmfBuffer {
|
|||||||
|
|
||||||
virtual ~DtmfBuffer();
|
virtual ~DtmfBuffer();
|
||||||
|
|
||||||
|
DtmfBuffer(const DtmfBuffer&) = delete;
|
||||||
|
DtmfBuffer& operator=(const DtmfBuffer&) = delete;
|
||||||
|
|
||||||
// Flushes the buffer.
|
// Flushes the buffer.
|
||||||
virtual void Flush();
|
virtual void Flush();
|
||||||
|
|
||||||
@ -97,8 +98,6 @@ class DtmfBuffer {
|
|||||||
static bool CompareEvents(const DtmfEvent& a, const DtmfEvent& b);
|
static bool CompareEvents(const DtmfEvent& a, const DtmfEvent& b);
|
||||||
|
|
||||||
DtmfList buffer_;
|
DtmfList buffer_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(DtmfBuffer);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "modules/audio_coding/neteq/audio_multi_vector.h"
|
#include "modules/audio_coding/neteq/audio_multi_vector.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -29,6 +28,10 @@ class DtmfToneGenerator {
|
|||||||
|
|
||||||
DtmfToneGenerator();
|
DtmfToneGenerator();
|
||||||
virtual ~DtmfToneGenerator() {}
|
virtual ~DtmfToneGenerator() {}
|
||||||
|
|
||||||
|
DtmfToneGenerator(const DtmfToneGenerator&) = delete;
|
||||||
|
DtmfToneGenerator& operator=(const DtmfToneGenerator&) = delete;
|
||||||
|
|
||||||
virtual int Init(int fs, int event, int attenuation);
|
virtual int Init(int fs, int event, int attenuation);
|
||||||
virtual void Reset();
|
virtual void Reset();
|
||||||
virtual int Generate(size_t num_samples, AudioMultiVector* output);
|
virtual int Generate(size_t num_samples, AudioMultiVector* output);
|
||||||
@ -48,8 +51,6 @@ class DtmfToneGenerator {
|
|||||||
int amplitude_; // Amplitude for this event.
|
int amplitude_; // Amplitude for this event.
|
||||||
int16_t sample_history1_[2]; // Last 2 samples for the 1st oscillator.
|
int16_t sample_history1_[2]; // Last 2 samples for the 1st oscillator.
|
||||||
int16_t sample_history2_[2]; // Last 2 samples for the 2nd oscillator.
|
int16_t sample_history2_[2]; // Last 2 samples for the 2nd oscillator.
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(DtmfToneGenerator);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "modules/audio_coding/neteq/audio_vector.h"
|
#include "modules/audio_coding/neteq/audio_vector.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -41,6 +40,9 @@ class Expand {
|
|||||||
|
|
||||||
virtual ~Expand();
|
virtual ~Expand();
|
||||||
|
|
||||||
|
Expand(const Expand&) = delete;
|
||||||
|
Expand& operator=(const Expand&) = delete;
|
||||||
|
|
||||||
// Resets the object.
|
// Resets the object.
|
||||||
virtual void Reset();
|
virtual void Reset();
|
||||||
|
|
||||||
@ -134,8 +136,6 @@ class Expand {
|
|||||||
bool stop_muting_;
|
bool stop_muting_;
|
||||||
size_t expand_duration_samples_;
|
size_t expand_duration_samples_;
|
||||||
std::unique_ptr<ChannelParameters[]> channel_parameters_;
|
std::unique_ptr<ChannelParameters[]> channel_parameters_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(Expand);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ExpandFactory {
|
struct ExpandFactory {
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
#include "absl/types/optional.h"
|
#include "absl/types/optional.h"
|
||||||
#include "api/neteq/tick_timer.h"
|
#include "api/neteq/tick_timer.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -36,6 +35,9 @@ class ExpandUmaLogger {
|
|||||||
|
|
||||||
~ExpandUmaLogger();
|
~ExpandUmaLogger();
|
||||||
|
|
||||||
|
ExpandUmaLogger(const ExpandUmaLogger&) = delete;
|
||||||
|
ExpandUmaLogger& operator=(const ExpandUmaLogger&) = delete;
|
||||||
|
|
||||||
// In this call, value should be an incremental sample counter. The sample
|
// In this call, value should be an incremental sample counter. The sample
|
||||||
// rate must be strictly positive.
|
// rate must be strictly positive.
|
||||||
void UpdateSampleCounter(uint64_t value, int sample_rate_hz);
|
void UpdateSampleCounter(uint64_t value, int sample_rate_hz);
|
||||||
@ -48,8 +50,6 @@ class ExpandUmaLogger {
|
|||||||
absl::optional<uint64_t> last_logged_value_;
|
absl::optional<uint64_t> last_logged_value_;
|
||||||
uint64_t last_value_ = 0;
|
uint64_t last_value_ = 0;
|
||||||
int sample_rate_hz_ = 0;
|
int sample_rate_hz_ = 0;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ExpandUmaLogger);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#define MODULES_AUDIO_CODING_NETEQ_MERGE_H_
|
#define MODULES_AUDIO_CODING_NETEQ_MERGE_H_
|
||||||
|
|
||||||
#include "modules/audio_coding/neteq/audio_multi_vector.h"
|
#include "modules/audio_coding/neteq/audio_multi_vector.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -36,6 +35,9 @@ class Merge {
|
|||||||
SyncBuffer* sync_buffer);
|
SyncBuffer* sync_buffer);
|
||||||
virtual ~Merge();
|
virtual ~Merge();
|
||||||
|
|
||||||
|
Merge(const Merge&) = delete;
|
||||||
|
Merge& operator=(const Merge&) = delete;
|
||||||
|
|
||||||
// The main method to produce the audio data. The decoded data is supplied in
|
// The main method to produce the audio data. The decoded data is supplied in
|
||||||
// `input`, having `input_length` samples in total for all channels
|
// `input`, having `input_length` samples in total for all channels
|
||||||
// (interleaved). The result is written to `output`. The number of channels
|
// (interleaved). The result is written to `output`. The number of channels
|
||||||
@ -93,8 +95,6 @@ class Merge {
|
|||||||
int16_t input_downsampled_[kInputDownsampLength];
|
int16_t input_downsampled_[kInputDownsampLength];
|
||||||
AudioMultiVector expanded_;
|
AudioMultiVector expanded_;
|
||||||
std::vector<int16_t> temp_data_;
|
std::vector<int16_t> temp_data_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(Merge);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
#include "modules/audio_coding/neteq/packet.h"
|
#include "modules/audio_coding/neteq/packet.h"
|
||||||
#include "modules/audio_coding/neteq/random_vector.h"
|
#include "modules/audio_coding/neteq/random_vector.h"
|
||||||
#include "modules/audio_coding/neteq/statistics_calculator.h"
|
#include "modules/audio_coding/neteq/statistics_calculator.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/synchronization/mutex.h"
|
#include "rtc_base/synchronization/mutex.h"
|
||||||
#include "rtc_base/thread_annotations.h"
|
#include "rtc_base/thread_annotations.h"
|
||||||
|
|
||||||
@ -124,6 +123,9 @@ class NetEqImpl : public webrtc::NetEq {
|
|||||||
|
|
||||||
~NetEqImpl() override;
|
~NetEqImpl() override;
|
||||||
|
|
||||||
|
NetEqImpl(const NetEqImpl&) = delete;
|
||||||
|
NetEqImpl& operator=(const NetEqImpl&) = delete;
|
||||||
|
|
||||||
// Inserts a new packet into NetEq. Returns 0 on success, -1 on failure.
|
// Inserts a new packet into NetEq. Returns 0 on success, -1 on failure.
|
||||||
int InsertPacket(const RTPHeader& rtp_header,
|
int InsertPacket(const RTPHeader& rtp_header,
|
||||||
rtc::ArrayView<const uint8_t> payload) override;
|
rtc::ArrayView<const uint8_t> payload) override;
|
||||||
@ -399,9 +401,6 @@ class NetEqImpl : public webrtc::NetEq {
|
|||||||
ExpandUmaLogger speech_expand_uma_logger_ RTC_GUARDED_BY(mutex_);
|
ExpandUmaLogger speech_expand_uma_logger_ RTC_GUARDED_BY(mutex_);
|
||||||
bool no_time_stretching_ RTC_GUARDED_BY(mutex_); // Only used for test.
|
bool no_time_stretching_ RTC_GUARDED_BY(mutex_); // Only used for test.
|
||||||
rtc::BufferT<int16_t> concealment_audio_ RTC_GUARDED_BY(mutex_);
|
rtc::BufferT<int16_t> concealment_audio_ RTC_GUARDED_BY(mutex_);
|
||||||
|
|
||||||
private:
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
#include "api/neteq/neteq.h"
|
#include "api/neteq/neteq.h"
|
||||||
#include "modules/audio_coding/neteq/statistics_calculator.h"
|
#include "modules/audio_coding/neteq/statistics_calculator.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/numerics/safe_conversions.h"
|
#include "rtc_base/numerics/safe_conversions.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
@ -49,6 +48,9 @@ class Normal {
|
|||||||
|
|
||||||
virtual ~Normal() {}
|
virtual ~Normal() {}
|
||||||
|
|
||||||
|
Normal(const Normal&) = delete;
|
||||||
|
Normal& operator=(const Normal&) = delete;
|
||||||
|
|
||||||
// Performs the "Normal" operation. The decoder data is supplied in `input`,
|
// Performs the "Normal" operation. The decoder data is supplied in `input`,
|
||||||
// having `length` samples in total for all channels (interleaved). The
|
// having `length` samples in total for all channels (interleaved). The
|
||||||
// result is written to `output`. The number of channels allocated in
|
// result is written to `output`. The number of channels allocated in
|
||||||
@ -68,8 +70,6 @@ class Normal {
|
|||||||
const size_t samples_per_ms_;
|
const size_t samples_per_ms_;
|
||||||
const int16_t default_win_slope_Q14_;
|
const int16_t default_win_slope_Q14_;
|
||||||
StatisticsCalculator* const statistics_;
|
StatisticsCalculator* const statistics_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(Normal);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include "modules/audio_coding/neteq/decoder_database.h"
|
#include "modules/audio_coding/neteq/decoder_database.h"
|
||||||
#include "modules/audio_coding/neteq/packet.h"
|
#include "modules/audio_coding/neteq/packet.h"
|
||||||
#include "modules/include/module_common_types_public.h" // IsNewerTimestamp
|
#include "modules/include/module_common_types_public.h" // IsNewerTimestamp
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -51,6 +50,9 @@ class PacketBuffer {
|
|||||||
// Deletes all packets in the buffer before destroying the buffer.
|
// Deletes all packets in the buffer before destroying the buffer.
|
||||||
virtual ~PacketBuffer();
|
virtual ~PacketBuffer();
|
||||||
|
|
||||||
|
PacketBuffer(const PacketBuffer&) = delete;
|
||||||
|
PacketBuffer& operator=(const PacketBuffer&) = delete;
|
||||||
|
|
||||||
// Flushes the buffer and deletes all packets in it.
|
// Flushes the buffer and deletes all packets in it.
|
||||||
virtual void Flush(StatisticsCalculator* stats);
|
virtual void Flush(StatisticsCalculator* stats);
|
||||||
|
|
||||||
@ -173,7 +175,6 @@ class PacketBuffer {
|
|||||||
size_t max_number_of_packets_;
|
size_t max_number_of_packets_;
|
||||||
PacketList buffer_;
|
PacketList buffer_;
|
||||||
const TickTimer* tick_timer_;
|
const TickTimer* tick_timer_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(PacketBuffer);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
#include "api/audio_codecs/audio_decoder.h"
|
#include "api/audio_codecs/audio_decoder.h"
|
||||||
#include "common_audio/vad/include/webrtc_vad.h"
|
#include "common_audio/vad/include/webrtc_vad.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -31,6 +30,9 @@ class PostDecodeVad {
|
|||||||
|
|
||||||
virtual ~PostDecodeVad();
|
virtual ~PostDecodeVad();
|
||||||
|
|
||||||
|
PostDecodeVad(const PostDecodeVad&) = delete;
|
||||||
|
PostDecodeVad& operator=(const PostDecodeVad&) = delete;
|
||||||
|
|
||||||
// Enables post-decode VAD.
|
// Enables post-decode VAD.
|
||||||
void Enable();
|
void Enable();
|
||||||
|
|
||||||
@ -63,8 +65,6 @@ class PostDecodeVad {
|
|||||||
bool active_speech_;
|
bool active_speech_;
|
||||||
int sid_interval_counter_;
|
int sid_interval_counter_;
|
||||||
::VadInst* vad_instance_;
|
::VadInst* vad_instance_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(PostDecodeVad);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "modules/audio_coding/neteq/time_stretch.h"
|
#include "modules/audio_coding/neteq/time_stretch.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -36,6 +35,9 @@ class PreemptiveExpand : public TimeStretch {
|
|||||||
old_data_length_per_channel_(0),
|
old_data_length_per_channel_(0),
|
||||||
overlap_samples_(overlap_samples) {}
|
overlap_samples_(overlap_samples) {}
|
||||||
|
|
||||||
|
PreemptiveExpand(const PreemptiveExpand&) = delete;
|
||||||
|
PreemptiveExpand& operator=(const PreemptiveExpand&) = delete;
|
||||||
|
|
||||||
// This method performs the actual PreemptiveExpand operation. The samples are
|
// This method performs the actual PreemptiveExpand operation. The samples are
|
||||||
// read from `input`, of length `input_length` elements, and are written to
|
// read from `input`, of length `input_length` elements, and are written to
|
||||||
// `output`. The number of samples added through time-stretching is
|
// `output`. The number of samples added through time-stretching is
|
||||||
@ -67,8 +69,6 @@ class PreemptiveExpand : public TimeStretch {
|
|||||||
private:
|
private:
|
||||||
size_t old_data_length_per_channel_;
|
size_t old_data_length_per_channel_;
|
||||||
size_t overlap_samples_;
|
size_t overlap_samples_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(PreemptiveExpand);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PreemptiveExpandFactory {
|
struct PreemptiveExpandFactory {
|
||||||
|
@ -14,8 +14,6 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
// This class generates pseudo-random samples.
|
// This class generates pseudo-random samples.
|
||||||
@ -26,6 +24,9 @@ class RandomVector {
|
|||||||
|
|
||||||
RandomVector() : seed_(777), seed_increment_(1) {}
|
RandomVector() : seed_(777), seed_increment_(1) {}
|
||||||
|
|
||||||
|
RandomVector(const RandomVector&) = delete;
|
||||||
|
RandomVector& operator=(const RandomVector&) = delete;
|
||||||
|
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
void Generate(size_t length, int16_t* output);
|
void Generate(size_t length, int16_t* output);
|
||||||
@ -39,8 +40,6 @@ class RandomVector {
|
|||||||
private:
|
private:
|
||||||
uint32_t seed_;
|
uint32_t seed_;
|
||||||
int16_t seed_increment_;
|
int16_t seed_increment_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(RandomVector);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#define MODULES_AUDIO_CODING_NETEQ_RED_PAYLOAD_SPLITTER_H_
|
#define MODULES_AUDIO_CODING_NETEQ_RED_PAYLOAD_SPLITTER_H_
|
||||||
|
|
||||||
#include "modules/audio_coding/neteq/packet.h"
|
#include "modules/audio_coding/neteq/packet.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -30,6 +29,9 @@ class RedPayloadSplitter {
|
|||||||
|
|
||||||
virtual ~RedPayloadSplitter() {}
|
virtual ~RedPayloadSplitter() {}
|
||||||
|
|
||||||
|
RedPayloadSplitter(const RedPayloadSplitter&) = delete;
|
||||||
|
RedPayloadSplitter& operator=(const RedPayloadSplitter&) = delete;
|
||||||
|
|
||||||
// Splits each packet in `packet_list` into its separate RED payloads. Each
|
// Splits each packet in `packet_list` into its separate RED payloads. Each
|
||||||
// RED payload is packetized into a Packet. The original elements in
|
// RED payload is packetized into a Packet. The original elements in
|
||||||
// `packet_list` are properly deleted, and replaced by the new packets.
|
// `packet_list` are properly deleted, and replaced by the new packets.
|
||||||
@ -43,9 +45,6 @@ class RedPayloadSplitter {
|
|||||||
// is accepted. Any packet with another payload type is discarded.
|
// is accepted. Any packet with another payload type is discarded.
|
||||||
virtual void CheckRedPayloads(PacketList* packet_list,
|
virtual void CheckRedPayloads(PacketList* packet_list,
|
||||||
const DecoderDatabase& decoder_database);
|
const DecoderDatabase& decoder_database);
|
||||||
|
|
||||||
private:
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(RedPayloadSplitter);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "api/neteq/neteq.h"
|
#include "api/neteq/neteq.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -28,6 +27,9 @@ class StatisticsCalculator {
|
|||||||
|
|
||||||
virtual ~StatisticsCalculator();
|
virtual ~StatisticsCalculator();
|
||||||
|
|
||||||
|
StatisticsCalculator(const StatisticsCalculator&) = delete;
|
||||||
|
StatisticsCalculator& operator=(const StatisticsCalculator&) = delete;
|
||||||
|
|
||||||
// Resets most of the counters.
|
// Resets most of the counters.
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
@ -197,8 +199,6 @@ class StatisticsCalculator {
|
|||||||
PeriodicUmaAverage excess_buffer_delay_;
|
PeriodicUmaAverage excess_buffer_delay_;
|
||||||
PeriodicUmaCount buffer_full_counter_;
|
PeriodicUmaCount buffer_full_counter_;
|
||||||
bool decoded_output_played_ = false;
|
bool decoded_output_played_ = false;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(StatisticsCalculator);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include "modules/audio_coding/neteq/audio_multi_vector.h"
|
#include "modules/audio_coding/neteq/audio_multi_vector.h"
|
||||||
#include "modules/audio_coding/neteq/audio_vector.h"
|
#include "modules/audio_coding/neteq/audio_vector.h"
|
||||||
#include "rtc_base/buffer.h"
|
#include "rtc_base/buffer.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -32,6 +31,9 @@ class SyncBuffer : public AudioMultiVector {
|
|||||||
end_timestamp_(0),
|
end_timestamp_(0),
|
||||||
dtmf_index_(0) {}
|
dtmf_index_(0) {}
|
||||||
|
|
||||||
|
SyncBuffer(const SyncBuffer&) = delete;
|
||||||
|
SyncBuffer& operator=(const SyncBuffer&) = delete;
|
||||||
|
|
||||||
// Returns the number of samples yet to play out from the buffer.
|
// Returns the number of samples yet to play out from the buffer.
|
||||||
size_t FutureLength() const;
|
size_t FutureLength() const;
|
||||||
|
|
||||||
@ -102,8 +104,6 @@ class SyncBuffer : public AudioMultiVector {
|
|||||||
size_t next_index_;
|
size_t next_index_;
|
||||||
uint32_t end_timestamp_; // The timestamp of the last sample in the buffer.
|
uint32_t end_timestamp_; // The timestamp of the last sample in the buffer.
|
||||||
size_t dtmf_index_; // Index to the first non-DTMF sample in the buffer.
|
size_t dtmf_index_; // Index to the first non-DTMF sample in the buffer.
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(SyncBuffer);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include <string.h> // memset, size_t
|
#include <string.h> // memset, size_t
|
||||||
|
|
||||||
#include "modules/audio_coding/neteq/audio_multi_vector.h"
|
#include "modules/audio_coding/neteq/audio_multi_vector.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -49,6 +48,9 @@ class TimeStretch {
|
|||||||
|
|
||||||
virtual ~TimeStretch() {}
|
virtual ~TimeStretch() {}
|
||||||
|
|
||||||
|
TimeStretch(const TimeStretch&) = delete;
|
||||||
|
TimeStretch& operator=(const TimeStretch&) = delete;
|
||||||
|
|
||||||
// This method performs the processing common to both Accelerate and
|
// This method performs the processing common to both Accelerate and
|
||||||
// PreemptiveExpand.
|
// PreemptiveExpand.
|
||||||
ReturnCodes Process(const int16_t* input,
|
ReturnCodes Process(const int16_t* input,
|
||||||
@ -105,8 +107,6 @@ class TimeStretch {
|
|||||||
int32_t vec2_energy,
|
int32_t vec2_energy,
|
||||||
size_t peak_index,
|
size_t peak_index,
|
||||||
int scaling) const;
|
int scaling) const;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(TimeStretch);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#define MODULES_AUDIO_CODING_NETEQ_TIMESTAMP_SCALER_H_
|
#define MODULES_AUDIO_CODING_NETEQ_TIMESTAMP_SCALER_H_
|
||||||
|
|
||||||
#include "modules/audio_coding/neteq/packet.h"
|
#include "modules/audio_coding/neteq/packet.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -34,6 +33,9 @@ class TimestampScaler {
|
|||||||
|
|
||||||
virtual ~TimestampScaler() {}
|
virtual ~TimestampScaler() {}
|
||||||
|
|
||||||
|
TimestampScaler(const TimestampScaler&) = delete;
|
||||||
|
TimestampScaler& operator=(const TimestampScaler&) = delete;
|
||||||
|
|
||||||
// Start over.
|
// Start over.
|
||||||
virtual void Reset();
|
virtual void Reset();
|
||||||
|
|
||||||
@ -59,8 +61,6 @@ class TimestampScaler {
|
|||||||
uint32_t external_ref_;
|
uint32_t external_ref_;
|
||||||
uint32_t internal_ref_;
|
uint32_t internal_ref_;
|
||||||
const DecoderDatabase& decoder_database_;
|
const DecoderDatabase& decoder_database_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(TimestampScaler);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
#include "modules/audio_coding/neteq/tools/audio_sink.h"
|
#include "modules/audio_coding/neteq/tools/audio_sink.h"
|
||||||
#include "rtc_base/buffer.h"
|
#include "rtc_base/buffer.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/message_digest.h"
|
#include "rtc_base/message_digest.h"
|
||||||
#include "rtc_base/string_encode.h"
|
#include "rtc_base/string_encode.h"
|
||||||
#include "rtc_base/system/arch.h"
|
#include "rtc_base/system/arch.h"
|
||||||
@ -31,6 +30,9 @@ class AudioChecksum : public AudioSink {
|
|||||||
checksum_result_(checksum_->Size()),
|
checksum_result_(checksum_->Size()),
|
||||||
finished_(false) {}
|
finished_(false) {}
|
||||||
|
|
||||||
|
AudioChecksum(const AudioChecksum&) = delete;
|
||||||
|
AudioChecksum& operator=(const AudioChecksum&) = delete;
|
||||||
|
|
||||||
bool WriteArray(const int16_t* audio, size_t num_samples) override {
|
bool WriteArray(const int16_t* audio, size_t num_samples) override {
|
||||||
if (finished_)
|
if (finished_)
|
||||||
return false;
|
return false;
|
||||||
@ -56,8 +58,6 @@ class AudioChecksum : public AudioSink {
|
|||||||
std::unique_ptr<rtc::MessageDigest> checksum_;
|
std::unique_ptr<rtc::MessageDigest> checksum_;
|
||||||
rtc::Buffer checksum_result_;
|
rtc::Buffer checksum_result_;
|
||||||
bool finished_;
|
bool finished_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioChecksum);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace test
|
} // namespace test
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "api/array_view.h"
|
#include "api/array_view.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace test {
|
namespace test {
|
||||||
@ -29,6 +28,9 @@ class AudioLoop {
|
|||||||
|
|
||||||
virtual ~AudioLoop() {}
|
virtual ~AudioLoop() {}
|
||||||
|
|
||||||
|
AudioLoop(const AudioLoop&) = delete;
|
||||||
|
AudioLoop& operator=(const AudioLoop&) = delete;
|
||||||
|
|
||||||
// Initializes the AudioLoop by reading from `file_name`. The loop will be no
|
// Initializes the AudioLoop by reading from `file_name`. The loop will be no
|
||||||
// longer than `max_loop_length_samples`, if the length of the file is
|
// longer than `max_loop_length_samples`, if the length of the file is
|
||||||
// greater. Otherwise, the loop length is the same as the file length.
|
// greater. Otherwise, the loop length is the same as the file length.
|
||||||
@ -47,8 +49,6 @@ class AudioLoop {
|
|||||||
size_t loop_length_samples_;
|
size_t loop_length_samples_;
|
||||||
size_t block_length_samples_;
|
size_t block_length_samples_;
|
||||||
std::unique_ptr<int16_t[]> audio_array_;
|
std::unique_ptr<int16_t[]> audio_array_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioLoop);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace test
|
} // namespace test
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#define MODULES_AUDIO_CODING_NETEQ_TOOLS_AUDIO_SINK_H_
|
#define MODULES_AUDIO_CODING_NETEQ_TOOLS_AUDIO_SINK_H_
|
||||||
|
|
||||||
#include "api/audio/audio_frame.h"
|
#include "api/audio/audio_frame.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace test {
|
namespace test {
|
||||||
@ -24,6 +23,9 @@ class AudioSink {
|
|||||||
AudioSink() {}
|
AudioSink() {}
|
||||||
virtual ~AudioSink() {}
|
virtual ~AudioSink() {}
|
||||||
|
|
||||||
|
AudioSink(const AudioSink&) = delete;
|
||||||
|
AudioSink& operator=(const AudioSink&) = delete;
|
||||||
|
|
||||||
// Writes `num_samples` from `audio` to the AudioSink. Returns true if
|
// Writes `num_samples` from `audio` to the AudioSink. Returns true if
|
||||||
// successful, otherwise false.
|
// successful, otherwise false.
|
||||||
virtual bool WriteArray(const int16_t* audio, size_t num_samples) = 0;
|
virtual bool WriteArray(const int16_t* audio, size_t num_samples) = 0;
|
||||||
@ -34,9 +36,6 @@ class AudioSink {
|
|||||||
return WriteArray(audio_frame.data(), audio_frame.samples_per_channel_ *
|
return WriteArray(audio_frame.data(), audio_frame.samples_per_channel_ *
|
||||||
audio_frame.num_channels_);
|
audio_frame.num_channels_);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioSink);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Forks the output audio to two AudioSink objects.
|
// Forks the output audio to two AudioSink objects.
|
||||||
@ -45,23 +44,25 @@ class AudioSinkFork : public AudioSink {
|
|||||||
AudioSinkFork(AudioSink* left, AudioSink* right)
|
AudioSinkFork(AudioSink* left, AudioSink* right)
|
||||||
: left_sink_(left), right_sink_(right) {}
|
: left_sink_(left), right_sink_(right) {}
|
||||||
|
|
||||||
|
AudioSinkFork(const AudioSinkFork&) = delete;
|
||||||
|
AudioSinkFork& operator=(const AudioSinkFork&) = delete;
|
||||||
|
|
||||||
bool WriteArray(const int16_t* audio, size_t num_samples) override;
|
bool WriteArray(const int16_t* audio, size_t num_samples) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AudioSink* left_sink_;
|
AudioSink* left_sink_;
|
||||||
AudioSink* right_sink_;
|
AudioSink* right_sink_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioSinkFork);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// An AudioSink implementation that does nothing.
|
// An AudioSink implementation that does nothing.
|
||||||
class VoidAudioSink : public AudioSink {
|
class VoidAudioSink : public AudioSink {
|
||||||
public:
|
public:
|
||||||
VoidAudioSink() = default;
|
VoidAudioSink() = default;
|
||||||
bool WriteArray(const int16_t* audio, size_t num_samples) override;
|
|
||||||
|
|
||||||
private:
|
VoidAudioSink(const VoidAudioSink&) = delete;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(VoidAudioSink);
|
VoidAudioSink& operator=(const VoidAudioSink&) = delete;
|
||||||
|
|
||||||
|
bool WriteArray(const int16_t* audio, size_t num_samples) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace test
|
} // namespace test
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "modules/audio_coding/neteq/tools/packet_source.h"
|
#include "modules/audio_coding/neteq/tools/packet_source.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace test {
|
namespace test {
|
||||||
@ -31,6 +30,9 @@ class ConstantPcmPacketSource : public PacketSource {
|
|||||||
int sample_rate_hz,
|
int sample_rate_hz,
|
||||||
int payload_type);
|
int payload_type);
|
||||||
|
|
||||||
|
ConstantPcmPacketSource(const ConstantPcmPacketSource&) = delete;
|
||||||
|
ConstantPcmPacketSource& operator=(const ConstantPcmPacketSource&) = delete;
|
||||||
|
|
||||||
std::unique_ptr<Packet> NextPacket() override;
|
std::unique_ptr<Packet> NextPacket() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -46,8 +48,6 @@ class ConstantPcmPacketSource : public PacketSource {
|
|||||||
uint16_t seq_number_;
|
uint16_t seq_number_;
|
||||||
uint32_t timestamp_;
|
uint32_t timestamp_;
|
||||||
const uint32_t payload_ssrc_;
|
const uint32_t payload_ssrc_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ConstantPcmPacketSource);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace test
|
} // namespace test
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace test {
|
namespace test {
|
||||||
|
|
||||||
@ -27,6 +25,9 @@ class InputAudioFile {
|
|||||||
|
|
||||||
virtual ~InputAudioFile();
|
virtual ~InputAudioFile();
|
||||||
|
|
||||||
|
InputAudioFile(const InputAudioFile&) = delete;
|
||||||
|
InputAudioFile& operator=(const InputAudioFile&) = delete;
|
||||||
|
|
||||||
// Reads `samples` elements from source file to `destination`. Returns true
|
// Reads `samples` elements from source file to `destination`. Returns true
|
||||||
// if the read was successful, otherwise false. If the file end is reached,
|
// if the read was successful, otherwise false. If the file end is reached,
|
||||||
// the file is rewound and reading continues from the beginning.
|
// the file is rewound and reading continues from the beginning.
|
||||||
@ -52,7 +53,6 @@ class InputAudioFile {
|
|||||||
private:
|
private:
|
||||||
FILE* fp_;
|
FILE* fp_;
|
||||||
const bool loop_at_end_;
|
const bool loop_at_end_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(InputAudioFile);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace test
|
} // namespace test
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "modules/audio_coding/neteq/tools/audio_sink.h"
|
#include "modules/audio_coding/neteq/tools/audio_sink.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace test {
|
namespace test {
|
||||||
@ -34,6 +33,9 @@ class OutputAudioFile : public AudioSink {
|
|||||||
fclose(out_file_);
|
fclose(out_file_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OutputAudioFile(const OutputAudioFile&) = delete;
|
||||||
|
OutputAudioFile& operator=(const OutputAudioFile&) = delete;
|
||||||
|
|
||||||
bool WriteArray(const int16_t* audio, size_t num_samples) override {
|
bool WriteArray(const int16_t* audio, size_t num_samples) override {
|
||||||
RTC_DCHECK(out_file_);
|
RTC_DCHECK(out_file_);
|
||||||
return fwrite(audio, sizeof(*audio), num_samples, out_file_) == num_samples;
|
return fwrite(audio, sizeof(*audio), num_samples, out_file_) == num_samples;
|
||||||
@ -41,8 +43,6 @@ class OutputAudioFile : public AudioSink {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
FILE* out_file_;
|
FILE* out_file_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(OutputAudioFile);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace test
|
} // namespace test
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
#include "common_audio/wav_file.h"
|
#include "common_audio/wav_file.h"
|
||||||
#include "modules/audio_coding/neteq/tools/audio_sink.h"
|
#include "modules/audio_coding/neteq/tools/audio_sink.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace test {
|
namespace test {
|
||||||
@ -29,6 +28,9 @@ class OutputWavFile : public AudioSink {
|
|||||||
int num_channels = 1)
|
int num_channels = 1)
|
||||||
: wav_writer_(file_name, sample_rate_hz, num_channels) {}
|
: wav_writer_(file_name, sample_rate_hz, num_channels) {}
|
||||||
|
|
||||||
|
OutputWavFile(const OutputWavFile&) = delete;
|
||||||
|
OutputWavFile& operator=(const OutputWavFile&) = delete;
|
||||||
|
|
||||||
bool WriteArray(const int16_t* audio, size_t num_samples) override {
|
bool WriteArray(const int16_t* audio, size_t num_samples) override {
|
||||||
wav_writer_.WriteSamples(audio, num_samples);
|
wav_writer_.WriteSamples(audio, num_samples);
|
||||||
return true;
|
return true;
|
||||||
@ -36,8 +38,6 @@ class OutputWavFile : public AudioSink {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
WavWriter wav_writer_;
|
WavWriter wav_writer_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(OutputWavFile);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace test
|
} // namespace test
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include "api/array_view.h"
|
#include "api/array_view.h"
|
||||||
#include "api/rtp_headers.h"
|
#include "api/rtp_headers.h"
|
||||||
#include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
|
#include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/copy_on_write_buffer.h"
|
#include "rtc_base/copy_on_write_buffer.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
@ -54,6 +53,9 @@ class Packet {
|
|||||||
|
|
||||||
virtual ~Packet();
|
virtual ~Packet();
|
||||||
|
|
||||||
|
Packet(const Packet&) = delete;
|
||||||
|
Packet& operator=(const Packet&) = delete;
|
||||||
|
|
||||||
// Parses the first bytes of the RTP payload, interpreting them as RED headers
|
// Parses the first bytes of the RTP payload, interpreting them as RED headers
|
||||||
// according to RFC 2198. The headers will be inserted into `headers`. The
|
// according to RFC 2198. The headers will be inserted into `headers`. The
|
||||||
// caller of the method assumes ownership of the objects in the list, and
|
// caller of the method assumes ownership of the objects in the list, and
|
||||||
@ -95,8 +97,6 @@ class Packet {
|
|||||||
size_t virtual_payload_length_bytes_ = 0;
|
size_t virtual_payload_length_bytes_ = 0;
|
||||||
const double time_ms_; // Used to denote a packet's arrival time.
|
const double time_ms_; // Used to denote a packet's arrival time.
|
||||||
const bool valid_header_;
|
const bool valid_header_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(Packet);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace test
|
} // namespace test
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "modules/audio_coding/neteq/tools/packet.h"
|
#include "modules/audio_coding/neteq/tools/packet.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace test {
|
namespace test {
|
||||||
@ -26,6 +25,9 @@ class PacketSource {
|
|||||||
PacketSource();
|
PacketSource();
|
||||||
virtual ~PacketSource();
|
virtual ~PacketSource();
|
||||||
|
|
||||||
|
PacketSource(const PacketSource&) = delete;
|
||||||
|
PacketSource& operator=(const PacketSource&) = delete;
|
||||||
|
|
||||||
// Returns next packet. Returns nullptr if the source is depleted, or if an
|
// Returns next packet. Returns nullptr if the source is depleted, or if an
|
||||||
// error occurred.
|
// error occurred.
|
||||||
virtual std::unique_ptr<Packet> NextPacket() = 0;
|
virtual std::unique_ptr<Packet> NextPacket() = 0;
|
||||||
@ -34,9 +36,6 @@ class PacketSource {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::bitset<128> filter_; // Payload type is 7 bits in the RFC.
|
std::bitset<128> filter_; // Payload type is 7 bits in the RFC.
|
||||||
|
|
||||||
private:
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(PacketSource);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace test
|
} // namespace test
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
#include "common_audio/resampler/include/resampler.h"
|
#include "common_audio/resampler/include/resampler.h"
|
||||||
#include "modules/audio_coding/neteq/tools/input_audio_file.h"
|
#include "modules/audio_coding/neteq/tools/input_audio_file.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace test {
|
namespace test {
|
||||||
@ -37,6 +36,9 @@ class ResampleInputAudioFile : public InputAudioFile {
|
|||||||
file_rate_hz_(file_rate_hz),
|
file_rate_hz_(file_rate_hz),
|
||||||
output_rate_hz_(output_rate_hz) {}
|
output_rate_hz_(output_rate_hz) {}
|
||||||
|
|
||||||
|
ResampleInputAudioFile(const ResampleInputAudioFile&) = delete;
|
||||||
|
ResampleInputAudioFile& operator=(const ResampleInputAudioFile&) = delete;
|
||||||
|
|
||||||
bool Read(size_t samples, int output_rate_hz, int16_t* destination);
|
bool Read(size_t samples, int output_rate_hz, int16_t* destination);
|
||||||
bool Read(size_t samples, int16_t* destination) override;
|
bool Read(size_t samples, int16_t* destination) override;
|
||||||
void set_output_rate_hz(int rate_hz);
|
void set_output_rate_hz(int rate_hz);
|
||||||
@ -45,7 +47,6 @@ class ResampleInputAudioFile : public InputAudioFile {
|
|||||||
const int file_rate_hz_;
|
const int file_rate_hz_;
|
||||||
int output_rate_hz_;
|
int output_rate_hz_;
|
||||||
Resampler resampler_;
|
Resampler resampler_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ResampleInputAudioFile);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace test
|
} // namespace test
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include "logging/rtc_event_log/rtc_event_log_parser.h"
|
#include "logging/rtc_event_log/rtc_event_log_parser.h"
|
||||||
#include "modules/audio_coding/neteq/tools/packet_source.h"
|
#include "modules/audio_coding/neteq/tools/packet_source.h"
|
||||||
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
|
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -43,6 +42,9 @@ class RtcEventLogSource : public PacketSource {
|
|||||||
|
|
||||||
virtual ~RtcEventLogSource();
|
virtual ~RtcEventLogSource();
|
||||||
|
|
||||||
|
RtcEventLogSource(const RtcEventLogSource&) = delete;
|
||||||
|
RtcEventLogSource& operator=(const RtcEventLogSource&) = delete;
|
||||||
|
|
||||||
std::unique_ptr<Packet> NextPacket() override;
|
std::unique_ptr<Packet> NextPacket() override;
|
||||||
|
|
||||||
// Returns the timestamp of the next audio output event, in milliseconds. The
|
// Returns the timestamp of the next audio output event, in milliseconds. The
|
||||||
@ -60,8 +62,6 @@ class RtcEventLogSource : public PacketSource {
|
|||||||
size_t rtp_packet_index_ = 0;
|
size_t rtp_packet_index_ = 0;
|
||||||
std::vector<int64_t> audio_outputs_;
|
std::vector<int64_t> audio_outputs_;
|
||||||
size_t audio_output_index_ = 0;
|
size_t audio_output_index_ = 0;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(RtcEventLogSource);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace test
|
} // namespace test
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include "absl/types/optional.h"
|
#include "absl/types/optional.h"
|
||||||
#include "modules/audio_coding/neteq/tools/packet_source.h"
|
#include "modules/audio_coding/neteq/tools/packet_source.h"
|
||||||
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
|
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -41,6 +40,9 @@ class RtpFileSource : public PacketSource {
|
|||||||
|
|
||||||
~RtpFileSource() override;
|
~RtpFileSource() override;
|
||||||
|
|
||||||
|
RtpFileSource(const RtpFileSource&) = delete;
|
||||||
|
RtpFileSource& operator=(const RtpFileSource&) = delete;
|
||||||
|
|
||||||
// Registers an RTP header extension and binds it to `id`.
|
// Registers an RTP header extension and binds it to `id`.
|
||||||
virtual bool RegisterRtpHeaderExtension(RTPExtensionType type, uint8_t id);
|
virtual bool RegisterRtpHeaderExtension(RTPExtensionType type, uint8_t id);
|
||||||
|
|
||||||
@ -58,8 +60,6 @@ class RtpFileSource : public PacketSource {
|
|||||||
std::unique_ptr<RtpFileReader> rtp_reader_;
|
std::unique_ptr<RtpFileReader> rtp_reader_;
|
||||||
const absl::optional<uint32_t> ssrc_filter_;
|
const absl::optional<uint32_t> ssrc_filter_;
|
||||||
RtpHeaderExtensionMap rtp_header_extension_map_;
|
RtpHeaderExtensionMap rtp_header_extension_map_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(RtpFileSource);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace test
|
} // namespace test
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#define MODULES_AUDIO_CODING_NETEQ_TOOLS_RTP_GENERATOR_H_
|
#define MODULES_AUDIO_CODING_NETEQ_TOOLS_RTP_GENERATOR_H_
|
||||||
|
|
||||||
#include "api/rtp_headers.h"
|
#include "api/rtp_headers.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace test {
|
namespace test {
|
||||||
@ -34,6 +33,9 @@ class RtpGenerator {
|
|||||||
|
|
||||||
virtual ~RtpGenerator() {}
|
virtual ~RtpGenerator() {}
|
||||||
|
|
||||||
|
RtpGenerator(const RtpGenerator&) = delete;
|
||||||
|
RtpGenerator& operator=(const RtpGenerator&) = delete;
|
||||||
|
|
||||||
// Writes the next RTP header to `rtp_header`, which will be of type
|
// Writes the next RTP header to `rtp_header`, which will be of type
|
||||||
// `payload_type`. Returns the send time for this packet (in ms). The value of
|
// `payload_type`. Returns the send time for this packet (in ms). The value of
|
||||||
// `payload_length_samples` determines the send time for the next packet.
|
// `payload_length_samples` determines the send time for the next packet.
|
||||||
@ -50,9 +52,6 @@ class RtpGenerator {
|
|||||||
const uint32_t ssrc_;
|
const uint32_t ssrc_;
|
||||||
const int samples_per_ms_;
|
const int samples_per_ms_;
|
||||||
double drift_factor_;
|
double drift_factor_;
|
||||||
|
|
||||||
private:
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(RtpGenerator);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class TimestampJumpRtpGenerator : public RtpGenerator {
|
class TimestampJumpRtpGenerator : public RtpGenerator {
|
||||||
@ -66,6 +65,10 @@ class TimestampJumpRtpGenerator : public RtpGenerator {
|
|||||||
jump_from_timestamp_(jump_from_timestamp),
|
jump_from_timestamp_(jump_from_timestamp),
|
||||||
jump_to_timestamp_(jump_to_timestamp) {}
|
jump_to_timestamp_(jump_to_timestamp) {}
|
||||||
|
|
||||||
|
TimestampJumpRtpGenerator(const TimestampJumpRtpGenerator&) = delete;
|
||||||
|
TimestampJumpRtpGenerator& operator=(const TimestampJumpRtpGenerator&) =
|
||||||
|
delete;
|
||||||
|
|
||||||
uint32_t GetRtpHeader(uint8_t payload_type,
|
uint32_t GetRtpHeader(uint8_t payload_type,
|
||||||
size_t payload_length_samples,
|
size_t payload_length_samples,
|
||||||
RTPHeader* rtp_header) override;
|
RTPHeader* rtp_header) override;
|
||||||
@ -73,7 +76,6 @@ class TimestampJumpRtpGenerator : public RtpGenerator {
|
|||||||
private:
|
private:
|
||||||
uint32_t jump_from_timestamp_;
|
uint32_t jump_from_timestamp_;
|
||||||
uint32_t jump_to_timestamp_;
|
uint32_t jump_to_timestamp_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(TimestampJumpRtpGenerator);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace test
|
} // namespace test
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include "api/scoped_refptr.h"
|
#include "api/scoped_refptr.h"
|
||||||
#include "modules/audio_mixer/frame_combiner.h"
|
#include "modules/audio_mixer/frame_combiner.h"
|
||||||
#include "modules/audio_mixer/output_rate_calculator.h"
|
#include "modules/audio_mixer/output_rate_calculator.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/race_checker.h"
|
#include "rtc_base/race_checker.h"
|
||||||
#include "rtc_base/synchronization/mutex.h"
|
#include "rtc_base/synchronization/mutex.h"
|
||||||
#include "rtc_base/thread_annotations.h"
|
#include "rtc_base/thread_annotations.h"
|
||||||
@ -48,6 +47,9 @@ class AudioMixerImpl : public AudioMixer {
|
|||||||
|
|
||||||
~AudioMixerImpl() override;
|
~AudioMixerImpl() override;
|
||||||
|
|
||||||
|
AudioMixerImpl(const AudioMixerImpl&) = delete;
|
||||||
|
AudioMixerImpl& operator=(const AudioMixerImpl&) = delete;
|
||||||
|
|
||||||
// AudioMixer functions
|
// AudioMixer functions
|
||||||
bool AddSource(Source* audio_source) override;
|
bool AddSource(Source* audio_source) override;
|
||||||
void RemoveSource(Source* audio_source) override;
|
void RemoveSource(Source* audio_source) override;
|
||||||
@ -92,8 +94,6 @@ class AudioMixerImpl : public AudioMixer {
|
|||||||
|
|
||||||
// Component that handles actual adding of audio frames.
|
// Component that handles actual adding of audio frames.
|
||||||
FrameCombiner frame_combiner_;
|
FrameCombiner frame_combiner_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioMixerImpl);
|
|
||||||
};
|
};
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
#include "modules/audio_processing/aec3/aec3_common.h"
|
#include "modules/audio_processing/aec3/aec3_common.h"
|
||||||
#include "modules/audio_processing/aec3/fft_data.h"
|
#include "modules/audio_processing/aec3/fft_data.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -30,6 +29,9 @@ class Aec3Fft {
|
|||||||
|
|
||||||
Aec3Fft();
|
Aec3Fft();
|
||||||
|
|
||||||
|
Aec3Fft(const Aec3Fft&) = delete;
|
||||||
|
Aec3Fft& operator=(const Aec3Fft&) = delete;
|
||||||
|
|
||||||
// Computes the FFT. Note that both the input and output are modified.
|
// Computes the FFT. Note that both the input and output are modified.
|
||||||
void Fft(std::array<float, kFftLength>* x, FftData* X) const {
|
void Fft(std::array<float, kFftLength>* x, FftData* X) const {
|
||||||
RTC_DCHECK(x);
|
RTC_DCHECK(x);
|
||||||
@ -66,8 +68,6 @@ class Aec3Fft {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
const OouraFft ooura_fft_;
|
const OouraFft ooura_fft_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(Aec3Fft);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -11,8 +11,6 @@
|
|||||||
#ifndef MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_METRICS_H_
|
#ifndef MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_METRICS_H_
|
||||||
#define MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_METRICS_H_
|
#define MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_METRICS_H_
|
||||||
|
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
// Handles the reporting of metrics for the block_processor.
|
// Handles the reporting of metrics for the block_processor.
|
||||||
@ -20,6 +18,9 @@ class BlockProcessorMetrics {
|
|||||||
public:
|
public:
|
||||||
BlockProcessorMetrics() = default;
|
BlockProcessorMetrics() = default;
|
||||||
|
|
||||||
|
BlockProcessorMetrics(const BlockProcessorMetrics&) = delete;
|
||||||
|
BlockProcessorMetrics& operator=(const BlockProcessorMetrics&) = delete;
|
||||||
|
|
||||||
// Updates the metric with new capture data.
|
// Updates the metric with new capture data.
|
||||||
void UpdateCapture(bool underrun);
|
void UpdateCapture(bool underrun);
|
||||||
|
|
||||||
@ -38,8 +39,6 @@ class BlockProcessorMetrics {
|
|||||||
int render_buffer_underruns_ = 0;
|
int render_buffer_underruns_ = 0;
|
||||||
int render_buffer_overruns_ = 0;
|
int render_buffer_overruns_ = 0;
|
||||||
int buffer_render_calls_ = 0;
|
int buffer_render_calls_ = 0;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(BlockProcessorMetrics);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
#include "api/array_view.h"
|
#include "api/array_view.h"
|
||||||
#include "modules/audio_processing/aec3/aec3_common.h"
|
#include "modules/audio_processing/aec3/aec3_common.h"
|
||||||
#include "modules/audio_processing/utility/cascaded_biquad_filter.h"
|
#include "modules/audio_processing/utility/cascaded_biquad_filter.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -26,6 +25,9 @@ class Decimator {
|
|||||||
public:
|
public:
|
||||||
explicit Decimator(size_t down_sampling_factor);
|
explicit Decimator(size_t down_sampling_factor);
|
||||||
|
|
||||||
|
Decimator(const Decimator&) = delete;
|
||||||
|
Decimator& operator=(const Decimator&) = delete;
|
||||||
|
|
||||||
// Downsamples the signal.
|
// Downsamples the signal.
|
||||||
void Decimate(rtc::ArrayView<const float> in, rtc::ArrayView<float> out);
|
void Decimate(rtc::ArrayView<const float> in, rtc::ArrayView<float> out);
|
||||||
|
|
||||||
@ -33,8 +35,6 @@ class Decimator {
|
|||||||
const size_t down_sampling_factor_;
|
const size_t down_sampling_factor_;
|
||||||
CascadedBiQuadFilter anti_aliasing_filter_;
|
CascadedBiQuadFilter anti_aliasing_filter_;
|
||||||
CascadedBiQuadFilter noise_reduction_filter_;
|
CascadedBiQuadFilter noise_reduction_filter_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(Decimator);
|
|
||||||
};
|
};
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include "modules/audio_processing/aec3/delay_estimate.h"
|
#include "modules/audio_processing/aec3/delay_estimate.h"
|
||||||
#include "modules/audio_processing/aec3/matched_filter.h"
|
#include "modules/audio_processing/aec3/matched_filter.h"
|
||||||
#include "modules/audio_processing/aec3/matched_filter_lag_aggregator.h"
|
#include "modules/audio_processing/aec3/matched_filter_lag_aggregator.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -37,6 +36,9 @@ class EchoPathDelayEstimator {
|
|||||||
size_t num_capture_channels);
|
size_t num_capture_channels);
|
||||||
~EchoPathDelayEstimator();
|
~EchoPathDelayEstimator();
|
||||||
|
|
||||||
|
EchoPathDelayEstimator(const EchoPathDelayEstimator&) = delete;
|
||||||
|
EchoPathDelayEstimator& operator=(const EchoPathDelayEstimator&) = delete;
|
||||||
|
|
||||||
// Resets the estimation. If the delay confidence is reset, the reset behavior
|
// Resets the estimation. If the delay confidence is reset, the reset behavior
|
||||||
// is as if the call is restarted.
|
// is as if the call is restarted.
|
||||||
void Reset(bool reset_delay_confidence);
|
void Reset(bool reset_delay_confidence);
|
||||||
@ -71,8 +73,6 @@ class EchoPathDelayEstimator {
|
|||||||
|
|
||||||
// Internal reset method with more granularity.
|
// Internal reset method with more granularity.
|
||||||
void Reset(bool reset_lag_aggregator, bool reset_delay_confidence);
|
void Reset(bool reset_lag_aggregator, bool reset_delay_confidence);
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(EchoPathDelayEstimator);
|
|
||||||
};
|
};
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
#include "modules/audio_processing/aec3/aec3_common.h"
|
#include "modules/audio_processing/aec3/aec3_common.h"
|
||||||
#include "modules/audio_processing/aec3/aec_state.h"
|
#include "modules/audio_processing/aec3/aec_state.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -34,6 +33,9 @@ class EchoRemoverMetrics {
|
|||||||
|
|
||||||
EchoRemoverMetrics();
|
EchoRemoverMetrics();
|
||||||
|
|
||||||
|
EchoRemoverMetrics(const EchoRemoverMetrics&) = delete;
|
||||||
|
EchoRemoverMetrics& operator=(const EchoRemoverMetrics&) = delete;
|
||||||
|
|
||||||
// Updates the metric with new data.
|
// Updates the metric with new data.
|
||||||
void Update(
|
void Update(
|
||||||
const AecState& aec_state,
|
const AecState& aec_state,
|
||||||
@ -52,8 +54,6 @@ class EchoRemoverMetrics {
|
|||||||
DbMetric erle_time_domain_;
|
DbMetric erle_time_domain_;
|
||||||
bool saturated_capture_ = false;
|
bool saturated_capture_ = false;
|
||||||
bool metrics_reported_ = false;
|
bool metrics_reported_ = false;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(EchoRemoverMetrics);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace aec3 {
|
namespace aec3 {
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#include "api/array_view.h"
|
#include "api/array_view.h"
|
||||||
#include "modules/audio_processing/aec3/aec3_common.h"
|
#include "modules/audio_processing/aec3/aec3_common.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -28,6 +27,9 @@ class ErlEstimator {
|
|||||||
explicit ErlEstimator(size_t startup_phase_length_blocks_);
|
explicit ErlEstimator(size_t startup_phase_length_blocks_);
|
||||||
~ErlEstimator();
|
~ErlEstimator();
|
||||||
|
|
||||||
|
ErlEstimator(const ErlEstimator&) = delete;
|
||||||
|
ErlEstimator& operator=(const ErlEstimator&) = delete;
|
||||||
|
|
||||||
// Resets the ERL estimation.
|
// Resets the ERL estimation.
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
@ -49,7 +51,6 @@ class ErlEstimator {
|
|||||||
float erl_time_domain_;
|
float erl_time_domain_;
|
||||||
int hold_counter_time_domain_;
|
int hold_counter_time_domain_;
|
||||||
size_t blocks_since_reset_ = 0;
|
size_t blocks_since_reset_ = 0;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ErlEstimator);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
#include "absl/types/optional.h"
|
#include "absl/types/optional.h"
|
||||||
#include "modules/audio_processing/aec3/clockdrift_detector.h"
|
#include "modules/audio_processing/aec3/clockdrift_detector.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -24,6 +23,10 @@ class RenderDelayControllerMetrics {
|
|||||||
public:
|
public:
|
||||||
RenderDelayControllerMetrics();
|
RenderDelayControllerMetrics();
|
||||||
|
|
||||||
|
RenderDelayControllerMetrics(const RenderDelayControllerMetrics&) = delete;
|
||||||
|
RenderDelayControllerMetrics& operator=(const RenderDelayControllerMetrics&) =
|
||||||
|
delete;
|
||||||
|
|
||||||
// Updates the metric with new data.
|
// Updates the metric with new data.
|
||||||
void Update(absl::optional<size_t> delay_samples,
|
void Update(absl::optional<size_t> delay_samples,
|
||||||
size_t buffer_delay_blocks,
|
size_t buffer_delay_blocks,
|
||||||
@ -46,8 +49,6 @@ class RenderDelayControllerMetrics {
|
|||||||
bool metrics_reported_ = false;
|
bool metrics_reported_ = false;
|
||||||
bool initial_update = true;
|
bool initial_update = true;
|
||||||
int skew_shift_count_ = 0;
|
int skew_shift_count_ = 0;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(RenderDelayControllerMetrics);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include "modules/audio_processing/aec3/aec3_common.h"
|
#include "modules/audio_processing/aec3/aec3_common.h"
|
||||||
#include "modules/audio_processing/aec3/render_buffer.h"
|
#include "modules/audio_processing/aec3/render_buffer.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -30,6 +29,9 @@ class RenderSignalAnalyzer {
|
|||||||
explicit RenderSignalAnalyzer(const EchoCanceller3Config& config);
|
explicit RenderSignalAnalyzer(const EchoCanceller3Config& config);
|
||||||
~RenderSignalAnalyzer();
|
~RenderSignalAnalyzer();
|
||||||
|
|
||||||
|
RenderSignalAnalyzer(const RenderSignalAnalyzer&) = delete;
|
||||||
|
RenderSignalAnalyzer& operator=(const RenderSignalAnalyzer&) = delete;
|
||||||
|
|
||||||
// Updates the render signal analysis with the most recent render signal.
|
// Updates the render signal analysis with the most recent render signal.
|
||||||
void Update(const RenderBuffer& render_buffer,
|
void Update(const RenderBuffer& render_buffer,
|
||||||
const absl::optional<size_t>& delay_partitions);
|
const absl::optional<size_t>& delay_partitions);
|
||||||
@ -53,8 +55,6 @@ class RenderSignalAnalyzer {
|
|||||||
std::array<size_t, kFftLengthBy2 - 1> narrow_band_counters_;
|
std::array<size_t, kFftLengthBy2 - 1> narrow_band_counters_;
|
||||||
absl::optional<int> narrow_peak_band_;
|
absl::optional<int> narrow_peak_band_;
|
||||||
size_t narrow_peak_counter_;
|
size_t narrow_peak_counter_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(RenderSignalAnalyzer);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
#include "modules/audio_processing/aec3/aec3_common.h"
|
#include "modules/audio_processing/aec3/aec3_common.h"
|
||||||
#include "modules/audio_processing/aec3/aec3_fft.h"
|
#include "modules/audio_processing/aec3/aec3_fft.h"
|
||||||
#include "modules/audio_processing/aec3/fft_data.h"
|
#include "modules/audio_processing/aec3/fft_data.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -27,6 +26,10 @@ class SuppressionFilter {
|
|||||||
int sample_rate_hz,
|
int sample_rate_hz,
|
||||||
size_t num_capture_channels_);
|
size_t num_capture_channels_);
|
||||||
~SuppressionFilter();
|
~SuppressionFilter();
|
||||||
|
|
||||||
|
SuppressionFilter(const SuppressionFilter&) = delete;
|
||||||
|
SuppressionFilter& operator=(const SuppressionFilter&) = delete;
|
||||||
|
|
||||||
void ApplyGain(rtc::ArrayView<const FftData> comfort_noise,
|
void ApplyGain(rtc::ArrayView<const FftData> comfort_noise,
|
||||||
rtc::ArrayView<const FftData> comfort_noise_high_bands,
|
rtc::ArrayView<const FftData> comfort_noise_high_bands,
|
||||||
const std::array<float, kFftLengthBy2Plus1>& suppression_gain,
|
const std::array<float, kFftLengthBy2Plus1>& suppression_gain,
|
||||||
@ -40,7 +43,6 @@ class SuppressionFilter {
|
|||||||
const size_t num_capture_channels_;
|
const size_t num_capture_channels_;
|
||||||
const Aec3Fft fft_;
|
const Aec3Fft fft_;
|
||||||
std::vector<std::vector<std::array<float, kFftLengthBy2>>> e_output_old_;
|
std::vector<std::vector<std::array<float, kFftLengthBy2>>> e_output_old_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(SuppressionFilter);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include "modules/audio_processing/aec3/nearend_detector.h"
|
#include "modules/audio_processing/aec3/nearend_detector.h"
|
||||||
#include "modules/audio_processing/aec3/render_signal_analyzer.h"
|
#include "modules/audio_processing/aec3/render_signal_analyzer.h"
|
||||||
#include "modules/audio_processing/logging/apm_data_dumper.h"
|
#include "modules/audio_processing/logging/apm_data_dumper.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -36,6 +35,10 @@ class SuppressionGain {
|
|||||||
int sample_rate_hz,
|
int sample_rate_hz,
|
||||||
size_t num_capture_channels);
|
size_t num_capture_channels);
|
||||||
~SuppressionGain();
|
~SuppressionGain();
|
||||||
|
|
||||||
|
SuppressionGain(const SuppressionGain&) = delete;
|
||||||
|
SuppressionGain& operator=(const SuppressionGain&) = delete;
|
||||||
|
|
||||||
void GetGain(
|
void GetGain(
|
||||||
rtc::ArrayView<const std::array<float, kFftLengthBy2Plus1>>
|
rtc::ArrayView<const std::array<float, kFftLengthBy2Plus1>>
|
||||||
nearend_spectrum,
|
nearend_spectrum,
|
||||||
@ -134,8 +137,6 @@ class SuppressionGain {
|
|||||||
// echo spectrum.
|
// echo spectrum.
|
||||||
const bool use_unbounded_echo_spectrum_;
|
const bool use_unbounded_echo_spectrum_;
|
||||||
std::unique_ptr<NearendDetector> dominant_nearend_detector_;
|
std::unique_ptr<NearendDetector> dominant_nearend_detector_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(SuppressionGain);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
#include "modules/audio_processing/agc2/agc2_common.h"
|
#include "modules/audio_processing/agc2/agc2_common.h"
|
||||||
#include "modules/audio_processing/include/audio_frame_view.h"
|
#include "modules/audio_processing/include/audio_frame_view.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -34,6 +33,10 @@ class FixedDigitalLevelEstimator {
|
|||||||
FixedDigitalLevelEstimator(int sample_rate_hz,
|
FixedDigitalLevelEstimator(int sample_rate_hz,
|
||||||
ApmDataDumper* apm_data_dumper);
|
ApmDataDumper* apm_data_dumper);
|
||||||
|
|
||||||
|
FixedDigitalLevelEstimator(const FixedDigitalLevelEstimator&) = delete;
|
||||||
|
FixedDigitalLevelEstimator& operator=(const FixedDigitalLevelEstimator&) =
|
||||||
|
delete;
|
||||||
|
|
||||||
// The input is assumed to be in FloatS16 format. Scaled input will
|
// The input is assumed to be in FloatS16 format. Scaled input will
|
||||||
// produce similarly scaled output. A frame of with kFrameDurationMs
|
// produce similarly scaled output. A frame of with kFrameDurationMs
|
||||||
// ms of audio produces a level estimates in the same scale. The
|
// ms of audio produces a level estimates in the same scale. The
|
||||||
@ -57,8 +60,6 @@ class FixedDigitalLevelEstimator {
|
|||||||
float filter_state_level_;
|
float filter_state_level_;
|
||||||
int samples_in_frame_;
|
int samples_in_frame_;
|
||||||
int samples_in_sub_frame_;
|
int samples_in_sub_frame_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(FixedDigitalLevelEstimator);
|
|
||||||
};
|
};
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "modules/audio_processing/agc2/agc2_common.h"
|
#include "modules/audio_processing/agc2/agc2_common.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/gtest_prod_util.h"
|
#include "rtc_base/gtest_prod_util.h"
|
||||||
#include "system_wrappers/include/metrics.h"
|
#include "system_wrappers/include/metrics.h"
|
||||||
|
|
||||||
@ -64,6 +63,9 @@ class InterpolatedGainCurve {
|
|||||||
const std::string& histogram_name_prefix);
|
const std::string& histogram_name_prefix);
|
||||||
~InterpolatedGainCurve();
|
~InterpolatedGainCurve();
|
||||||
|
|
||||||
|
InterpolatedGainCurve(const InterpolatedGainCurve&) = delete;
|
||||||
|
InterpolatedGainCurve& operator=(const InterpolatedGainCurve&) = delete;
|
||||||
|
|
||||||
Stats get_stats() const { return stats_; }
|
Stats get_stats() const { return stats_; }
|
||||||
|
|
||||||
// Given a non-negative input level (linear scale), a scalar factor to apply
|
// Given a non-negative input level (linear scale), a scalar factor to apply
|
||||||
@ -143,8 +145,6 @@ class InterpolatedGainCurve {
|
|||||||
|
|
||||||
// Stats.
|
// Stats.
|
||||||
mutable Stats stats_;
|
mutable Stats stats_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(InterpolatedGainCurve);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
#include "modules/audio_processing/audio_buffer.h"
|
#include "modules/audio_processing/audio_buffer.h"
|
||||||
#include "modules/audio_processing/include/audio_processing.h"
|
#include "modules/audio_processing/include/audio_processing.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -85,6 +84,9 @@ class EchoControlMobileImpl::Canceller {
|
|||||||
WebRtcAecm_Free(state_);
|
WebRtcAecm_Free(state_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Canceller(const Canceller&) = delete;
|
||||||
|
Canceller& operator=(const Canceller&) = delete;
|
||||||
|
|
||||||
void* state() {
|
void* state() {
|
||||||
RTC_DCHECK(state_);
|
RTC_DCHECK(state_);
|
||||||
return state_;
|
return state_;
|
||||||
@ -98,7 +100,6 @@ class EchoControlMobileImpl::Canceller {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void* state_;
|
void* state_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(Canceller);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
EchoControlMobileImpl::EchoControlMobileImpl()
|
EchoControlMobileImpl::EchoControlMobileImpl()
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include "modules/audio_processing/test/conversational_speech/timing.h"
|
#include "modules/audio_processing/test/conversational_speech/timing.h"
|
||||||
#include "modules/audio_processing/test/conversational_speech/wavreader_abstract_factory.h"
|
#include "modules/audio_processing/test/conversational_speech/wavreader_abstract_factory.h"
|
||||||
#include "modules/audio_processing/test/conversational_speech/wavreader_interface.h"
|
#include "modules/audio_processing/test/conversational_speech/wavreader_interface.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace test {
|
namespace test {
|
||||||
@ -57,6 +56,9 @@ class MultiEndCall {
|
|||||||
std::unique_ptr<WavReaderAbstractFactory> wavreader_abstract_factory);
|
std::unique_ptr<WavReaderAbstractFactory> wavreader_abstract_factory);
|
||||||
~MultiEndCall();
|
~MultiEndCall();
|
||||||
|
|
||||||
|
MultiEndCall(const MultiEndCall&) = delete;
|
||||||
|
MultiEndCall& operator=(const MultiEndCall&) = delete;
|
||||||
|
|
||||||
const std::set<std::string>& speaker_names() const { return speaker_names_; }
|
const std::set<std::string>& speaker_names() const { return speaker_names_; }
|
||||||
const std::map<std::string, std::unique_ptr<WavReaderInterface>>&
|
const std::map<std::string, std::unique_ptr<WavReaderInterface>>&
|
||||||
audiotrack_readers() const {
|
audiotrack_readers() const {
|
||||||
@ -92,8 +94,6 @@ class MultiEndCall {
|
|||||||
int sample_rate_hz_;
|
int sample_rate_hz_;
|
||||||
size_t total_duration_samples_;
|
size_t total_duration_samples_;
|
||||||
std::vector<SpeakingTurn> speaking_turns_;
|
std::vector<SpeakingTurn> speaking_turns_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(MultiEndCall);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace conversational_speech
|
} // namespace conversational_speech
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include "common_audio/channel_buffer.h"
|
#include "common_audio/channel_buffer.h"
|
||||||
#include "common_audio/wav_file.h"
|
#include "common_audio/wav_file.h"
|
||||||
#include "modules/audio_processing/include/audio_processing.h"
|
#include "modules/audio_processing/include/audio_processing.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -35,13 +34,14 @@ class RawFile final {
|
|||||||
explicit RawFile(const std::string& filename);
|
explicit RawFile(const std::string& filename);
|
||||||
~RawFile();
|
~RawFile();
|
||||||
|
|
||||||
|
RawFile(const RawFile&) = delete;
|
||||||
|
RawFile& operator=(const RawFile&) = delete;
|
||||||
|
|
||||||
void WriteSamples(const int16_t* samples, size_t num_samples);
|
void WriteSamples(const int16_t* samples, size_t num_samples);
|
||||||
void WriteSamples(const float* samples, size_t num_samples);
|
void WriteSamples(const float* samples, size_t num_samples);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FILE* file_handle_;
|
FILE* file_handle_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(RawFile);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Encapsulates samples and metadata for an integer frame.
|
// Encapsulates samples and metadata for an integer frame.
|
||||||
@ -78,6 +78,9 @@ class ChannelBufferWavReader final {
|
|||||||
explicit ChannelBufferWavReader(std::unique_ptr<WavReader> file);
|
explicit ChannelBufferWavReader(std::unique_ptr<WavReader> file);
|
||||||
~ChannelBufferWavReader();
|
~ChannelBufferWavReader();
|
||||||
|
|
||||||
|
ChannelBufferWavReader(const ChannelBufferWavReader&) = delete;
|
||||||
|
ChannelBufferWavReader& operator=(const ChannelBufferWavReader&) = delete;
|
||||||
|
|
||||||
// Reads data from the file according to the `buffer` format. Returns false if
|
// Reads data from the file according to the `buffer` format. Returns false if
|
||||||
// a full buffer can't be read from the file.
|
// a full buffer can't be read from the file.
|
||||||
bool Read(ChannelBuffer<float>* buffer);
|
bool Read(ChannelBuffer<float>* buffer);
|
||||||
@ -85,8 +88,6 @@ class ChannelBufferWavReader final {
|
|||||||
private:
|
private:
|
||||||
std::unique_ptr<WavReader> file_;
|
std::unique_ptr<WavReader> file_;
|
||||||
std::vector<float> interleaved_;
|
std::vector<float> interleaved_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ChannelBufferWavReader);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Writes ChannelBuffers to a provided WavWriter.
|
// Writes ChannelBuffers to a provided WavWriter.
|
||||||
@ -95,13 +96,14 @@ class ChannelBufferWavWriter final {
|
|||||||
explicit ChannelBufferWavWriter(std::unique_ptr<WavWriter> file);
|
explicit ChannelBufferWavWriter(std::unique_ptr<WavWriter> file);
|
||||||
~ChannelBufferWavWriter();
|
~ChannelBufferWavWriter();
|
||||||
|
|
||||||
|
ChannelBufferWavWriter(const ChannelBufferWavWriter&) = delete;
|
||||||
|
ChannelBufferWavWriter& operator=(const ChannelBufferWavWriter&) = delete;
|
||||||
|
|
||||||
void Write(const ChannelBuffer<float>& buffer);
|
void Write(const ChannelBuffer<float>& buffer);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<WavWriter> file_;
|
std::unique_ptr<WavWriter> file_;
|
||||||
std::vector<float> interleaved_;
|
std::vector<float> interleaved_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ChannelBufferWavWriter);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Takes a pointer to a vector. Allows appending the samples of channel buffers
|
// Takes a pointer to a vector. Allows appending the samples of channel buffers
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include "api/transport/network_types.h"
|
#include "api/transport/network_types.h"
|
||||||
#include "modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator.h"
|
#include "modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator.h"
|
||||||
#include "modules/congestion_controller/goog_cc/delay_based_bwe.h"
|
#include "modules/congestion_controller/goog_cc/delay_based_bwe.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "system_wrappers/include/clock.h"
|
#include "system_wrappers/include/clock.h"
|
||||||
#include "test/field_trial.h"
|
#include "test/field_trial.h"
|
||||||
#include "test/gtest.h"
|
#include "test/gtest.h"
|
||||||
@ -54,6 +53,9 @@ class RtpStream {
|
|||||||
|
|
||||||
RtpStream(int fps, int bitrate_bps);
|
RtpStream(int fps, int bitrate_bps);
|
||||||
|
|
||||||
|
RtpStream(const RtpStream&) = delete;
|
||||||
|
RtpStream& operator=(const RtpStream&) = delete;
|
||||||
|
|
||||||
// Generates a new frame for this stream. If called too soon after the
|
// Generates a new frame for this stream. If called too soon after the
|
||||||
// previous frame, no frame will be generated. The frame is split into
|
// previous frame, no frame will be generated. The frame is split into
|
||||||
// packets.
|
// packets.
|
||||||
@ -74,8 +76,6 @@ class RtpStream {
|
|||||||
int fps_;
|
int fps_;
|
||||||
int bitrate_bps_;
|
int bitrate_bps_;
|
||||||
int64_t next_rtp_time_;
|
int64_t next_rtp_time_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(RtpStream);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class StreamGenerator {
|
class StreamGenerator {
|
||||||
@ -83,6 +83,9 @@ class StreamGenerator {
|
|||||||
StreamGenerator(int capacity, int64_t time_now);
|
StreamGenerator(int capacity, int64_t time_now);
|
||||||
~StreamGenerator();
|
~StreamGenerator();
|
||||||
|
|
||||||
|
StreamGenerator(const StreamGenerator&) = delete;
|
||||||
|
StreamGenerator& operator=(const StreamGenerator&) = delete;
|
||||||
|
|
||||||
// Add a new stream.
|
// Add a new stream.
|
||||||
void AddStream(RtpStream* stream);
|
void AddStream(RtpStream* stream);
|
||||||
|
|
||||||
@ -108,8 +111,6 @@ class StreamGenerator {
|
|||||||
int64_t prev_arrival_time_us_;
|
int64_t prev_arrival_time_us_;
|
||||||
// All streams being transmitted on this simulated channel.
|
// All streams being transmitted on this simulated channel.
|
||||||
std::vector<std::unique_ptr<RtpStream>> streams_;
|
std::vector<std::unique_ptr<RtpStream>> streams_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(StreamGenerator);
|
|
||||||
};
|
};
|
||||||
} // namespace test
|
} // namespace test
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "api/network_state_predictor.h"
|
#include "api/network_state_predictor.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -22,6 +21,11 @@ class DelayIncreaseDetectorInterface {
|
|||||||
DelayIncreaseDetectorInterface() {}
|
DelayIncreaseDetectorInterface() {}
|
||||||
virtual ~DelayIncreaseDetectorInterface() {}
|
virtual ~DelayIncreaseDetectorInterface() {}
|
||||||
|
|
||||||
|
DelayIncreaseDetectorInterface(const DelayIncreaseDetectorInterface&) =
|
||||||
|
delete;
|
||||||
|
DelayIncreaseDetectorInterface& operator=(
|
||||||
|
const DelayIncreaseDetectorInterface&) = delete;
|
||||||
|
|
||||||
// Update the detector with a new sample. The deltas should represent deltas
|
// Update the detector with a new sample. The deltas should represent deltas
|
||||||
// between timestamp groups as defined by the InterArrival class.
|
// between timestamp groups as defined by the InterArrival class.
|
||||||
virtual void Update(double recv_delta_ms,
|
virtual void Update(double recv_delta_ms,
|
||||||
@ -32,8 +36,6 @@ class DelayIncreaseDetectorInterface {
|
|||||||
bool calculated_deltas) = 0;
|
bool calculated_deltas) = 0;
|
||||||
|
|
||||||
virtual BandwidthUsage State() const = 0;
|
virtual BandwidthUsage State() const = 0;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(DelayIncreaseDetectorInterface);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include "api/transport/network_control.h"
|
#include "api/transport/network_control.h"
|
||||||
#include "api/transport/webrtc_key_value_config.h"
|
#include "api/transport/webrtc_key_value_config.h"
|
||||||
#include "api/units/data_rate.h"
|
#include "api/units/data_rate.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/experiments/field_trial_parser.h"
|
#include "rtc_base/experiments/field_trial_parser.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
@ -63,6 +62,9 @@ class ProbeController {
|
|||||||
RtcEventLog* event_log);
|
RtcEventLog* event_log);
|
||||||
~ProbeController();
|
~ProbeController();
|
||||||
|
|
||||||
|
ProbeController(const ProbeController&) = delete;
|
||||||
|
ProbeController& operator=(const ProbeController&) = delete;
|
||||||
|
|
||||||
ABSL_MUST_USE_RESULT std::vector<ProbeClusterConfig> SetBitrates(
|
ABSL_MUST_USE_RESULT std::vector<ProbeClusterConfig> SetBitrates(
|
||||||
int64_t min_bitrate_bps,
|
int64_t min_bitrate_bps,
|
||||||
int64_t start_bitrate_bps,
|
int64_t start_bitrate_bps,
|
||||||
@ -143,8 +145,6 @@ class ProbeController {
|
|||||||
int32_t next_probe_cluster_id_ = 1;
|
int32_t next_probe_cluster_id_ = 1;
|
||||||
|
|
||||||
ProbeControllerConfig config_;
|
ProbeControllerConfig config_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ProbeController);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include "api/network_state_predictor.h"
|
#include "api/network_state_predictor.h"
|
||||||
#include "api/transport/webrtc_key_value_config.h"
|
#include "api/transport/webrtc_key_value_config.h"
|
||||||
#include "modules/congestion_controller/goog_cc/delay_increase_detector_interface.h"
|
#include "modules/congestion_controller/goog_cc/delay_increase_detector_interface.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/experiments/struct_parameters_parser.h"
|
#include "rtc_base/experiments/struct_parameters_parser.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
@ -57,6 +56,9 @@ class TrendlineEstimator : public DelayIncreaseDetectorInterface {
|
|||||||
|
|
||||||
~TrendlineEstimator() override;
|
~TrendlineEstimator() override;
|
||||||
|
|
||||||
|
TrendlineEstimator(const TrendlineEstimator&) = delete;
|
||||||
|
TrendlineEstimator& operator=(const TrendlineEstimator&) = delete;
|
||||||
|
|
||||||
// Update the estimator with a new sample. The deltas should represent deltas
|
// Update the estimator with a new sample. The deltas should represent deltas
|
||||||
// between timestamp groups as defined by the InterArrival class.
|
// between timestamp groups as defined by the InterArrival class.
|
||||||
void Update(double recv_delta_ms,
|
void Update(double recv_delta_ms,
|
||||||
@ -118,8 +120,6 @@ class TrendlineEstimator : public DelayIncreaseDetectorInterface {
|
|||||||
BandwidthUsage hypothesis_;
|
BandwidthUsage hypothesis_;
|
||||||
BandwidthUsage hypothesis_predicted_;
|
BandwidthUsage hypothesis_predicted_;
|
||||||
NetworkStatePredictor* network_state_predictor_;
|
NetworkStatePredictor* network_state_predictor_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(TrendlineEstimator);
|
|
||||||
};
|
};
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include "api/units/data_size.h"
|
#include "api/units/data_size.h"
|
||||||
#include "api/units/time_delta.h"
|
#include "api/units/time_delta.h"
|
||||||
#include "modules/pacing/paced_sender.h"
|
#include "modules/pacing/paced_sender.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/system/no_unique_address.h"
|
#include "rtc_base/system/no_unique_address.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
@ -33,6 +32,9 @@ class CongestionControlHandler {
|
|||||||
CongestionControlHandler();
|
CongestionControlHandler();
|
||||||
~CongestionControlHandler();
|
~CongestionControlHandler();
|
||||||
|
|
||||||
|
CongestionControlHandler(const CongestionControlHandler&) = delete;
|
||||||
|
CongestionControlHandler& operator=(const CongestionControlHandler&) = delete;
|
||||||
|
|
||||||
void SetTargetRate(TargetTransferRate new_target_rate);
|
void SetTargetRate(TargetTransferRate new_target_rate);
|
||||||
void SetNetworkAvailability(bool network_available);
|
void SetNetworkAvailability(bool network_available);
|
||||||
void SetPacerQueue(TimeDelta expected_queue_time);
|
void SetPacerQueue(TimeDelta expected_queue_time);
|
||||||
@ -48,7 +50,6 @@ class CongestionControlHandler {
|
|||||||
int64_t pacer_expected_queue_ms_ = 0;
|
int64_t pacer_expected_queue_ms_ = 0;
|
||||||
|
|
||||||
RTC_NO_UNIQUE_ADDRESS SequenceChecker sequenced_checker_;
|
RTC_NO_UNIQUE_ADDRESS SequenceChecker sequenced_checker_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(CongestionControlHandler);
|
|
||||||
};
|
};
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
#endif // MODULES_CONGESTION_CONTROLLER_RTP_CONTROL_HANDLER_H_
|
#endif // MODULES_CONGESTION_CONTROLLER_RTP_CONTROL_HANDLER_H_
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
#include "modules/desktop_capture/desktop_region.h"
|
#include "modules/desktop_capture/desktop_region.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -25,10 +24,11 @@ class CroppedDesktopFrame : public DesktopFrame {
|
|||||||
CroppedDesktopFrame(std::unique_ptr<DesktopFrame> frame,
|
CroppedDesktopFrame(std::unique_ptr<DesktopFrame> frame,
|
||||||
const DesktopRect& rect);
|
const DesktopRect& rect);
|
||||||
|
|
||||||
|
CroppedDesktopFrame(const CroppedDesktopFrame&) = delete;
|
||||||
|
CroppedDesktopFrame& operator=(const CroppedDesktopFrame&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const std::unique_ptr<DesktopFrame> frame_;
|
const std::unique_ptr<DesktopFrame> frame_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(CroppedDesktopFrame);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
std::unique_ptr<DesktopFrame> CreateCroppedDesktopFrame(
|
std::unique_ptr<DesktopFrame> CreateCroppedDesktopFrame(
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include "modules/desktop_capture/mouse_cursor.h"
|
#include "modules/desktop_capture/mouse_cursor.h"
|
||||||
#include "modules/desktop_capture/mouse_cursor_monitor.h"
|
#include "modules/desktop_capture/mouse_cursor_monitor.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -72,6 +71,9 @@ class DesktopFrameWithCursor : public DesktopFrame {
|
|||||||
bool cursor_changed);
|
bool cursor_changed);
|
||||||
~DesktopFrameWithCursor() override;
|
~DesktopFrameWithCursor() override;
|
||||||
|
|
||||||
|
DesktopFrameWithCursor(const DesktopFrameWithCursor&) = delete;
|
||||||
|
DesktopFrameWithCursor& operator=(const DesktopFrameWithCursor&) = delete;
|
||||||
|
|
||||||
DesktopRect cursor_rect() const { return cursor_rect_; }
|
DesktopRect cursor_rect() const { return cursor_rect_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -80,8 +82,6 @@ class DesktopFrameWithCursor : public DesktopFrame {
|
|||||||
DesktopVector restore_position_;
|
DesktopVector restore_position_;
|
||||||
std::unique_ptr<DesktopFrame> restore_frame_;
|
std::unique_ptr<DesktopFrame> restore_frame_;
|
||||||
DesktopRect cursor_rect_;
|
DesktopRect cursor_rect_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(DesktopFrameWithCursor);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
DesktopFrameWithCursor::DesktopFrameWithCursor(
|
DesktopFrameWithCursor::DesktopFrameWithCursor(
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include "modules/desktop_capture/mouse_cursor.h"
|
#include "modules/desktop_capture/mouse_cursor.h"
|
||||||
#include "modules/desktop_capture/mouse_cursor_monitor.h"
|
#include "modules/desktop_capture/mouse_cursor_monitor.h"
|
||||||
#include "modules/desktop_capture/shared_memory.h"
|
#include "modules/desktop_capture/shared_memory.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/system/rtc_export.h"
|
#include "rtc_base/system/rtc_export.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
@ -41,6 +40,9 @@ class RTC_EXPORT DesktopAndCursorComposer
|
|||||||
|
|
||||||
~DesktopAndCursorComposer() override;
|
~DesktopAndCursorComposer() override;
|
||||||
|
|
||||||
|
DesktopAndCursorComposer(const DesktopAndCursorComposer&) = delete;
|
||||||
|
DesktopAndCursorComposer& operator=(const DesktopAndCursorComposer&) = delete;
|
||||||
|
|
||||||
// Creates a new composer that relies on an external source for cursor shape
|
// Creates a new composer that relies on an external source for cursor shape
|
||||||
// and position information via the MouseCursorMonitor::Callback interface.
|
// and position information via the MouseCursorMonitor::Callback interface.
|
||||||
static std::unique_ptr<DesktopAndCursorComposer>
|
static std::unique_ptr<DesktopAndCursorComposer>
|
||||||
@ -84,8 +86,6 @@ class RTC_EXPORT DesktopAndCursorComposer
|
|||||||
DesktopVector cursor_position_;
|
DesktopVector cursor_position_;
|
||||||
DesktopRect previous_cursor_rect_;
|
DesktopRect previous_cursor_rect_;
|
||||||
bool cursor_changed_ = false;
|
bool cursor_changed_ = false;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(DesktopAndCursorComposer);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include "modules/desktop_capture/desktop_geometry.h"
|
#include "modules/desktop_capture/desktop_geometry.h"
|
||||||
#include "modules/desktop_capture/desktop_region.h"
|
#include "modules/desktop_capture/desktop_region.h"
|
||||||
#include "modules/desktop_capture/shared_memory.h"
|
#include "modules/desktop_capture/shared_memory.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/system/rtc_export.h"
|
#include "rtc_base/system/rtc_export.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
@ -34,6 +33,9 @@ class RTC_EXPORT DesktopFrame {
|
|||||||
|
|
||||||
virtual ~DesktopFrame();
|
virtual ~DesktopFrame();
|
||||||
|
|
||||||
|
DesktopFrame(const DesktopFrame&) = delete;
|
||||||
|
DesktopFrame& operator=(const DesktopFrame&) = delete;
|
||||||
|
|
||||||
// Returns the rectangle in full desktop coordinates to indicate it covers
|
// Returns the rectangle in full desktop coordinates to indicate it covers
|
||||||
// the area of top_left() to top_letf() + size() / scale_factor().
|
// the area of top_left() to top_letf() + size() / scale_factor().
|
||||||
DesktopRect rect() const;
|
DesktopRect rect() const;
|
||||||
@ -163,8 +165,6 @@ class RTC_EXPORT DesktopFrame {
|
|||||||
int64_t capture_time_ms_;
|
int64_t capture_time_ms_;
|
||||||
uint32_t capturer_id_;
|
uint32_t capturer_id_;
|
||||||
std::vector<uint8_t> icc_profile_;
|
std::vector<uint8_t> icc_profile_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(DesktopFrame);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// A DesktopFrame that stores data in the heap.
|
// A DesktopFrame that stores data in the heap.
|
||||||
@ -175,12 +175,12 @@ class RTC_EXPORT BasicDesktopFrame : public DesktopFrame {
|
|||||||
|
|
||||||
~BasicDesktopFrame() override;
|
~BasicDesktopFrame() override;
|
||||||
|
|
||||||
|
BasicDesktopFrame(const BasicDesktopFrame&) = delete;
|
||||||
|
BasicDesktopFrame& operator=(const BasicDesktopFrame&) = delete;
|
||||||
|
|
||||||
// Creates a BasicDesktopFrame that contains copy of `frame`.
|
// Creates a BasicDesktopFrame that contains copy of `frame`.
|
||||||
// TODO(zijiehe): Return std::unique_ptr<DesktopFrame>
|
// TODO(zijiehe): Return std::unique_ptr<DesktopFrame>
|
||||||
static DesktopFrame* CopyOf(const DesktopFrame& frame);
|
static DesktopFrame* CopyOf(const DesktopFrame& frame);
|
||||||
|
|
||||||
private:
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(BasicDesktopFrame);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// A DesktopFrame that stores data in shared memory.
|
// A DesktopFrame that stores data in shared memory.
|
||||||
@ -206,6 +206,9 @@ class RTC_EXPORT SharedMemoryDesktopFrame : public DesktopFrame {
|
|||||||
|
|
||||||
~SharedMemoryDesktopFrame() override;
|
~SharedMemoryDesktopFrame() override;
|
||||||
|
|
||||||
|
SharedMemoryDesktopFrame(const SharedMemoryDesktopFrame&) = delete;
|
||||||
|
SharedMemoryDesktopFrame& operator=(const SharedMemoryDesktopFrame&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Avoid unexpected order of parameter evaluation.
|
// Avoid unexpected order of parameter evaluation.
|
||||||
// Executing both std::unique_ptr<T>::operator->() and
|
// Executing both std::unique_ptr<T>::operator->() and
|
||||||
@ -217,8 +220,6 @@ class RTC_EXPORT SharedMemoryDesktopFrame : public DesktopFrame {
|
|||||||
SharedMemoryDesktopFrame(DesktopRect rect,
|
SharedMemoryDesktopFrame(DesktopRect rect,
|
||||||
int stride,
|
int stride,
|
||||||
SharedMemory* shared_memory);
|
SharedMemory* shared_memory);
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(SharedMemoryDesktopFrame);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
#define MODULES_DESKTOP_CAPTURE_FULL_SCREEN_APPLICATION_HANDLER_H_
|
#define MODULES_DESKTOP_CAPTURE_FULL_SCREEN_APPLICATION_HANDLER_H_
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "modules/desktop_capture/desktop_capturer.h"
|
#include "modules/desktop_capture/desktop_capturer.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -25,6 +25,10 @@ class FullScreenApplicationHandler {
|
|||||||
public:
|
public:
|
||||||
virtual ~FullScreenApplicationHandler() {}
|
virtual ~FullScreenApplicationHandler() {}
|
||||||
|
|
||||||
|
FullScreenApplicationHandler(const FullScreenApplicationHandler&) = delete;
|
||||||
|
FullScreenApplicationHandler& operator=(const FullScreenApplicationHandler&) =
|
||||||
|
delete;
|
||||||
|
|
||||||
explicit FullScreenApplicationHandler(DesktopCapturer::SourceId sourceId);
|
explicit FullScreenApplicationHandler(DesktopCapturer::SourceId sourceId);
|
||||||
|
|
||||||
// Returns the full-screen window in place of the original window if all the
|
// Returns the full-screen window in place of the original window if all the
|
||||||
@ -39,8 +43,6 @@ class FullScreenApplicationHandler {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
const DesktopCapturer::SourceId source_id_;
|
const DesktopCapturer::SourceId source_id_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(FullScreenApplicationHandler);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
#define MODULES_DESKTOP_CAPTURE_FULL_SCREEN_WINDOW_DETECTOR_H_
|
#define MODULES_DESKTOP_CAPTURE_FULL_SCREEN_WINDOW_DETECTOR_H_
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "api/function_view.h"
|
#include "api/function_view.h"
|
||||||
#include "api/ref_counted_base.h"
|
#include "api/ref_counted_base.h"
|
||||||
#include "api/scoped_refptr.h"
|
#include "api/scoped_refptr.h"
|
||||||
#include "modules/desktop_capture/desktop_capturer.h"
|
#include "modules/desktop_capture/desktop_capturer.h"
|
||||||
#include "modules/desktop_capture/full_screen_application_handler.h"
|
#include "modules/desktop_capture/full_screen_application_handler.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -42,6 +42,9 @@ class FullScreenWindowDetector
|
|||||||
FullScreenWindowDetector(
|
FullScreenWindowDetector(
|
||||||
ApplicationHandlerFactory application_handler_factory);
|
ApplicationHandlerFactory application_handler_factory);
|
||||||
|
|
||||||
|
FullScreenWindowDetector(const FullScreenWindowDetector&) = delete;
|
||||||
|
FullScreenWindowDetector& operator=(const FullScreenWindowDetector&) = delete;
|
||||||
|
|
||||||
// Returns the full-screen window in place of the original window if all the
|
// Returns the full-screen window in place of the original window if all the
|
||||||
// criteria provided by FullScreenApplicationHandler are met, or 0 if no such
|
// criteria provided by FullScreenApplicationHandler are met, or 0 if no such
|
||||||
// window found.
|
// window found.
|
||||||
@ -73,7 +76,6 @@ class FullScreenWindowDetector
|
|||||||
DesktopCapturer::SourceId no_handler_source_id_;
|
DesktopCapturer::SourceId no_handler_source_id_;
|
||||||
|
|
||||||
DesktopCapturer::SourceList window_list_;
|
DesktopCapturer::SourceList window_list_;
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(FullScreenWindowDetector);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#include "api/ref_counted_base.h"
|
#include "api/ref_counted_base.h"
|
||||||
#include "modules/desktop_capture/mac/desktop_configuration.h"
|
#include "modules/desktop_capture/mac/desktop_configuration.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/synchronization/mutex.h"
|
#include "rtc_base/synchronization/mutex.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
@ -31,6 +30,10 @@ class DesktopConfigurationMonitor final
|
|||||||
DesktopConfigurationMonitor();
|
DesktopConfigurationMonitor();
|
||||||
~DesktopConfigurationMonitor();
|
~DesktopConfigurationMonitor();
|
||||||
|
|
||||||
|
DesktopConfigurationMonitor(const DesktopConfigurationMonitor&) = delete;
|
||||||
|
DesktopConfigurationMonitor& operator=(const DesktopConfigurationMonitor&) =
|
||||||
|
delete;
|
||||||
|
|
||||||
// Returns the current desktop configuration.
|
// Returns the current desktop configuration.
|
||||||
MacDesktopConfiguration desktop_configuration();
|
MacDesktopConfiguration desktop_configuration();
|
||||||
|
|
||||||
@ -45,8 +48,6 @@ class DesktopConfigurationMonitor final
|
|||||||
MacDesktopConfiguration desktop_configuration_
|
MacDesktopConfiguration desktop_configuration_
|
||||||
RTC_GUARDED_BY(&desktop_configuration_lock_);
|
RTC_GUARDED_BY(&desktop_configuration_lock_);
|
||||||
std::set<CGDirectDisplayID> reconfiguring_displays_;
|
std::set<CGDirectDisplayID> reconfiguring_displays_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(DesktopConfigurationMonitor);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -35,6 +35,9 @@ class DesktopFrameCGImage final : public DesktopFrame {
|
|||||||
|
|
||||||
~DesktopFrameCGImage() override;
|
~DesktopFrameCGImage() override;
|
||||||
|
|
||||||
|
DesktopFrameCGImage(const DesktopFrameCGImage&) = delete;
|
||||||
|
DesktopFrameCGImage& operator=(const DesktopFrameCGImage&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static std::unique_ptr<DesktopFrameCGImage> CreateFromCGImage(
|
static std::unique_ptr<DesktopFrameCGImage> CreateFromCGImage(
|
||||||
rtc::ScopedCFTypeRef<CGImageRef> cg_image);
|
rtc::ScopedCFTypeRef<CGImageRef> cg_image);
|
||||||
@ -48,8 +51,6 @@ class DesktopFrameCGImage final : public DesktopFrame {
|
|||||||
|
|
||||||
const rtc::ScopedCFTypeRef<CGImageRef> cg_image_;
|
const rtc::ScopedCFTypeRef<CGImageRef> cg_image_;
|
||||||
const rtc::ScopedCFTypeRef<CFDataRef> cg_data_;
|
const rtc::ScopedCFTypeRef<CFDataRef> cg_data_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(DesktopFrameCGImage);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -30,13 +30,14 @@ class DesktopFrameIOSurface final : public DesktopFrame {
|
|||||||
|
|
||||||
~DesktopFrameIOSurface() override;
|
~DesktopFrameIOSurface() override;
|
||||||
|
|
||||||
|
DesktopFrameIOSurface(const DesktopFrameIOSurface&) = delete;
|
||||||
|
DesktopFrameIOSurface& operator=(const DesktopFrameIOSurface&) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// This constructor expects `io_surface` to hold a non-null IOSurfaceRef.
|
// This constructor expects `io_surface` to hold a non-null IOSurfaceRef.
|
||||||
explicit DesktopFrameIOSurface(rtc::ScopedCFTypeRef<IOSurfaceRef> io_surface);
|
explicit DesktopFrameIOSurface(rtc::ScopedCFTypeRef<IOSurfaceRef> io_surface);
|
||||||
|
|
||||||
const rtc::ScopedCFTypeRef<IOSurfaceRef> io_surface_;
|
const rtc::ScopedCFTypeRef<IOSurfaceRef> io_surface_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(DesktopFrameIOSurface);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -28,6 +28,9 @@ class DesktopFrameProvider {
|
|||||||
explicit DesktopFrameProvider(bool allow_iosurface);
|
explicit DesktopFrameProvider(bool allow_iosurface);
|
||||||
~DesktopFrameProvider();
|
~DesktopFrameProvider();
|
||||||
|
|
||||||
|
DesktopFrameProvider(const DesktopFrameProvider&) = delete;
|
||||||
|
DesktopFrameProvider& operator=(const DesktopFrameProvider&) = delete;
|
||||||
|
|
||||||
// The caller takes ownership of the returned desktop frame. Otherwise
|
// The caller takes ownership of the returned desktop frame. Otherwise
|
||||||
// returns null if `display_id` is invalid or not ready. Note that this
|
// returns null if `display_id` is invalid or not ready. Note that this
|
||||||
// function does not remove the frame from the internal container. Caller
|
// function does not remove the frame from the internal container. Caller
|
||||||
@ -49,8 +52,6 @@ class DesktopFrameProvider {
|
|||||||
|
|
||||||
// Most recent IOSurface that contains a capture of matching display.
|
// Most recent IOSurface that contains a capture of matching display.
|
||||||
std::map<CGDirectDisplayID, std::unique_ptr<SharedDesktopFrame>> io_surfaces_;
|
std::map<CGDirectDisplayID, std::unique_ptr<SharedDesktopFrame>> io_surfaces_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(DesktopFrameProvider);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -42,6 +42,9 @@ class ScreenCapturerMac final : public DesktopCapturer {
|
|||||||
bool allow_iosurface);
|
bool allow_iosurface);
|
||||||
~ScreenCapturerMac() override;
|
~ScreenCapturerMac() override;
|
||||||
|
|
||||||
|
ScreenCapturerMac(const ScreenCapturerMac&) = delete;
|
||||||
|
ScreenCapturerMac& operator=(const ScreenCapturerMac&) = delete;
|
||||||
|
|
||||||
// TODO(julien.isorce): Remove Init() or make it private.
|
// TODO(julien.isorce): Remove Init() or make it private.
|
||||||
bool Init();
|
bool Init();
|
||||||
|
|
||||||
@ -111,8 +114,6 @@ class ScreenCapturerMac final : public DesktopCapturer {
|
|||||||
|
|
||||||
// Start, CaptureFrame and destructor have to called in the same thread.
|
// Start, CaptureFrame and destructor have to called in the same thread.
|
||||||
SequenceChecker thread_checker_;
|
SequenceChecker thread_checker_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerMac);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -22,15 +22,16 @@ class MockDesktopCapturerCallback : public DesktopCapturer::Callback {
|
|||||||
MockDesktopCapturerCallback();
|
MockDesktopCapturerCallback();
|
||||||
~MockDesktopCapturerCallback() override;
|
~MockDesktopCapturerCallback() override;
|
||||||
|
|
||||||
|
MockDesktopCapturerCallback(const MockDesktopCapturerCallback&) = delete;
|
||||||
|
MockDesktopCapturerCallback& operator=(const MockDesktopCapturerCallback&) =
|
||||||
|
delete;
|
||||||
|
|
||||||
MOCK_METHOD(void,
|
MOCK_METHOD(void,
|
||||||
OnCaptureResultPtr,
|
OnCaptureResultPtr,
|
||||||
(DesktopCapturer::Result result,
|
(DesktopCapturer::Result result,
|
||||||
std::unique_ptr<DesktopFrame>* frame));
|
std::unique_ptr<DesktopFrame>* frame));
|
||||||
void OnCaptureResult(DesktopCapturer::Result result,
|
void OnCaptureResult(DesktopCapturer::Result result,
|
||||||
std::unique_ptr<DesktopFrame> frame) final;
|
std::unique_ptr<DesktopFrame> frame) final;
|
||||||
|
|
||||||
private:
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(MockDesktopCapturerCallback);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
#include "modules/desktop_capture/desktop_frame.h"
|
#include "modules/desktop_capture/desktop_frame.h"
|
||||||
#include "modules/desktop_capture/desktop_geometry.h"
|
#include "modules/desktop_capture/desktop_geometry.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/system/rtc_export.h"
|
#include "rtc_base/system/rtc_export.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
@ -29,6 +28,9 @@ class RTC_EXPORT MouseCursor {
|
|||||||
|
|
||||||
~MouseCursor();
|
~MouseCursor();
|
||||||
|
|
||||||
|
MouseCursor(const MouseCursor&) = delete;
|
||||||
|
MouseCursor& operator=(const MouseCursor&) = delete;
|
||||||
|
|
||||||
static MouseCursor* CopyOf(const MouseCursor& cursor);
|
static MouseCursor* CopyOf(const MouseCursor& cursor);
|
||||||
|
|
||||||
void set_image(DesktopFrame* image) { image_.reset(image); }
|
void set_image(DesktopFrame* image) { image_.reset(image); }
|
||||||
@ -40,8 +42,6 @@ class RTC_EXPORT MouseCursor {
|
|||||||
private:
|
private:
|
||||||
std::unique_ptr<DesktopFrame> image_;
|
std::unique_ptr<DesktopFrame> image_;
|
||||||
DesktopVector hotspot_;
|
DesktopVector hotspot_;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(MouseCursor);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
// TODO(zijiehe): These headers are not used in this file, but to avoid build
|
// TODO(zijiehe): These headers are not used in this file, but to avoid build
|
||||||
// break in remoting/host. We should add headers in each individual files.
|
// break in remoting/host. We should add headers in each individual files.
|
||||||
#include "modules/desktop_capture/desktop_frame.h" // Remove
|
#include "modules/desktop_capture/desktop_frame.h" // Remove
|
||||||
@ -40,6 +39,9 @@ class ScreenCaptureFrameQueue {
|
|||||||
ScreenCaptureFrameQueue() : current_(0) {}
|
ScreenCaptureFrameQueue() : current_(0) {}
|
||||||
~ScreenCaptureFrameQueue() = default;
|
~ScreenCaptureFrameQueue() = default;
|
||||||
|
|
||||||
|
ScreenCaptureFrameQueue(const ScreenCaptureFrameQueue&) = delete;
|
||||||
|
ScreenCaptureFrameQueue& operator=(const ScreenCaptureFrameQueue&) = delete;
|
||||||
|
|
||||||
// Moves to the next frame in the queue, moving the 'current' frame to become
|
// Moves to the next frame in the queue, moving the 'current' frame to become
|
||||||
// the 'previous' one.
|
// the 'previous' one.
|
||||||
void MoveToNextFrame() { current_ = (current_ + 1) % kQueueLength; }
|
void MoveToNextFrame() { current_ = (current_ + 1) % kQueueLength; }
|
||||||
@ -71,8 +73,6 @@ class ScreenCaptureFrameQueue {
|
|||||||
|
|
||||||
static const int kQueueLength = 2;
|
static const int kQueueLength = 2;
|
||||||
std::unique_ptr<FrameType> frames_[kQueueLength];
|
std::unique_ptr<FrameType> frames_[kQueueLength];
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCaptureFrameQueue);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
#include "modules/desktop_capture/desktop_geometry.h"
|
#include "modules/desktop_capture/desktop_geometry.h"
|
||||||
#include "modules/desktop_capture/desktop_region.h"
|
#include "modules/desktop_capture/desktop_region.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
|
||||||
#include "rtc_base/synchronization/mutex.h"
|
#include "rtc_base/synchronization/mutex.h"
|
||||||
#include "rtc_base/thread_annotations.h"
|
#include "rtc_base/thread_annotations.h"
|
||||||
|
|
||||||
@ -30,6 +29,9 @@ class ScreenCapturerHelper {
|
|||||||
ScreenCapturerHelper() = default;
|
ScreenCapturerHelper() = default;
|
||||||
~ScreenCapturerHelper() = default;
|
~ScreenCapturerHelper() = default;
|
||||||
|
|
||||||
|
ScreenCapturerHelper(const ScreenCapturerHelper&) = delete;
|
||||||
|
ScreenCapturerHelper& operator=(const ScreenCapturerHelper&) = delete;
|
||||||
|
|
||||||
// Clear out the invalid region.
|
// Clear out the invalid region.
|
||||||
void ClearInvalidRegion();
|
void ClearInvalidRegion();
|
||||||
|
|
||||||
@ -82,8 +84,6 @@ class ScreenCapturerHelper {
|
|||||||
// expanded.
|
// expanded.
|
||||||
// If the value is <= 0, then the invalid region is not expanded to a grid.
|
// If the value is <= 0, then the invalid region is not expanded to a grid.
|
||||||
int log_grid_size_ = 0;
|
int log_grid_size_ = 0;
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerHelper);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user