OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 bool SetLocalMonitor(bool enable); | 114 bool SetLocalMonitor(bool enable); |
115 | 115 |
116 const std::vector<AudioCodec>& codecs(); | 116 const std::vector<AudioCodec>& codecs(); |
117 bool FindCodec(const AudioCodec& codec); | 117 bool FindCodec(const AudioCodec& codec); |
118 bool FindWebRtcCodec(const AudioCodec& codec, webrtc::CodecInst* gcodec); | 118 bool FindWebRtcCodec(const AudioCodec& codec, webrtc::CodecInst* gcodec); |
119 | 119 |
120 const std::vector<RtpHeaderExtension>& rtp_header_extensions() const; | 120 const std::vector<RtpHeaderExtension>& rtp_header_extensions() const; |
121 | 121 |
122 void SetLogging(int min_sev, const char* filter); | 122 void SetLogging(int min_sev, const char* filter); |
123 | 123 |
124 bool RegisterProcessor(uint32 ssrc, | 124 bool RegisterProcessor(uint32_t ssrc, |
125 VoiceProcessor* voice_processor, | 125 VoiceProcessor* voice_processor, |
126 MediaProcessorDirection direction); | 126 MediaProcessorDirection direction); |
127 bool UnregisterProcessor(uint32 ssrc, | 127 bool UnregisterProcessor(uint32_t ssrc, |
128 VoiceProcessor* voice_processor, | 128 VoiceProcessor* voice_processor, |
129 MediaProcessorDirection direction); | 129 MediaProcessorDirection direction); |
130 | 130 |
131 // Method from webrtc::VoEMediaProcess | 131 // Method from webrtc::VoEMediaProcess |
132 void Process(int channel, | 132 void Process(int channel, |
133 webrtc::ProcessingTypes type, | 133 webrtc::ProcessingTypes type, |
134 int16_t audio10ms[], | 134 int16_t audio10ms[], |
135 size_t length, | 135 size_t length, |
136 int sampling_freq, | 136 int sampling_freq, |
137 bool is_stereo) override; | 137 bool is_stereo) override; |
(...skipping 18 matching lines...) Expand all Loading... |
156 bool StartAecDump(rtc::PlatformFile file); | 156 bool StartAecDump(rtc::PlatformFile file); |
157 | 157 |
158 // Check whether the supplied trace should be ignored. | 158 // Check whether the supplied trace should be ignored. |
159 bool ShouldIgnoreTrace(const std::string& trace); | 159 bool ShouldIgnoreTrace(const std::string& trace); |
160 | 160 |
161 // Create a VoiceEngine Channel. | 161 // Create a VoiceEngine Channel. |
162 int CreateMediaVoiceChannel(); | 162 int CreateMediaVoiceChannel(); |
163 | 163 |
164 private: | 164 private: |
165 typedef std::vector<WebRtcVoiceMediaChannel*> ChannelList; | 165 typedef std::vector<WebRtcVoiceMediaChannel*> ChannelList; |
166 typedef sigslot:: | 166 typedef sigslot::signal3<uint32_t, MediaProcessorDirection, AudioFrame*> |
167 signal3<uint32, MediaProcessorDirection, AudioFrame*> FrameSignal; | 167 FrameSignal; |
168 | 168 |
169 void Construct(); | 169 void Construct(); |
170 void ConstructCodecs(); | 170 void ConstructCodecs(); |
171 bool GetVoeCodec(int index, webrtc::CodecInst* codec); | 171 bool GetVoeCodec(int index, webrtc::CodecInst* codec); |
172 bool InitInternal(); | 172 bool InitInternal(); |
173 void SetTraceFilter(int filter); | 173 void SetTraceFilter(int filter); |
174 void SetTraceOptions(const std::string& options); | 174 void SetTraceOptions(const std::string& options); |
175 // Applies either options or overrides. Every option that is "set" | 175 // Applies either options or overrides. Every option that is "set" |
176 // will be applied. Every option not "set" will be ignored. This | 176 // will be applied. Every option not "set" will be ignored. This |
177 // allows us to selectively turn on and off different options easily | 177 // allows us to selectively turn on and off different options easily |
(...skipping 18 matching lines...) Expand all Loading... |
196 | 196 |
197 // webrtc::VoiceEngineObserver: | 197 // webrtc::VoiceEngineObserver: |
198 void CallbackOnError(int channel, int errCode) override; | 198 void CallbackOnError(int channel, int errCode) override; |
199 | 199 |
200 // Given the device type, name, and id, find device id. Return true and | 200 // Given the device type, name, and id, find device id. Return true and |
201 // set the output parameter rtc_id if successful. | 201 // set the output parameter rtc_id if successful. |
202 bool FindWebRtcAudioDeviceId( | 202 bool FindWebRtcAudioDeviceId( |
203 bool is_input, const std::string& dev_name, int dev_id, int* rtc_id); | 203 bool is_input, const std::string& dev_name, int dev_id, int* rtc_id); |
204 bool FindChannelAndSsrc(int channel_num, | 204 bool FindChannelAndSsrc(int channel_num, |
205 WebRtcVoiceMediaChannel** channel, | 205 WebRtcVoiceMediaChannel** channel, |
206 uint32* ssrc) const; | 206 uint32_t* ssrc) const; |
207 bool FindChannelNumFromSsrc(uint32 ssrc, | 207 bool FindChannelNumFromSsrc(uint32_t ssrc, |
208 MediaProcessorDirection direction, | 208 MediaProcessorDirection direction, |
209 int* channel_num); | 209 int* channel_num); |
210 bool ChangeLocalMonitor(bool enable); | 210 bool ChangeLocalMonitor(bool enable); |
211 bool PauseLocalMonitor(); | 211 bool PauseLocalMonitor(); |
212 bool ResumeLocalMonitor(); | 212 bool ResumeLocalMonitor(); |
213 | 213 |
214 bool UnregisterProcessorChannel(MediaProcessorDirection channel_direction, | 214 bool UnregisterProcessorChannel(MediaProcessorDirection channel_direction, |
215 uint32 ssrc, | 215 uint32_t ssrc, |
216 VoiceProcessor* voice_processor, | 216 VoiceProcessor* voice_processor, |
217 MediaProcessorDirection processor_direction); | 217 MediaProcessorDirection processor_direction); |
218 | 218 |
219 void StartAecDump(const std::string& filename); | 219 void StartAecDump(const std::string& filename); |
220 void StopAecDump(); | 220 void StopAecDump(); |
221 int CreateVoiceChannel(VoEWrapper* voe); | 221 int CreateVoiceChannel(VoEWrapper* voe); |
222 | 222 |
223 // When a voice processor registers with the engine, it is connected | 223 // When a voice processor registers with the engine, it is connected |
224 // to either the Rx or Tx signals, based on the direction parameter. | 224 // to either the Rx or Tx signals, based on the direction parameter. |
225 // SignalXXMediaFrame will be invoked for every audio packet. | 225 // SignalXXMediaFrame will be invoked for every audio packet. |
(...skipping 30 matching lines...) Expand all Loading... |
256 // options_ is stored so that when option_overrides_ is cleared, we | 256 // options_ is stored so that when option_overrides_ is cleared, we |
257 // can restore the options_ without the option_overrides. | 257 // can restore the options_ without the option_overrides. |
258 AudioOptions options_; | 258 AudioOptions options_; |
259 AudioOptions option_overrides_; | 259 AudioOptions option_overrides_; |
260 | 260 |
261 // When the media processor registers with the engine, the ssrc is cached | 261 // When the media processor registers with the engine, the ssrc is cached |
262 // here so that a look up need not be made when the callback is invoked. | 262 // here so that a look up need not be made when the callback is invoked. |
263 // This is necessary because the lookup results in mux_channels_cs lock being | 263 // This is necessary because the lookup results in mux_channels_cs lock being |
264 // held and if a remote participant leaves the hangout at the same time | 264 // held and if a remote participant leaves the hangout at the same time |
265 // we hit a deadlock. | 265 // we hit a deadlock. |
266 uint32 tx_processor_ssrc_; | 266 uint32_t tx_processor_ssrc_; |
267 uint32 rx_processor_ssrc_; | 267 uint32_t rx_processor_ssrc_; |
268 | 268 |
269 rtc::CriticalSection signal_media_critical_; | 269 rtc::CriticalSection signal_media_critical_; |
270 | 270 |
271 // Cache received extended_filter_aec, delay_agnostic_aec and experimental_ns | 271 // Cache received extended_filter_aec, delay_agnostic_aec and experimental_ns |
272 // values, and apply them in case they are missing in the audio options. We | 272 // values, and apply them in case they are missing in the audio options. We |
273 // need to do this because SetExtraOptions() will revert to defaults for | 273 // need to do this because SetExtraOptions() will revert to defaults for |
274 // options which are not provided. | 274 // options which are not provided. |
275 Settable<bool> extended_filter_aec_; | 275 Settable<bool> extended_filter_aec_; |
276 Settable<bool> delay_agnostic_aec_; | 276 Settable<bool> delay_agnostic_aec_; |
277 Settable<bool> experimental_ns_; | 277 Settable<bool> experimental_ns_; |
(...skipping 14 matching lines...) Expand all Loading... |
292 const AudioOptions& options() const { return options_; } | 292 const AudioOptions& options() const { return options_; } |
293 | 293 |
294 bool SetSendParameters(const AudioSendParameters& params) override; | 294 bool SetSendParameters(const AudioSendParameters& params) override; |
295 bool SetRecvParameters(const AudioRecvParameters& params) override; | 295 bool SetRecvParameters(const AudioRecvParameters& params) override; |
296 bool SetPlayout(bool playout) override; | 296 bool SetPlayout(bool playout) override; |
297 bool PausePlayout(); | 297 bool PausePlayout(); |
298 bool ResumePlayout(); | 298 bool ResumePlayout(); |
299 bool SetSend(SendFlags send) override; | 299 bool SetSend(SendFlags send) override; |
300 bool PauseSend(); | 300 bool PauseSend(); |
301 bool ResumeSend(); | 301 bool ResumeSend(); |
302 bool SetAudioSend(uint32 ssrc, bool mute, const AudioOptions* options, | 302 bool SetAudioSend(uint32_t ssrc, |
| 303 bool mute, |
| 304 const AudioOptions* options, |
303 AudioRenderer* renderer) override; | 305 AudioRenderer* renderer) override; |
304 bool AddSendStream(const StreamParams& sp) override; | 306 bool AddSendStream(const StreamParams& sp) override; |
305 bool RemoveSendStream(uint32 ssrc) override; | 307 bool RemoveSendStream(uint32_t ssrc) override; |
306 bool AddRecvStream(const StreamParams& sp) override; | 308 bool AddRecvStream(const StreamParams& sp) override; |
307 bool RemoveRecvStream(uint32 ssrc) override; | 309 bool RemoveRecvStream(uint32_t ssrc) override; |
308 bool SetRemoteRenderer(uint32 ssrc, AudioRenderer* renderer) override; | 310 bool SetRemoteRenderer(uint32_t ssrc, AudioRenderer* renderer) override; |
309 bool GetActiveStreams(AudioInfo::StreamList* actives) override; | 311 bool GetActiveStreams(AudioInfo::StreamList* actives) override; |
310 int GetOutputLevel() override; | 312 int GetOutputLevel() override; |
311 int GetTimeSinceLastTyping() override; | 313 int GetTimeSinceLastTyping() override; |
312 void SetTypingDetectionParameters(int time_window, | 314 void SetTypingDetectionParameters(int time_window, |
313 int cost_per_typing, | 315 int cost_per_typing, |
314 int reporting_threshold, | 316 int reporting_threshold, |
315 int penalty_decay, | 317 int penalty_decay, |
316 int type_event_delay) override; | 318 int type_event_delay) override; |
317 bool SetOutputScaling(uint32 ssrc, double left, double right) override; | 319 bool SetOutputScaling(uint32_t ssrc, double left, double right) override; |
318 | 320 |
319 bool SetRingbackTone(const char* buf, int len) override; | 321 bool SetRingbackTone(const char* buf, int len) override; |
320 bool PlayRingbackTone(uint32 ssrc, bool play, bool loop) override; | 322 bool PlayRingbackTone(uint32_t ssrc, bool play, bool loop) override; |
321 bool CanInsertDtmf() override; | 323 bool CanInsertDtmf() override; |
322 bool InsertDtmf(uint32 ssrc, int event, int duration, int flags) override; | 324 bool InsertDtmf(uint32_t ssrc, int event, int duration, int flags) override; |
323 | 325 |
324 void OnPacketReceived(rtc::Buffer* packet, | 326 void OnPacketReceived(rtc::Buffer* packet, |
325 const rtc::PacketTime& packet_time) override; | 327 const rtc::PacketTime& packet_time) override; |
326 void OnRtcpReceived(rtc::Buffer* packet, | 328 void OnRtcpReceived(rtc::Buffer* packet, |
327 const rtc::PacketTime& packet_time) override; | 329 const rtc::PacketTime& packet_time) override; |
328 void OnReadyToSend(bool ready) override {} | 330 void OnReadyToSend(bool ready) override {} |
329 bool GetStats(VoiceMediaInfo* info) override; | 331 bool GetStats(VoiceMediaInfo* info) override; |
330 // Gets last reported error from WebRtc voice engine. This should be only | 332 // Gets last reported error from WebRtc voice engine. This should be only |
331 // called in response a failure. | 333 // called in response a failure. |
332 void GetLastMediaError(uint32* ssrc, | 334 void GetLastMediaError(uint32_t* ssrc, |
333 VoiceMediaChannel::Error* error) override; | 335 VoiceMediaChannel::Error* error) override; |
334 | 336 |
335 // implements Transport interface | 337 // implements Transport interface |
336 int SendPacket(const void* data, size_t len) override { | 338 int SendPacket(const void* data, size_t len) override { |
337 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, | 339 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, |
338 kMaxRtpPacketLen); | 340 kMaxRtpPacketLen); |
339 return VoiceMediaChannel::SendPacket(&packet) ? static_cast<int>(len) : -1; | 341 return VoiceMediaChannel::SendPacket(&packet) ? static_cast<int>(len) : -1; |
340 } | 342 } |
341 | 343 |
342 int SendRTCPPacket(const void* data, size_t len) override { | 344 int SendRTCPPacket(const void* data, size_t len) override { |
343 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, | 345 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, |
344 kMaxRtpPacketLen); | 346 kMaxRtpPacketLen); |
345 return VoiceMediaChannel::SendRtcp(&packet) ? static_cast<int>(len) : -1; | 347 return VoiceMediaChannel::SendRtcp(&packet) ? static_cast<int>(len) : -1; |
346 } | 348 } |
347 | 349 |
348 bool FindSsrc(int channel_num, uint32* ssrc); | 350 bool FindSsrc(int channel_num, uint32_t* ssrc); |
349 void OnError(uint32 ssrc, int error); | 351 void OnError(uint32_t ssrc, int error); |
350 | 352 |
351 bool sending() const { return send_ != SEND_NOTHING; } | 353 bool sending() const { return send_ != SEND_NOTHING; } |
352 int GetReceiveChannelNum(uint32 ssrc) const; | 354 int GetReceiveChannelNum(uint32_t ssrc) const; |
353 int GetSendChannelNum(uint32 ssrc) const; | 355 int GetSendChannelNum(uint32_t ssrc) const; |
354 | 356 |
355 private: | 357 private: |
356 bool SetSendCodecs(const std::vector<AudioCodec>& codecs); | 358 bool SetSendCodecs(const std::vector<AudioCodec>& codecs); |
357 bool SetSendRtpHeaderExtensions( | 359 bool SetSendRtpHeaderExtensions( |
358 const std::vector<RtpHeaderExtension>& extensions); | 360 const std::vector<RtpHeaderExtension>& extensions); |
359 bool SetOptions(const AudioOptions& options); | 361 bool SetOptions(const AudioOptions& options); |
360 bool SetMaxSendBandwidth(int bps); | 362 bool SetMaxSendBandwidth(int bps); |
361 bool SetRecvCodecs(const std::vector<AudioCodec>& codecs); | 363 bool SetRecvCodecs(const std::vector<AudioCodec>& codecs); |
362 bool SetRecvRtpHeaderExtensions( | 364 bool SetRecvRtpHeaderExtensions( |
363 const std::vector<RtpHeaderExtension>& extensions); | 365 const std::vector<RtpHeaderExtension>& extensions); |
364 bool SetLocalRenderer(uint32 ssrc, AudioRenderer* renderer); | 366 bool SetLocalRenderer(uint32_t ssrc, AudioRenderer* renderer); |
365 bool MuteStream(uint32 ssrc, bool mute); | 367 bool MuteStream(uint32_t ssrc, bool mute); |
366 | 368 |
367 WebRtcVoiceEngine* engine() { return engine_; } | 369 WebRtcVoiceEngine* engine() { return engine_; } |
368 int GetLastEngineError() { return engine()->GetLastEngineError(); } | 370 int GetLastEngineError() { return engine()->GetLastEngineError(); } |
369 int GetOutputLevel(int channel); | 371 int GetOutputLevel(int channel); |
370 bool GetRedSendCodec(const AudioCodec& red_codec, | 372 bool GetRedSendCodec(const AudioCodec& red_codec, |
371 const std::vector<AudioCodec>& all_codecs, | 373 const std::vector<AudioCodec>& all_codecs, |
372 webrtc::CodecInst* send_codec); | 374 webrtc::CodecInst* send_codec); |
373 bool EnableRtcp(int channel); | 375 bool EnableRtcp(int channel); |
374 bool ResetRecvCodecs(int channel); | 376 bool ResetRecvCodecs(int channel); |
375 bool SetPlayout(int channel, bool playout); | 377 bool SetPlayout(int channel, bool playout); |
376 static uint32 ParseSsrc(const void* data, size_t len, bool rtcp); | 378 static uint32_t ParseSsrc(const void* data, size_t len, bool rtcp); |
377 static Error WebRtcErrorToChannelError(int err_code); | 379 static Error WebRtcErrorToChannelError(int err_code); |
378 | 380 |
379 class WebRtcVoiceChannelRenderer; | 381 class WebRtcVoiceChannelRenderer; |
380 // Map of ssrc to WebRtcVoiceChannelRenderer object. A new object of | 382 // Map of ssrc to WebRtcVoiceChannelRenderer object. A new object of |
381 // WebRtcVoiceChannelRenderer will be created for every new stream and | 383 // WebRtcVoiceChannelRenderer will be created for every new stream and |
382 // will be destroyed when the stream goes away. | 384 // will be destroyed when the stream goes away. |
383 typedef std::map<uint32, WebRtcVoiceChannelRenderer*> ChannelMap; | 385 typedef std::map<uint32_t, WebRtcVoiceChannelRenderer*> ChannelMap; |
384 typedef int (webrtc::VoERTP_RTCP::* ExtensionSetterFunction)(int, bool, | 386 typedef int (webrtc::VoERTP_RTCP::* ExtensionSetterFunction)(int, bool, |
385 unsigned char); | 387 unsigned char); |
386 | 388 |
387 void SetNack(int channel, bool nack_enabled); | 389 void SetNack(int channel, bool nack_enabled); |
388 void SetNack(const ChannelMap& channels, bool nack_enabled); | 390 void SetNack(const ChannelMap& channels, bool nack_enabled); |
389 bool SetSendCodec(const webrtc::CodecInst& send_codec); | 391 bool SetSendCodec(const webrtc::CodecInst& send_codec); |
390 bool SetSendCodec(int channel, const webrtc::CodecInst& send_codec); | 392 bool SetSendCodec(int channel, const webrtc::CodecInst& send_codec); |
391 bool ChangePlayout(bool playout); | 393 bool ChangePlayout(bool playout); |
392 bool ChangeSend(SendFlags send); | 394 bool ChangeSend(SendFlags send); |
393 bool ChangeSend(int channel, SendFlags send); | 395 bool ChangeSend(int channel, SendFlags send); |
394 void ConfigureSendChannel(int channel); | 396 void ConfigureSendChannel(int channel); |
395 bool ConfigureRecvChannel(int channel); | 397 bool ConfigureRecvChannel(int channel); |
396 bool DeleteChannel(int channel); | 398 bool DeleteChannel(int channel); |
397 bool InConferenceMode() const { | 399 bool InConferenceMode() const { |
398 return options_.conference_mode.GetWithDefaultIfUnset(false); | 400 return options_.conference_mode.GetWithDefaultIfUnset(false); |
399 } | 401 } |
400 bool IsDefaultChannel(int channel_id) const { | 402 bool IsDefaultChannel(int channel_id) const { |
401 return channel_id == voe_channel(); | 403 return channel_id == voe_channel(); |
402 } | 404 } |
403 bool SetSendCodecs(int channel, const std::vector<AudioCodec>& codecs); | 405 bool SetSendCodecs(int channel, const std::vector<AudioCodec>& codecs); |
404 bool SetSendBitrateInternal(int bps); | 406 bool SetSendBitrateInternal(int bps); |
405 | 407 |
406 bool SetHeaderExtension(ExtensionSetterFunction setter, int channel_id, | 408 bool SetHeaderExtension(ExtensionSetterFunction setter, int channel_id, |
407 const RtpHeaderExtension* extension); | 409 const RtpHeaderExtension* extension); |
408 void RecreateAudioReceiveStreams(); | 410 void RecreateAudioReceiveStreams(); |
409 void AddAudioReceiveStream(uint32 ssrc); | 411 void AddAudioReceiveStream(uint32_t ssrc); |
410 void RemoveAudioReceiveStream(uint32 ssrc); | 412 void RemoveAudioReceiveStream(uint32_t ssrc); |
411 bool SetRecvCodecsInternal(const std::vector<AudioCodec>& new_codecs); | 413 bool SetRecvCodecsInternal(const std::vector<AudioCodec>& new_codecs); |
412 | 414 |
413 bool SetChannelRecvRtpHeaderExtensions( | 415 bool SetChannelRecvRtpHeaderExtensions( |
414 int channel_id, | 416 int channel_id, |
415 const std::vector<RtpHeaderExtension>& extensions); | 417 const std::vector<RtpHeaderExtension>& extensions); |
416 bool SetChannelSendRtpHeaderExtensions( | 418 bool SetChannelSendRtpHeaderExtensions( |
417 int channel_id, | 419 int channel_id, |
418 const std::vector<RtpHeaderExtension>& extensions); | 420 const std::vector<RtpHeaderExtension>& extensions); |
419 | 421 |
420 rtc::ThreadChecker thread_checker_; | 422 rtc::ThreadChecker thread_checker_; |
(...skipping 15 matching lines...) Expand all Loading... |
436 bool typing_noise_detected_; | 438 bool typing_noise_detected_; |
437 SendFlags desired_send_; | 439 SendFlags desired_send_; |
438 SendFlags send_; | 440 SendFlags send_; |
439 webrtc::Call* const call_; | 441 webrtc::Call* const call_; |
440 | 442 |
441 // send_channels_ contains the channels which are being used for sending. | 443 // send_channels_ contains the channels which are being used for sending. |
442 // When the default channel (voe_channel) is used for sending, it is | 444 // When the default channel (voe_channel) is used for sending, it is |
443 // contained in send_channels_, otherwise not. | 445 // contained in send_channels_, otherwise not. |
444 ChannelMap send_channels_; | 446 ChannelMap send_channels_; |
445 std::vector<RtpHeaderExtension> send_extensions_; | 447 std::vector<RtpHeaderExtension> send_extensions_; |
446 uint32 default_receive_ssrc_; | 448 uint32_t default_receive_ssrc_; |
447 // Note the default channel (voe_channel()) can reside in both | 449 // Note the default channel (voe_channel()) can reside in both |
448 // receive_channels_ and send_channels_ in non-conference mode and in that | 450 // receive_channels_ and send_channels_ in non-conference mode and in that |
449 // case it will only be there if a non-zero default_receive_ssrc_ is set. | 451 // case it will only be there if a non-zero default_receive_ssrc_ is set. |
450 ChannelMap receive_channels_; // for multiple sources | 452 ChannelMap receive_channels_; // for multiple sources |
451 std::map<uint32, webrtc::AudioReceiveStream*> receive_streams_; | 453 std::map<uint32_t, webrtc::AudioReceiveStream*> receive_streams_; |
452 std::map<uint32, StreamParams> receive_stream_params_; | 454 std::map<uint32_t, StreamParams> receive_stream_params_; |
453 // receive_channels_ can be read from WebRtc callback thread. Access from | 455 // receive_channels_ can be read from WebRtc callback thread. Access from |
454 // the WebRtc thread must be synchronized with edits on the worker thread. | 456 // the WebRtc thread must be synchronized with edits on the worker thread. |
455 // Reads on the worker thread are ok. | 457 // Reads on the worker thread are ok. |
456 std::vector<RtpHeaderExtension> receive_extensions_; | 458 std::vector<RtpHeaderExtension> receive_extensions_; |
457 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 459 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
458 | 460 |
459 // Do not lock this on the VoE media processor thread; potential for deadlock | 461 // Do not lock this on the VoE media processor thread; potential for deadlock |
460 // exists. | 462 // exists. |
461 mutable rtc::CriticalSection receive_channels_cs_; | 463 mutable rtc::CriticalSection receive_channels_cs_; |
462 }; | 464 }; |
463 | 465 |
464 } // namespace cricket | 466 } // namespace cricket |
465 | 467 |
466 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ | 468 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ |
OLD | NEW |