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

Unified Diff: webrtc/api/call/audio_send_stream.h

Issue 2405183002: Moving WebRtcVoiceMediaChannel::SendSetCodec to AudioSendStream. (Closed)
Patch Set: final change Created 4 years, 2 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
« no previous file with comments | « no previous file | webrtc/audio/audio_send_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/call/audio_send_stream.h
diff --git a/webrtc/api/call/audio_send_stream.h b/webrtc/api/call/audio_send_stream.h
index b309f7a221c6c07298f0a13133dfbb2389a5b746..ae7531cbcb372333e803b7ceda91a78cf6514ea6 100644
--- a/webrtc/api/call/audio_send_stream.h
+++ b/webrtc/api/call/audio_send_stream.h
@@ -83,17 +83,60 @@ class AudioSendStream {
// of Call.
int voe_channel_id = -1;
- // Ownership of the encoder object is transferred to Call when the config is
- // passed to Call::CreateAudioSendStream().
- // TODO(solenberg): Implement, once we configure codecs through the new API.
- // std::unique_ptr<AudioEncoder> encoder;
- int cng_payload_type = -1; // pt, or -1 to disable Comfort Noise Generator.
-
// Bitrate limits used for variable audio bitrate streams. Set both to -1 to
// disable audio bitrate adaptation.
// Note: This is still an experimental feature and not ready for real usage.
int min_bitrate_kbps = -1;
int max_bitrate_kbps = -1;
+
+ struct SendCodecSpec {
+ SendCodecSpec() {
+ webrtc::CodecInst empty_inst = {0};
+ codec_inst = empty_inst;
+ codec_inst.pltype = -1;
+ }
+ bool operator==(const SendCodecSpec& rhs) const {
+ {
+ if (nack_enabled != rhs.nack_enabled) {
+ return false;
+ }
+ if (transport_cc_enabled != rhs.transport_cc_enabled) {
+ return false;
+ }
+ if (enable_codec_fec != rhs.enable_codec_fec) {
+ return false;
+ }
+ if (enable_opus_dtx != rhs.enable_opus_dtx) {
+ return false;
+ }
+ if (opus_max_playback_rate != rhs.opus_max_playback_rate) {
+ return false;
+ }
+ if (cng_payload_type != rhs.cng_payload_type) {
+ return false;
+ }
+ if (cng_plfreq != rhs.cng_plfreq) {
+ return false;
+ }
+ if (codec_inst != rhs.codec_inst) {
+ return false;
+ }
+ return true;
+ }
+ }
+ bool operator!=(const SendCodecSpec& rhs) const {
+ return !(*this == rhs);
+ }
+
+ 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;
+ webrtc::CodecInst codec_inst;
+ } send_codec_spec;
};
// Starts stream activity.
« no previous file with comments | « no previous file | webrtc/audio/audio_send_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698