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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 const rtc::PacketTime& packet_time) override; | 220 const rtc::PacketTime& packet_time) override; |
221 void OnReadyToSend(bool ready) override {} | 221 void OnReadyToSend(bool ready) override {} |
222 bool GetStats(VoiceMediaInfo* info) override; | 222 bool GetStats(VoiceMediaInfo* info) override; |
223 | 223 |
224 // implements Transport interface | 224 // implements Transport interface |
225 bool SendRtp(const uint8_t* data, | 225 bool SendRtp(const uint8_t* data, |
226 size_t len, | 226 size_t len, |
227 const webrtc::PacketOptions& options) override { | 227 const webrtc::PacketOptions& options) override { |
228 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, | 228 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, |
229 kMaxRtpPacketLen); | 229 kMaxRtpPacketLen); |
230 return VoiceMediaChannel::SendPacket(&packet); | 230 rtc::PacketOptions rtc_options; |
| 231 rtc_options.packet_id = options.packet_id; |
| 232 return VoiceMediaChannel::SendPacket(&packet, rtc_options); |
231 } | 233 } |
232 | 234 |
233 bool SendRtcp(const uint8_t* data, size_t len) override { | 235 bool SendRtcp(const uint8_t* data, size_t len) override { |
234 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, | 236 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, |
235 kMaxRtpPacketLen); | 237 kMaxRtpPacketLen); |
236 return VoiceMediaChannel::SendRtcp(&packet); | 238 return VoiceMediaChannel::SendRtcp(&packet, rtc::PacketOptions()); |
237 } | 239 } |
238 | 240 |
239 void OnError(int error); | 241 void OnError(int error); |
240 | 242 |
241 int GetReceiveChannelId(uint32_t ssrc) const; | 243 int GetReceiveChannelId(uint32_t ssrc) const; |
242 int GetSendChannelId(uint32_t ssrc) const; | 244 int GetSendChannelId(uint32_t ssrc) const; |
243 | 245 |
244 private: | 246 private: |
245 bool SetSendCodecs(const std::vector<AudioCodec>& codecs); | 247 bool SetSendCodecs(const std::vector<AudioCodec>& codecs); |
246 bool SetSendRtpHeaderExtensions( | 248 bool SetSendRtpHeaderExtensions( |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 346 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
345 | 347 |
346 // Do not lock this on the VoE media processor thread; potential for deadlock | 348 // Do not lock this on the VoE media processor thread; potential for deadlock |
347 // exists. | 349 // exists. |
348 mutable rtc::CriticalSection receive_channels_cs_; | 350 mutable rtc::CriticalSection receive_channels_cs_; |
349 }; | 351 }; |
350 | 352 |
351 } // namespace cricket | 353 } // namespace cricket |
352 | 354 |
353 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ | 355 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ |
OLD | NEW |