Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: talk/media/webrtc/webrtcvoiceengine.h

Issue 1369263002: Unify Transport and newapi::Transport interfaces. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: self-review Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « talk/media/webrtc/webrtcvideoengine2.h ('k') | webrtc/audio_send_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 void OnRtcpReceived(rtc::Buffer* packet, 243 void OnRtcpReceived(rtc::Buffer* packet,
244 const rtc::PacketTime& packet_time) override; 244 const rtc::PacketTime& packet_time) override;
245 void OnReadyToSend(bool ready) override {} 245 void OnReadyToSend(bool ready) override {}
246 bool GetStats(VoiceMediaInfo* info) override; 246 bool GetStats(VoiceMediaInfo* info) override;
247 // Gets last reported error from WebRtc voice engine. This should be only 247 // Gets last reported error from WebRtc voice engine. This should be only
248 // called in response a failure. 248 // called in response a failure.
249 void GetLastMediaError(uint32* ssrc, 249 void GetLastMediaError(uint32* ssrc,
250 VoiceMediaChannel::Error* error) override; 250 VoiceMediaChannel::Error* error) override;
251 251
252 // implements Transport interface 252 // implements Transport interface
253 int SendPacket(const void* data, size_t len) override { 253 bool SendRtp(const uint8_t* data, size_t len) override {
254 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, 254 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len,
255 kMaxRtpPacketLen); 255 kMaxRtpPacketLen);
256 return VoiceMediaChannel::SendPacket(&packet) ? static_cast<int>(len) : -1; 256 return VoiceMediaChannel::SendPacket(&packet);
257 } 257 }
258 258
259 int SendRTCPPacket(const void* data, size_t len) override { 259 bool SendRtcp(const uint8_t* data, size_t len) override {
260 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, 260 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len,
261 kMaxRtpPacketLen); 261 kMaxRtpPacketLen);
262 return VoiceMediaChannel::SendRtcp(&packet) ? static_cast<int>(len) : -1; 262 return VoiceMediaChannel::SendRtcp(&packet);
263 } 263 }
264 264
265 bool FindSsrc(int channel_num, uint32* ssrc); 265 bool FindSsrc(int channel_num, uint32* ssrc);
266 void OnError(uint32 ssrc, int error); 266 void OnError(uint32 ssrc, int error);
267 267
268 bool sending() const { return send_ != SEND_NOTHING; } 268 bool sending() const { return send_ != SEND_NOTHING; }
269 int GetReceiveChannelNum(uint32 ssrc) const; 269 int GetReceiveChannelNum(uint32 ssrc) const;
270 int GetSendChannelNum(uint32 ssrc) const; 270 int GetSendChannelNum(uint32 ssrc) const;
271 271
272 private: 272 private:
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; 372 std::vector<webrtc::RtpExtension> recv_rtp_extensions_;
373 373
374 // Do not lock this on the VoE media processor thread; potential for deadlock 374 // Do not lock this on the VoE media processor thread; potential for deadlock
375 // exists. 375 // exists.
376 mutable rtc::CriticalSection receive_channels_cs_; 376 mutable rtc::CriticalSection receive_channels_cs_;
377 }; 377 };
378 378
379 } // namespace cricket 379 } // namespace cricket
380 380
381 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ 381 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_
OLDNEW
« no previous file with comments | « talk/media/webrtc/webrtcvideoengine2.h ('k') | webrtc/audio_send_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698