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

Side by Side Diff: talk/session/media/channel.h

Issue 1487393002: Refactor WVoE DTMF handling #1 (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years 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/webrtcvoiceengine_unittest.cc ('k') | talk/session/media/channel.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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 virtual VoiceMediaChannel* media_channel() const { 348 virtual VoiceMediaChannel* media_channel() const {
349 return static_cast<VoiceMediaChannel*>(BaseChannel::media_channel()); 349 return static_cast<VoiceMediaChannel*>(BaseChannel::media_channel());
350 } 350 }
351 351
352 void SetEarlyMedia(bool enable); 352 void SetEarlyMedia(bool enable);
353 // This signal is emitted when we have gone a period of time without 353 // This signal is emitted when we have gone a period of time without
354 // receiving early media. When received, a UI should start playing its 354 // receiving early media. When received, a UI should start playing its
355 // own ringing sound 355 // own ringing sound
356 sigslot::signal1<VoiceChannel*> SignalEarlyMediaTimeout; 356 sigslot::signal1<VoiceChannel*> SignalEarlyMediaTimeout;
357 357
358 // TODO(ronghuawu): Replace PressDTMF with InsertDtmf.
359 bool PressDTMF(int digit, bool playout);
360 // Returns if the telephone-event has been negotiated. 358 // Returns if the telephone-event has been negotiated.
361 bool CanInsertDtmf(); 359 bool CanInsertDtmf();
362 // Send and/or play a DTMF |event| according to the |flags|. 360 // Send and/or play a DTMF |event| according to the |flags|.
363 // The DTMF out-of-band signal will be used on sending. 361 // The DTMF out-of-band signal will be used on sending.
364 // The |ssrc| should be either 0 or a valid send stream ssrc. 362 // The |ssrc| should be either 0 or a valid send stream ssrc.
365 // The valid value for the |event| are 0 which corresponding to DTMF 363 // The valid value for the |event| are 0 which corresponding to DTMF
366 // event 0-9, *, #, A-D. 364 // event 0-9, *, #, A-D.
367 bool InsertDtmf(uint32_t ssrc, int event_code, int duration, int flags); 365 bool InsertDtmf(uint32_t ssrc, int event_code, int duration);
368 bool SetOutputVolume(uint32_t ssrc, double volume); 366 bool SetOutputVolume(uint32_t ssrc, double volume);
369 // Get statistics about the current media session. 367 // Get statistics about the current media session.
370 bool GetStats(VoiceMediaInfo* stats); 368 bool GetStats(VoiceMediaInfo* stats);
371 369
372 // Monitoring functions 370 // Monitoring functions
373 sigslot::signal2<VoiceChannel*, const std::vector<ConnectionInfo>&> 371 sigslot::signal2<VoiceChannel*, const std::vector<ConnectionInfo>&>
374 SignalConnectionMonitor; 372 SignalConnectionMonitor;
375 373
376 void StartMediaMonitor(int cms); 374 void StartMediaMonitor(int cms);
377 void StopMediaMonitor(); 375 void StopMediaMonitor();
(...skipping 16 matching lines...) Expand all
394 int flags); 392 int flags);
395 virtual void ChangeState(); 393 virtual void ChangeState();
396 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc); 394 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc);
397 virtual bool SetLocalContent_w(const MediaContentDescription* content, 395 virtual bool SetLocalContent_w(const MediaContentDescription* content,
398 ContentAction action, 396 ContentAction action,
399 std::string* error_desc); 397 std::string* error_desc);
400 virtual bool SetRemoteContent_w(const MediaContentDescription* content, 398 virtual bool SetRemoteContent_w(const MediaContentDescription* content,
401 ContentAction action, 399 ContentAction action,
402 std::string* error_desc); 400 std::string* error_desc);
403 void HandleEarlyMediaTimeout(); 401 void HandleEarlyMediaTimeout();
404 bool InsertDtmf_w(uint32_t ssrc, int event, int duration, int flags); 402 bool InsertDtmf_w(uint32_t ssrc, int event, int duration);
405 bool SetOutputVolume_w(uint32_t ssrc, double volume); 403 bool SetOutputVolume_w(uint32_t ssrc, double volume);
406 bool GetStats_w(VoiceMediaInfo* stats); 404 bool GetStats_w(VoiceMediaInfo* stats);
407 405
408 virtual void OnMessage(rtc::Message* pmsg); 406 virtual void OnMessage(rtc::Message* pmsg);
409 virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const; 407 virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const;
410 virtual void OnConnectionMonitorUpdate( 408 virtual void OnConnectionMonitorUpdate(
411 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos); 409 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos);
412 virtual void OnMediaMonitorUpdate( 410 virtual void OnMediaMonitorUpdate(
413 VoiceMediaChannel* media_channel, const VoiceMediaInfo& info); 411 VoiceMediaChannel* media_channel, const VoiceMediaInfo& info);
414 void OnAudioMonitorUpdate(AudioMonitor* monitor, const AudioInfo& info); 412 void OnAudioMonitorUpdate(AudioMonitor* monitor, const AudioInfo& info);
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 // SetSendParameters. 633 // SetSendParameters.
636 DataSendParameters last_send_params_; 634 DataSendParameters last_send_params_;
637 // Last DataRecvParameters sent down to the media_channel() via 635 // Last DataRecvParameters sent down to the media_channel() via
638 // SetRecvParameters. 636 // SetRecvParameters.
639 DataRecvParameters last_recv_params_; 637 DataRecvParameters last_recv_params_;
640 }; 638 };
641 639
642 } // namespace cricket 640 } // namespace cricket
643 641
644 #endif // TALK_SESSION_MEDIA_CHANNEL_H_ 642 #endif // TALK_SESSION_MEDIA_CHANNEL_H_
OLDNEW
« no previous file with comments | « talk/media/webrtc/webrtcvoiceengine_unittest.cc ('k') | talk/session/media/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698