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

Unified Diff: webrtc/call/audio_send_stream.h

Issue 2705093002: Injectable audio encoders: WebRtcVoiceEngine and company (Closed)
Patch Set: Channel::GetSendCodec asks both its acm and its codec manager. Created 3 years, 8 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..5363d130776c90366162fc50ad07b726cd58408f 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;
@@ -110,19 +112,22 @@ class AudioSendStream {
return !(*this == rhs);
}
+ int payload_type;
+ SdpAudioFormat format;
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;
+ rtc::Optional<int> cng_payload_type;
+ // 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;
};
+ // Reconfigure the stream according to the Configuration.
+ virtual void Reconfigure(const Config& config) = 0;
+
// Starts stream activity.
// When a stream is active, it can receive, process and deliver packets.
virtual void Start() = 0;

Powered by Google App Engine
This is Rietveld 408576698