| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 const rtc::PacketTime& packet_time) override; | 219 const rtc::PacketTime& packet_time) override; |
| 220 void OnReadyToSend(bool ready) override {} | 220 void OnReadyToSend(bool ready) override {} |
| 221 bool GetStats(VoiceMediaInfo* info) override; | 221 bool GetStats(VoiceMediaInfo* info) override; |
| 222 | 222 |
| 223 // implements Transport interface | 223 // implements Transport interface |
| 224 bool SendRtp(const uint8_t* data, | 224 bool SendRtp(const uint8_t* data, |
| 225 size_t len, | 225 size_t len, |
| 226 const webrtc::PacketOptions& options) override { | 226 const webrtc::PacketOptions& options) override { |
| 227 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, | 227 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, |
| 228 kMaxRtpPacketLen); | 228 kMaxRtpPacketLen); |
| 229 return VoiceMediaChannel::SendPacket(&packet); | 229 rtc::PacketOptions rtc_options; |
| 230 rtc_options.packet_id = options.packet_id; |
| 231 return VoiceMediaChannel::SendPacket(&packet, rtc_options); |
| 230 } | 232 } |
| 231 | 233 |
| 232 bool SendRtcp(const uint8_t* data, size_t len) override { | 234 bool SendRtcp(const uint8_t* data, size_t len) override { |
| 233 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, | 235 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, |
| 234 kMaxRtpPacketLen); | 236 kMaxRtpPacketLen); |
| 235 return VoiceMediaChannel::SendRtcp(&packet); | 237 return VoiceMediaChannel::SendRtcp(&packet, rtc::PacketOptions()); |
| 236 } | 238 } |
| 237 | 239 |
| 238 void OnError(int error); | 240 void OnError(int error); |
| 239 | 241 |
| 240 int GetReceiveChannelId(uint32_t ssrc) const; | 242 int GetReceiveChannelId(uint32_t ssrc) const; |
| 241 int GetSendChannelId(uint32_t ssrc) const; | 243 int GetSendChannelId(uint32_t ssrc) const; |
| 242 | 244 |
| 243 private: | 245 private: |
| 244 bool SetSendCodecs(const std::vector<AudioCodec>& codecs); | 246 bool SetSendCodecs(const std::vector<AudioCodec>& codecs); |
| 245 bool SetSendRtpHeaderExtensions( | 247 bool SetSendRtpHeaderExtensions( |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 // receive_channels_ can be read from WebRtc callback thread. Access from | 340 // receive_channels_ can be read from WebRtc callback thread. Access from |
| 339 // the WebRtc thread must be synchronized with edits on the worker thread. | 341 // the WebRtc thread must be synchronized with edits on the worker thread. |
| 340 // Reads on the worker thread are ok. | 342 // Reads on the worker thread are ok. |
| 341 std::vector<RtpHeaderExtension> receive_extensions_; | 343 std::vector<RtpHeaderExtension> receive_extensions_; |
| 342 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 344 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
| 343 }; | 345 }; |
| 344 | 346 |
| 345 } // namespace cricket | 347 } // namespace cricket |
| 346 | 348 |
| 347 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ | 349 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ |
| OLD | NEW |