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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 191 |
192 void OnPacketReceived(rtc::Buffer* packet, | 192 void OnPacketReceived(rtc::Buffer* packet, |
193 const rtc::PacketTime& packet_time) override; | 193 const rtc::PacketTime& packet_time) override; |
194 void OnRtcpReceived(rtc::Buffer* packet, | 194 void OnRtcpReceived(rtc::Buffer* packet, |
195 const rtc::PacketTime& packet_time) override; | 195 const rtc::PacketTime& packet_time) override; |
196 void OnReadyToSend(bool ready) override {} | 196 void OnReadyToSend(bool ready) override {} |
197 bool GetStats(VoiceMediaInfo* info) override; | 197 bool GetStats(VoiceMediaInfo* info) override; |
198 | 198 |
199 void SetRawAudioSink( | 199 void SetRawAudioSink( |
200 uint32_t ssrc, | 200 uint32_t ssrc, |
201 const rtc::scoped_refptr<webrtc::AudioSinkInterface>& sink) override; | 201 rtc::scoped_ptr<webrtc::AudioSinkInterface> sink) override; |
202 | 202 |
203 // implements Transport interface | 203 // implements Transport interface |
204 bool SendRtp(const uint8_t* data, | 204 bool SendRtp(const uint8_t* data, |
205 size_t len, | 205 size_t len, |
206 const webrtc::PacketOptions& options) override { | 206 const webrtc::PacketOptions& options) override { |
207 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, | 207 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, |
208 kMaxRtpPacketLen); | 208 kMaxRtpPacketLen); |
209 rtc::PacketOptions rtc_options; | 209 rtc::PacketOptions rtc_options; |
210 rtc_options.packet_id = options.packet_id; | 210 rtc_options.packet_id = options.packet_id; |
211 return VoiceMediaChannel::SendPacket(&packet, rtc_options); | 211 return VoiceMediaChannel::SendPacket(&packet, rtc_options); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 bool nack_enabled_ = false; | 262 bool nack_enabled_ = false; |
263 bool playout_ = false; | 263 bool playout_ = false; |
264 SendFlags desired_send_ = SEND_NOTHING; | 264 SendFlags desired_send_ = SEND_NOTHING; |
265 SendFlags send_ = SEND_NOTHING; | 265 SendFlags send_ = SEND_NOTHING; |
266 webrtc::Call* const call_ = nullptr; | 266 webrtc::Call* const call_ = nullptr; |
267 | 267 |
268 // SSRC of unsignalled receive stream, or -1 if there isn't one. | 268 // SSRC of unsignalled receive stream, or -1 if there isn't one. |
269 int64_t default_recv_ssrc_ = -1; | 269 int64_t default_recv_ssrc_ = -1; |
270 // Volume for unsignalled stream, which may be set before the stream exists. | 270 // Volume for unsignalled stream, which may be set before the stream exists. |
271 double default_recv_volume_ = 1.0; | 271 double default_recv_volume_ = 1.0; |
272 // Sink for unsignalled stream, which may be set before the stream exists. | |
273 rtc::scoped_refptr<webrtc::AudioSinkInterface> default_sink_; | |
274 // Default SSRC to use for RTCP receiver reports in case of no signaled | 272 // Default SSRC to use for RTCP receiver reports in case of no signaled |
275 // send streams. See: https://code.google.com/p/webrtc/issues/detail?id=4740 | 273 // send streams. See: https://code.google.com/p/webrtc/issues/detail?id=4740 |
276 // and https://code.google.com/p/chromium/issues/detail?id=547661 | 274 // and https://code.google.com/p/chromium/issues/detail?id=547661 |
277 uint32_t receiver_reports_ssrc_ = 0xFA17FA17u; | 275 uint32_t receiver_reports_ssrc_ = 0xFA17FA17u; |
278 | 276 |
279 class WebRtcAudioSendStream; | 277 class WebRtcAudioSendStream; |
280 std::map<uint32_t, WebRtcAudioSendStream*> send_streams_; | 278 std::map<uint32_t, WebRtcAudioSendStream*> send_streams_; |
281 std::vector<webrtc::RtpExtension> send_rtp_extensions_; | 279 std::vector<webrtc::RtpExtension> send_rtp_extensions_; |
282 | 280 |
283 class WebRtcAudioReceiveStream; | 281 class WebRtcAudioReceiveStream; |
284 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; | 282 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; |
285 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 283 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
286 | 284 |
287 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); | 285 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); |
288 }; | 286 }; |
289 } // namespace cricket | 287 } // namespace cricket |
290 | 288 |
291 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ | 289 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ |
OLD | NEW |