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

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

Issue 1325023005: Remove Channel::SetRingbackTone() and Channel::PlayRingbackTone(), and the code beneath it (within … (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 3 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/base/mediachannel.h ('k') | talk/media/webrtc/webrtcvoiceengine.cc » ('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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "webrtc/call.h" 46 #include "webrtc/call.h"
47 #include "webrtc/common.h" 47 #include "webrtc/common.h"
48 #include "webrtc/config.h" 48 #include "webrtc/config.h"
49 49
50 namespace webrtc { 50 namespace webrtc {
51 class VideoEngine; 51 class VideoEngine;
52 } 52 }
53 53
54 namespace cricket { 54 namespace cricket {
55 55
56 // WebRtcSoundclipStream is an adapter object that allows a memory stream to be
57 // passed into WebRtc, and support looping.
58 class WebRtcSoundclipStream : public webrtc::InStream {
59 public:
60 WebRtcSoundclipStream(const char* buf, size_t len)
61 : mem_(buf, len), loop_(true) {
62 }
63 void set_loop(bool loop) { loop_ = loop; }
64
65 int Read(void* buf, size_t len) override;
66 int Rewind() override;
67
68 private:
69 rtc::MemoryStream mem_;
70 bool loop_;
71 };
72
73 // WebRtcMonitorStream is used to monitor a stream coming from WebRtc. 56 // WebRtcMonitorStream is used to monitor a stream coming from WebRtc.
74 // For now we just dump the data. 57 // For now we just dump the data.
75 class WebRtcMonitorStream : public webrtc::OutStream { 58 class WebRtcMonitorStream : public webrtc::OutStream {
76 bool Write(const void* buf, size_t len) override { return true; } 59 bool Write(const void* buf, size_t len) override { return true; }
77 }; 60 };
78 61
79 class AudioDeviceModule; 62 class AudioDeviceModule;
80 class AudioRenderer; 63 class AudioRenderer;
81 class VoETraceWrapper; 64 class VoETraceWrapper;
82 class VoEWrapper; 65 class VoEWrapper;
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 bool GetActiveStreams(AudioInfo::StreamList* actives) override; 292 bool GetActiveStreams(AudioInfo::StreamList* actives) override;
310 int GetOutputLevel() override; 293 int GetOutputLevel() override;
311 int GetTimeSinceLastTyping() override; 294 int GetTimeSinceLastTyping() override;
312 void SetTypingDetectionParameters(int time_window, 295 void SetTypingDetectionParameters(int time_window,
313 int cost_per_typing, 296 int cost_per_typing,
314 int reporting_threshold, 297 int reporting_threshold,
315 int penalty_decay, 298 int penalty_decay,
316 int type_event_delay) override; 299 int type_event_delay) override;
317 bool SetOutputScaling(uint32 ssrc, double left, double right) override; 300 bool SetOutputScaling(uint32 ssrc, double left, double right) override;
318 301
319 bool SetRingbackTone(const char* buf, int len) override;
320 bool PlayRingbackTone(uint32 ssrc, bool play, bool loop) override;
321 bool CanInsertDtmf() override; 302 bool CanInsertDtmf() override;
322 bool InsertDtmf(uint32 ssrc, int event, int duration, int flags) override; 303 bool InsertDtmf(uint32 ssrc, int event, int duration, int flags) override;
323 304
324 void OnPacketReceived(rtc::Buffer* packet, 305 void OnPacketReceived(rtc::Buffer* packet,
325 const rtc::PacketTime& packet_time) override; 306 const rtc::PacketTime& packet_time) override;
326 void OnRtcpReceived(rtc::Buffer* packet, 307 void OnRtcpReceived(rtc::Buffer* packet,
327 const rtc::PacketTime& packet_time) override; 308 const rtc::PacketTime& packet_time) override;
328 void OnReadyToSend(bool ready) override {} 309 void OnReadyToSend(bool ready) override {}
329 bool GetStats(VoiceMediaInfo* info) override; 310 bool GetStats(VoiceMediaInfo* info) override;
330 // Gets last reported error from WebRtc voice engine. This should be only 311 // Gets last reported error from WebRtc voice engine. This should be only
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 int channel_id, 395 int channel_id,
415 const std::vector<RtpHeaderExtension>& extensions); 396 const std::vector<RtpHeaderExtension>& extensions);
416 bool SetChannelSendRtpHeaderExtensions( 397 bool SetChannelSendRtpHeaderExtensions(
417 int channel_id, 398 int channel_id,
418 const std::vector<RtpHeaderExtension>& extensions); 399 const std::vector<RtpHeaderExtension>& extensions);
419 400
420 rtc::ThreadChecker thread_checker_; 401 rtc::ThreadChecker thread_checker_;
421 402
422 WebRtcVoiceEngine* const engine_; 403 WebRtcVoiceEngine* const engine_;
423 const int voe_channel_; 404 const int voe_channel_;
424 rtc::scoped_ptr<WebRtcSoundclipStream> ringback_tone_;
425 std::set<int> ringback_channels_; // channels playing ringback
426 std::vector<AudioCodec> recv_codecs_; 405 std::vector<AudioCodec> recv_codecs_;
427 std::vector<AudioCodec> send_codecs_; 406 std::vector<AudioCodec> send_codecs_;
428 rtc::scoped_ptr<webrtc::CodecInst> send_codec_; 407 rtc::scoped_ptr<webrtc::CodecInst> send_codec_;
429 bool send_bitrate_setting_; 408 bool send_bitrate_setting_;
430 int send_bitrate_bps_; 409 int send_bitrate_bps_;
431 AudioOptions options_; 410 AudioOptions options_;
432 bool dtmf_allowed_; 411 bool dtmf_allowed_;
433 bool desired_playout_; 412 bool desired_playout_;
434 bool nack_enabled_; 413 bool nack_enabled_;
435 bool playout_; 414 bool playout_;
(...skipping 21 matching lines...) Expand all
457 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; 436 std::vector<webrtc::RtpExtension> recv_rtp_extensions_;
458 437
459 // Do not lock this on the VoE media processor thread; potential for deadlock 438 // Do not lock this on the VoE media processor thread; potential for deadlock
460 // exists. 439 // exists.
461 mutable rtc::CriticalSection receive_channels_cs_; 440 mutable rtc::CriticalSection receive_channels_cs_;
462 }; 441 };
463 442
464 } // namespace cricket 443 } // namespace cricket
465 444
466 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ 445 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_
OLDNEW
« no previous file with comments | « talk/media/base/mediachannel.h ('k') | talk/media/webrtc/webrtcvoiceengine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698