Index: talk/media/webrtc/webrtcvoiceengine.h |
diff --git a/talk/media/webrtc/webrtcvoiceengine.h b/talk/media/webrtc/webrtcvoiceengine.h |
index 313a371f7a977d1d90f6c0b6e7663eae230726ec..147c3e04dd61ae11b479b57dddcd4983d127ccdb 100644 |
--- a/talk/media/webrtc/webrtcvoiceengine.h |
+++ b/talk/media/webrtc/webrtcvoiceengine.h |
@@ -100,7 +100,9 @@ class WebRtcVoiceEngine |
void Terminate(); |
int GetCapabilities(); |
- VoiceMediaChannel* CreateChannel(const AudioOptions& options); |
+ webrtc::VoiceEngine* GetVoE() { return voe()->engine(); } |
+ VoiceMediaChannel* CreateChannel(webrtc::Call* call, |
+ const AudioOptions& options); |
AudioOptions GetOptions() const { return options_; } |
bool SetOptions(const AudioOptions& options); |
@@ -280,7 +282,8 @@ class WebRtcVoiceEngine |
class WebRtcVoiceMediaChannel : public VoiceMediaChannel, |
public webrtc::Transport { |
public: |
- explicit WebRtcVoiceMediaChannel(WebRtcVoiceEngine *engine); |
+ explicit WebRtcVoiceMediaChannel(WebRtcVoiceEngine* engine, |
+ webrtc::Call* call); |
~WebRtcVoiceMediaChannel() override; |
int voe_channel() const { return voe_channel_; } |
@@ -359,8 +362,6 @@ class WebRtcVoiceMediaChannel : public VoiceMediaChannel, |
int GetReceiveChannelNum(uint32 ssrc) const; |
int GetSendChannelNum(uint32 ssrc) const; |
- void SetCall(webrtc::Call* call); |
- |
private: |
WebRtcVoiceEngine* engine() { return engine_; } |
int GetLastEngineError() { return engine()->GetLastEngineError(); } |
@@ -403,8 +404,9 @@ class WebRtcVoiceMediaChannel : public VoiceMediaChannel, |
bool SetHeaderExtension(ExtensionSetterFunction setter, int channel_id, |
const RtpHeaderExtension* extension); |
- void TryAddAudioRecvStream(uint32 ssrc); |
- void TryRemoveAudioRecvStream(uint32 ssrc); |
+ void RecreateAudioReceiveStreams(); |
+ void AddAudioReceiveStream(uint32 ssrc); |
+ void RemoveAudioReceiveStream(uint32 ssrc); |
bool SetRecvCodecsInternal(const std::vector<AudioCodec>& new_codecs); |
bool SetChannelRecvRtpHeaderExtensions( |
@@ -416,7 +418,7 @@ class WebRtcVoiceMediaChannel : public VoiceMediaChannel, |
rtc::ThreadChecker thread_checker_; |
- WebRtcVoiceEngine* engine_; |
+ WebRtcVoiceEngine* const engine_; |
pthatcher1
2015/09/09 07:27:43
Why
WebRtcVoiceEngine const engine_;
Instead of
pbos-webrtc
2015/09/09 07:58:46
Pointer is const and doesn't change, but the objec
the sun
2015/09/09 08:24:51
The first one declares that the *pointer* is const
|
const int voe_channel_; |
rtc::scoped_ptr<WebRtcSoundclipStream> ringback_tone_; |
std::set<int> ringback_channels_; // channels playing ringback |
@@ -433,7 +435,7 @@ class WebRtcVoiceMediaChannel : public VoiceMediaChannel, |
bool typing_noise_detected_; |
SendFlags desired_send_; |
SendFlags send_; |
- webrtc::Call* call_; |
+ webrtc::Call* const call_; |
// send_channels_ contains the channels which are being used for sending. |
// When the default channel (voe_channel) is used for sending, it is |