Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(724)

Unified Diff: webrtc/call/audio_send_stream.h

Issue 2705093002: Injectable audio encoders: WebRtcVoiceEngine and company (Closed)
Patch Set: audio_send_spec made optional<>, EnableAudioNetworkAdapter now called directly on encoder, VAD supp… Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/call/audio_send_stream.h
diff --git a/webrtc/call/audio_send_stream.h b/webrtc/call/audio_send_stream.h
index 42914301911968878d4559a91ac7336c7d622c47..7575834048a8df6a5d0bc1fc9fa4d2153d625cde 100644
--- a/webrtc/call/audio_send_stream.h
+++ b/webrtc/call/audio_send_stream.h
@@ -15,10 +15,11 @@
#include <string>
#include <vector>
+#include "webrtc/api/audio_codecs/audio_format.h"
#include "webrtc/api/call/transport.h"
#include "webrtc/base/optional.h"
#include "webrtc/config.h"
-#include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
+#include "webrtc/modules/audio_coding/codecs/audio_encoder_factory.h"
#include "webrtc/typedefs.h"
namespace webrtc {
@@ -102,7 +103,8 @@ class AudioSendStream {
rtc::Optional<std::string> audio_network_adaptor_config;
struct SendCodecSpec {
- SendCodecSpec();
+ SendCodecSpec(int payload_type, const SdpAudioFormat& format);
+ ~SendCodecSpec();
std::string ToString() const;
bool operator==(const SendCodecSpec& rhs) const;
@@ -112,15 +114,15 @@ class AudioSendStream {
bool nack_enabled = false;
bool transport_cc_enabled = false;
- bool enable_codec_fec = false;
- bool enable_opus_dtx = false;
- int opus_max_playback_rate = 0;
int cng_payload_type = -1;
- int cng_plfreq = -1;
- int max_ptime_ms = -1;
- int min_ptime_ms = -1;
- webrtc::CodecInst codec_inst;
- } send_codec_spec;
+ int payload_type;
+ SdpAudioFormat format;
+ // If unset, use the encoder's default target bitrate.
+ rtc::Optional<int> target_bitrate_bps;
+ };
+
+ rtc::Optional<SendCodecSpec> send_codec_spec;
+ rtc::scoped_refptr<AudioEncoderFactory> encoder_factory;
};
// Starts stream activity.

Powered by Google App Engine
This is Rietveld 408576698