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

Unified Diff: webrtc/media/engine/webrtcvoiceengine.h

Issue 1765873002: On WVoMC::SetSendParameters(), figure out send codec settings ONCE, not for each send stream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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/media/engine/webrtcvoiceengine.cc » ('j') | webrtc/media/engine/webrtcvoiceengine.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvoiceengine.h
diff --git a/webrtc/media/engine/webrtcvoiceengine.h b/webrtc/media/engine/webrtcvoiceengine.h
index dbb7ea6e76715a811b75a9b907c0e7c4b077fef1..2ee4952a258e020a5dc1fb7575e4efeca6e38039 100644
--- a/webrtc/media/engine/webrtcvoiceengine.h
+++ b/webrtc/media/engine/webrtcvoiceengine.h
@@ -232,22 +232,22 @@ class WebRtcVoiceMediaChannel final : public VoiceMediaChannel,
bool IsDefaultRecvStream(uint32_t ssrc) {
return default_recv_ssrc_ == static_cast<int64_t>(ssrc);
}
- bool SetSendCodecs(int channel, const std::vector<AudioCodec>& codecs);
+ bool SetSendCodecs(int channel);
bool SetSendBitrateInternal(int bps);
+ bool HasSendCodec() const {
+ return send_codec_spec_.codec_inst.pltype != -1;
+ }
rtc::ThreadChecker worker_thread_checker_;
WebRtcVoiceEngine* const engine_ = nullptr;
std::vector<AudioCodec> recv_codecs_;
- std::vector<AudioCodec> send_codecs_;
- std::unique_ptr<webrtc::CodecInst> send_codec_;
bool send_bitrate_setting_ = false;
int send_bitrate_bps_ = 0;
AudioOptions options_;
rtc::Optional<int> dtmf_payload_type_;
bool desired_playout_ = false;
- bool nack_enabled_ = false;
- bool transport_cc_enabled_ = false;
+ bool recv_transport_cc_enabled_ = false;
bool playout_ = false;
SendFlags desired_send_ = SEND_NOTHING;
SendFlags send_ = SEND_NOTHING;
@@ -272,6 +272,22 @@ class WebRtcVoiceMediaChannel final : public VoiceMediaChannel,
std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_;
std::vector<webrtc::RtpExtension> recv_rtp_extensions_;
+ struct SendCodecSpec {
+ SendCodecSpec() {
+ std::memset(&codec_inst, 0, sizeof(codec_inst));
ossu 2016/03/04 14:40:22 I believe CodecInst could be zero initialized with
the sun 2016/03/04 15:44:03 Yes, unfortunately direct braced init of the field
+ codec_inst.pltype = -1;
+ }
+ 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 red_payload_type = -1;
+ int cng_payload_type = -1;
+ int cng_plfreq = -1;
+ webrtc::CodecInst codec_inst;
+ } send_codec_spec_;
+
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel);
};
} // namespace cricket
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvoiceengine.cc » ('j') | webrtc/media/engine/webrtcvoiceengine.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698