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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 const rtc::PacketTime& packet_time) override; | 221 const rtc::PacketTime& packet_time) override; |
222 void OnReadyToSend(bool ready) override {} | 222 void OnReadyToSend(bool ready) override {} |
223 bool GetStats(VoiceMediaInfo* info) override; | 223 bool GetStats(VoiceMediaInfo* info) override; |
224 | 224 |
225 // implements Transport interface | 225 // implements Transport interface |
226 bool SendRtp(const uint8_t* data, | 226 bool SendRtp(const uint8_t* data, |
227 size_t len, | 227 size_t len, |
228 const webrtc::PacketOptions& options) override { | 228 const webrtc::PacketOptions& options) override { |
229 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, | 229 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, |
230 kMaxRtpPacketLen); | 230 kMaxRtpPacketLen); |
231 return VoiceMediaChannel::SendPacket(&packet); | 231 rtc::PacketOptions rtc_options; |
| 232 rtc_options.packet_id = options.packet_id; |
| 233 return VoiceMediaChannel::SendPacket(&packet, rtc_options); |
232 } | 234 } |
233 | 235 |
234 bool SendRtcp(const uint8_t* data, size_t len) override { | 236 bool SendRtcp(const uint8_t* data, size_t len) override { |
235 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, | 237 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, |
236 kMaxRtpPacketLen); | 238 kMaxRtpPacketLen); |
237 return VoiceMediaChannel::SendRtcp(&packet); | 239 return VoiceMediaChannel::SendRtcp(&packet, rtc::PacketOptions()); |
238 } | 240 } |
239 | 241 |
240 bool FindSsrc(int channel_num, uint32* ssrc); | 242 bool FindSsrc(int channel_num, uint32* ssrc); |
241 void OnError(uint32 ssrc, int error); | 243 void OnError(uint32 ssrc, int error); |
242 | 244 |
243 int GetReceiveChannelNum(uint32 ssrc) const; | 245 int GetReceiveChannelNum(uint32 ssrc) const; |
244 int GetSendChannelNum(uint32 ssrc) const; | 246 int GetSendChannelNum(uint32 ssrc) const; |
245 | 247 |
246 private: | 248 private: |
247 bool SetSendCodecs(const std::vector<AudioCodec>& codecs); | 249 bool SetSendCodecs(const std::vector<AudioCodec>& codecs); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 348 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
347 | 349 |
348 // 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 |
349 // exists. | 351 // exists. |
350 mutable rtc::CriticalSection receive_channels_cs_; | 352 mutable rtc::CriticalSection receive_channels_cs_; |
351 }; | 353 }; |
352 | 354 |
353 } // namespace cricket | 355 } // namespace cricket |
354 | 356 |
355 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ | 357 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ |
OLD | NEW |