| 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 return options_.conference_mode.GetWithDefaultIfUnset(false); | 395 return options_.conference_mode.GetWithDefaultIfUnset(false); |
| 396 } | 396 } |
| 397 bool IsDefaultChannel(int channel_id) const { | 397 bool IsDefaultChannel(int channel_id) const { |
| 398 return channel_id == voe_channel(); | 398 return channel_id == voe_channel(); |
| 399 } | 399 } |
| 400 bool SetSendCodecs(int channel, const std::vector<AudioCodec>& codecs); | 400 bool SetSendCodecs(int channel, const std::vector<AudioCodec>& codecs); |
| 401 bool SetSendBitrateInternal(int bps); | 401 bool SetSendBitrateInternal(int bps); |
| 402 | 402 |
| 403 bool SetHeaderExtension(ExtensionSetterFunction setter, int channel_id, | 403 bool SetHeaderExtension(ExtensionSetterFunction setter, int channel_id, |
| 404 const RtpHeaderExtension* extension); | 404 const RtpHeaderExtension* extension); |
| 405 void TryAddAudioRecvStream(uint32 ssrc); | 405 void TryAddAudioRecvStream(uint32 ssrc, WebRtcVoiceChannelRenderer* channel); |
| 406 void TryRemoveAudioRecvStream(uint32 ssrc); | 406 void TryRemoveAudioRecvStream(uint32 ssrc); |
| 407 | 407 |
| 408 bool SetChannelRecvRtpHeaderExtensions( | 408 bool SetChannelRecvRtpHeaderExtensions( |
| 409 int channel_id, | 409 int channel_id, |
| 410 const std::vector<RtpHeaderExtension>& extensions); | 410 const std::vector<RtpHeaderExtension>& extensions); |
| 411 bool SetChannelSendRtpHeaderExtensions( | 411 bool SetChannelSendRtpHeaderExtensions( |
| 412 int channel_id, | 412 int channel_id, |
| 413 const std::vector<RtpHeaderExtension>& extensions); | 413 const std::vector<RtpHeaderExtension>& extensions); |
| 414 | 414 |
| 415 rtc::ThreadChecker thread_checker_; | 415 rtc::ThreadChecker thread_checker_; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 440 std::vector<RtpHeaderExtension> send_extensions_; | 440 std::vector<RtpHeaderExtension> send_extensions_; |
| 441 uint32 default_receive_ssrc_; | 441 uint32 default_receive_ssrc_; |
| 442 // Note the default channel (voe_channel()) can reside in both | 442 // Note the default channel (voe_channel()) can reside in both |
| 443 // receive_channels_ and send_channels_ in non-conference mode and in that | 443 // receive_channels_ and send_channels_ in non-conference mode and in that |
| 444 // case it will only be there if a non-zero default_receive_ssrc_ is set. | 444 // case it will only be there if a non-zero default_receive_ssrc_ is set. |
| 445 ChannelMap receive_channels_; // for multiple sources | 445 ChannelMap receive_channels_; // for multiple sources |
| 446 std::map<uint32, webrtc::AudioReceiveStream*> receive_streams_; | 446 std::map<uint32, webrtc::AudioReceiveStream*> receive_streams_; |
| 447 // receive_channels_ can be read from WebRtc callback thread. Access from | 447 // receive_channels_ can be read from WebRtc callback thread. Access from |
| 448 // the WebRtc thread must be synchronized with edits on the worker thread. | 448 // the WebRtc thread must be synchronized with edits on the worker thread. |
| 449 // Reads on the worker thread are ok. | 449 // Reads on the worker thread are ok. |
| 450 // | 450 std::map<int, std::string> sync_labels_; |
| 451 std::vector<RtpHeaderExtension> receive_extensions_; | 451 std::vector<RtpHeaderExtension> receive_extensions_; |
| 452 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 452 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
| 453 | 453 |
| 454 // Do not lock this on the VoE media processor thread; potential for deadlock | 454 // Do not lock this on the VoE media processor thread; potential for deadlock |
| 455 // exists. | 455 // exists. |
| 456 mutable rtc::CriticalSection receive_channels_cs_; | 456 mutable rtc::CriticalSection receive_channels_cs_; |
| 457 }; | 457 }; |
| 458 | 458 |
| 459 } // namespace cricket | 459 } // namespace cricket |
| 460 | 460 |
| 461 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ | 461 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ |
| OLD | NEW |