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

Side by Side Diff: talk/media/webrtc/fakewebrtcvoiceengine.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/base/mediachannel.h ('k') | talk/media/webrtc/webrtcvoiceengine.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 2010 Google Inc. 3 * Copyright 2010 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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 } 553 }
554 554
555 // webrtc::VoEDtmf 555 // webrtc::VoEDtmf
556 WEBRTC_FUNC(SendTelephoneEvent, (int channel, int event_code, 556 WEBRTC_FUNC(SendTelephoneEvent, (int channel, int event_code,
557 bool out_of_band = true, int length_ms = 160, int attenuation_db = 10)) { 557 bool out_of_band = true, int length_ms = 160, int attenuation_db = 10)) {
558 channels_[channel]->dtmf_info.dtmf_event_code = event_code; 558 channels_[channel]->dtmf_info.dtmf_event_code = event_code;
559 channels_[channel]->dtmf_info.dtmf_out_of_band = out_of_band; 559 channels_[channel]->dtmf_info.dtmf_out_of_band = out_of_band;
560 channels_[channel]->dtmf_info.dtmf_length_ms = length_ms; 560 channels_[channel]->dtmf_info.dtmf_length_ms = length_ms;
561 return 0; 561 return 0;
562 } 562 }
563
564 WEBRTC_FUNC(SetSendTelephoneEventPayloadType, 563 WEBRTC_FUNC(SetSendTelephoneEventPayloadType,
565 (int channel, unsigned char type)) { 564 (int channel, unsigned char type)) {
566 channels_[channel]->dtmf_type = type; 565 channels_[channel]->dtmf_type = type;
567 return 0; 566 return 0;
568 }; 567 };
569 WEBRTC_STUB(GetSendTelephoneEventPayloadType, 568 WEBRTC_STUB(GetSendTelephoneEventPayloadType,
570 (int channel, unsigned char& type)); 569 (int channel, unsigned char& type));
571
572 WEBRTC_STUB(SetDtmfFeedbackStatus, (bool enable, bool directFeedback)); 570 WEBRTC_STUB(SetDtmfFeedbackStatus, (bool enable, bool directFeedback));
573 WEBRTC_STUB(GetDtmfFeedbackStatus, (bool& enabled, bool& directFeedback)); 571 WEBRTC_STUB(GetDtmfFeedbackStatus, (bool& enabled, bool& directFeedback));
574 572 WEBRTC_STUB(PlayDtmfTone,
575 WEBRTC_FUNC(PlayDtmfTone, 573 (int event_code, int length_ms = 200, int attenuation_db = 10));
576 (int event_code, int length_ms = 200, int attenuation_db = 10)) {
577 dtmf_info_.dtmf_event_code = event_code;
578 dtmf_info_.dtmf_length_ms = length_ms;
579 return 0;
580 }
581 574
582 // webrtc::VoEHardware 575 // webrtc::VoEHardware
583 WEBRTC_FUNC(GetNumOfRecordingDevices, (int& num)) { 576 WEBRTC_FUNC(GetNumOfRecordingDevices, (int& num)) {
584 return GetNumDevices(num); 577 return GetNumDevices(num);
585 } 578 }
586 WEBRTC_FUNC(GetNumOfPlayoutDevices, (int& num)) { 579 WEBRTC_FUNC(GetNumOfPlayoutDevices, (int& num)) {
587 return GetNumDevices(num); 580 return GetNumDevices(num);
588 } 581 }
589 WEBRTC_FUNC(GetRecordingDeviceName, (int i, char* name, char* guid)) { 582 WEBRTC_FUNC(GetRecordingDeviceName, (int i, char* name, char* guid)) {
590 return GetDeviceName(i, name, guid); 583 return GetDeviceName(i, name, guid);
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 int send_fail_channel_; 910 int send_fail_channel_;
918 int recording_sample_rate_; 911 int recording_sample_rate_;
919 int playout_sample_rate_; 912 int playout_sample_rate_;
920 DtmfInfo dtmf_info_; 913 DtmfInfo dtmf_info_;
921 FakeAudioProcessing audio_processing_; 914 FakeAudioProcessing audio_processing_;
922 }; 915 };
923 916
924 } // namespace cricket 917 } // namespace cricket
925 918
926 #endif // TALK_SESSION_PHONE_FAKEWEBRTCVOICEENGINE_H_ 919 #endif // TALK_SESSION_PHONE_FAKEWEBRTCVOICEENGINE_H_
OLDNEW
« no previous file with comments | « talk/media/base/mediachannel.h ('k') | talk/media/webrtc/webrtcvoiceengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698