| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 const AudioOptions& options() const { return options_; } | 188 const AudioOptions& options() const { return options_; } |
| 189 | 189 |
| 190 bool SetSendParameters(const AudioSendParameters& params) override; | 190 bool SetSendParameters(const AudioSendParameters& params) override; |
| 191 bool SetRecvParameters(const AudioRecvParameters& params) override; | 191 bool SetRecvParameters(const AudioRecvParameters& params) override; |
| 192 bool SetPlayout(bool playout) override; | 192 bool SetPlayout(bool playout) override; |
| 193 bool PausePlayout(); | 193 bool PausePlayout(); |
| 194 bool ResumePlayout(); | 194 bool ResumePlayout(); |
| 195 bool SetSend(SendFlags send) override; | 195 bool SetSend(SendFlags send) override; |
| 196 bool PauseSend(); | 196 bool PauseSend(); |
| 197 bool ResumeSend(); | 197 bool ResumeSend(); |
| 198 bool SetAudioSend(uint32 ssrc, bool mute, const AudioOptions* options, | 198 bool SetAudioSend(uint32 ssrc, bool enable, const AudioOptions* options, |
| 199 AudioRenderer* renderer) override; | 199 AudioRenderer* renderer) override; |
| 200 bool AddSendStream(const StreamParams& sp) override; | 200 bool AddSendStream(const StreamParams& sp) override; |
| 201 bool RemoveSendStream(uint32 ssrc) override; | 201 bool RemoveSendStream(uint32 ssrc) override; |
| 202 bool AddRecvStream(const StreamParams& sp) override; | 202 bool AddRecvStream(const StreamParams& sp) override; |
| 203 bool RemoveRecvStream(uint32 ssrc) override; | 203 bool RemoveRecvStream(uint32 ssrc) override; |
| 204 bool SetRemoteRenderer(uint32 ssrc, AudioRenderer* renderer) override; | 204 bool SetRemoteRenderer(uint32 ssrc, AudioRenderer* renderer) override; |
| 205 bool GetActiveStreams(AudioInfo::StreamList* actives) override; | 205 bool GetActiveStreams(AudioInfo::StreamList* actives) override; |
| 206 int GetOutputLevel() override; | 206 int GetOutputLevel() override; |
| 207 int GetTimeSinceLastTyping() override; | 207 int GetTimeSinceLastTyping() override; |
| 208 void SetTypingDetectionParameters(int time_window, | 208 void SetTypingDetectionParameters(int time_window, |
| (...skipping 26 matching lines...) Expand all Loading... |
| 235 | 235 |
| 236 bool SendRtcp(const uint8_t* data, size_t len) override { | 236 bool SendRtcp(const uint8_t* data, size_t len) override { |
| 237 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, | 237 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, |
| 238 kMaxRtpPacketLen); | 238 kMaxRtpPacketLen); |
| 239 return VoiceMediaChannel::SendRtcp(&packet); | 239 return VoiceMediaChannel::SendRtcp(&packet); |
| 240 } | 240 } |
| 241 | 241 |
| 242 bool FindSsrc(int channel_num, uint32* ssrc); | 242 bool FindSsrc(int channel_num, uint32* ssrc); |
| 243 void OnError(uint32 ssrc, int error); | 243 void OnError(uint32 ssrc, int error); |
| 244 | 244 |
| 245 bool sending() const { return send_ != SEND_NOTHING; } | |
| 246 int GetReceiveChannelNum(uint32 ssrc) const; | 245 int GetReceiveChannelNum(uint32 ssrc) const; |
| 247 int GetSendChannelNum(uint32 ssrc) const; | 246 int GetSendChannelNum(uint32 ssrc) const; |
| 248 | 247 |
| 249 private: | 248 private: |
| 250 bool SetSendCodecs(const std::vector<AudioCodec>& codecs); | 249 bool SetSendCodecs(const std::vector<AudioCodec>& codecs); |
| 251 bool SetSendRtpHeaderExtensions( | 250 bool SetSendRtpHeaderExtensions( |
| 252 const std::vector<RtpHeaderExtension>& extensions); | 251 const std::vector<RtpHeaderExtension>& extensions); |
| 253 bool SetOptions(const AudioOptions& options); | 252 bool SetOptions(const AudioOptions& options); |
| 254 bool SetMaxSendBandwidth(int bps); | 253 bool SetMaxSendBandwidth(int bps); |
| 255 bool SetRecvCodecs(const std::vector<AudioCodec>& codecs); | 254 bool SetRecvCodecs(const std::vector<AudioCodec>& codecs); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 348 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
| 350 | 349 |
| 351 // Do not lock this on the VoE media processor thread; potential for deadlock | 350 // Do not lock this on the VoE media processor thread; potential for deadlock |
| 352 // exists. | 351 // exists. |
| 353 mutable rtc::CriticalSection receive_channels_cs_; | 352 mutable rtc::CriticalSection receive_channels_cs_; |
| 354 }; | 353 }; |
| 355 | 354 |
| 356 } // namespace cricket | 355 } // namespace cricket |
| 357 | 356 |
| 358 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ | 357 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ |
| OLD | NEW |