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: webrtc/voice_engine/channel.h

Issue 1722253002: - Clean up unused voice engine DTMF code. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@voe_dtmf_1
Patch Set: rebase Created 4 years, 9 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 | « webrtc/voice_engine/BUILD.gn ('k') | webrtc/voice_engine/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 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_H_ 11 #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_H_
12 #define WEBRTC_VOICE_ENGINE_CHANNEL_H_ 12 #define WEBRTC_VOICE_ENGINE_CHANNEL_H_
13 13
14 #include <memory> 14 #include <memory>
15 15
16 #include "webrtc/audio_sink.h" 16 #include "webrtc/audio_sink.h"
17 #include "webrtc/base/criticalsection.h" 17 #include "webrtc/base/criticalsection.h"
18 #include "webrtc/common_audio/resampler/include/push_resampler.h" 18 #include "webrtc/common_audio/resampler/include/push_resampler.h"
19 #include "webrtc/common_types.h" 19 #include "webrtc/common_types.h"
20 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" 20 #include "webrtc/modules/audio_coding/include/audio_coding_module.h"
21 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_d efines.h" 21 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_d efines.h"
22 #include "webrtc/modules/audio_processing/rms_level.h" 22 #include "webrtc/modules/audio_processing/rms_level.h"
23 #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h" 23 #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h"
24 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" 24 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
25 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" 25 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
26 #include "webrtc/modules/utility/include/file_player.h" 26 #include "webrtc/modules/utility/include/file_player.h"
27 #include "webrtc/modules/utility/include/file_recorder.h" 27 #include "webrtc/modules/utility/include/file_recorder.h"
28 #include "webrtc/voice_engine/dtmf_inband.h"
29 #include "webrtc/voice_engine/dtmf_inband_queue.h"
30 #include "webrtc/voice_engine/include/voe_audio_processing.h" 28 #include "webrtc/voice_engine/include/voe_audio_processing.h"
31 #include "webrtc/voice_engine/include/voe_network.h" 29 #include "webrtc/voice_engine/include/voe_network.h"
32 #include "webrtc/voice_engine/level_indicator.h" 30 #include "webrtc/voice_engine/level_indicator.h"
33 #include "webrtc/voice_engine/network_predictor.h" 31 #include "webrtc/voice_engine/network_predictor.h"
34 #include "webrtc/voice_engine/shared_data.h" 32 #include "webrtc/voice_engine/shared_data.h"
35 #include "webrtc/voice_engine/voice_engine_defines.h" 33 #include "webrtc/voice_engine/voice_engine_defines.h"
36 34
37 namespace rtc { 35 namespace rtc {
38 36
39 class TimestampWrapAroundHandler; 37 class TimestampWrapAroundHandler;
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 uint32_t GetDelayEstimate() const; 287 uint32_t GetDelayEstimate() const;
290 int LeastRequiredDelayMs() const; 288 int LeastRequiredDelayMs() const;
291 int SetMinimumPlayoutDelay(int delayMs); 289 int SetMinimumPlayoutDelay(int delayMs);
292 int GetPlayoutTimestamp(unsigned int& timestamp); 290 int GetPlayoutTimestamp(unsigned int& timestamp);
293 int SetInitTimestamp(unsigned int timestamp); 291 int SetInitTimestamp(unsigned int timestamp);
294 int SetInitSequenceNumber(short sequenceNumber); 292 int SetInitSequenceNumber(short sequenceNumber);
295 293
296 // VoEVideoSyncExtended 294 // VoEVideoSyncExtended
297 int GetRtpRtcp(RtpRtcp** rtpRtcpModule, RtpReceiver** rtp_receiver) const; 295 int GetRtpRtcp(RtpRtcp** rtpRtcpModule, RtpReceiver** rtp_receiver) const;
298 296
299 // VoEDtmf 297 // DTMF
300 int SendTelephoneEventOutband(unsigned char eventCode, 298 int SendTelephoneEventOutband(int event, int duration_ms);
301 int lengthMs, 299 int SetSendTelephoneEventPayloadType(int payload_type);
302 int attenuationDb,
303 bool playDtmfEvent);
304 int SendTelephoneEventInband(unsigned char eventCode,
305 int lengthMs,
306 int attenuationDb,
307 bool playDtmfEvent);
308 int SetSendTelephoneEventPayloadType(unsigned char type);
309 int GetSendTelephoneEventPayloadType(unsigned char& type);
310 300
311 // VoEAudioProcessingImpl 301 // VoEAudioProcessingImpl
312 int UpdateRxVadDetection(AudioFrame& audioFrame); 302 int UpdateRxVadDetection(AudioFrame& audioFrame);
313 int RegisterRxVadObserver(VoERxVadCallback& observer); 303 int RegisterRxVadObserver(VoERxVadCallback& observer);
314 int DeRegisterRxVadObserver(); 304 int DeRegisterRxVadObserver();
315 int VoiceActivityIndicator(int& activity); 305 int VoiceActivityIndicator(int& activity);
316 #ifdef WEBRTC_VOICE_ENGINE_AGC 306 #ifdef WEBRTC_VOICE_ENGINE_AGC
317 int SetRxAgcStatus(bool enable, AgcModes mode); 307 int SetRxAgcStatus(bool enable, AgcModes mode);
318 int GetRxAgcStatus(bool& enabled, AgcModes& mode); 308 int GetRxAgcStatus(bool& enabled, AgcModes& mode);
319 int SetRxAgcConfig(AgcConfig config); 309 int SetRxAgcConfig(AgcConfig config);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 bool ReceivePacket(const uint8_t* packet, 447 bool ReceivePacket(const uint8_t* packet,
458 size_t packet_length, 448 size_t packet_length,
459 const RTPHeader& header, 449 const RTPHeader& header,
460 bool in_order); 450 bool in_order);
461 bool HandleRtxPacket(const uint8_t* packet, 451 bool HandleRtxPacket(const uint8_t* packet,
462 size_t packet_length, 452 size_t packet_length,
463 const RTPHeader& header); 453 const RTPHeader& header);
464 bool IsPacketInOrder(const RTPHeader& header) const; 454 bool IsPacketInOrder(const RTPHeader& header) const;
465 bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const; 455 bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const;
466 int ResendPackets(const uint16_t* sequence_numbers, int length); 456 int ResendPackets(const uint16_t* sequence_numbers, int length);
467 int InsertInbandDtmfTone();
468 int32_t MixOrReplaceAudioWithFile(int mixingFrequency); 457 int32_t MixOrReplaceAudioWithFile(int mixingFrequency);
469 int32_t MixAudioWithFile(AudioFrame& audioFrame, int mixingFrequency); 458 int32_t MixAudioWithFile(AudioFrame& audioFrame, int mixingFrequency);
470 void UpdatePlayoutTimestamp(bool rtcp); 459 void UpdatePlayoutTimestamp(bool rtcp);
471 void UpdatePacketDelay(uint32_t timestamp, uint16_t sequenceNumber); 460 void UpdatePacketDelay(uint32_t timestamp, uint16_t sequenceNumber);
472 void RegisterReceiveCodecsToRTPModule(); 461 void RegisterReceiveCodecsToRTPModule();
473 462
474 int SetRedPayloadType(int red_payload_type); 463 int SetRedPayloadType(int red_payload_type);
475 int SetSendRtpHeaderExtension(bool enable, 464 int SetSendRtpHeaderExtension(bool enable,
476 RTPExtensionType type, 465 RTPExtensionType type,
477 unsigned char id); 466 unsigned char id);
(...skipping 25 matching lines...) Expand all
503 AudioFrame _audioFrame; 492 AudioFrame _audioFrame;
504 // Downsamples to the codec rate if necessary. 493 // Downsamples to the codec rate if necessary.
505 PushResampler<int16_t> input_resampler_; 494 PushResampler<int16_t> input_resampler_;
506 FilePlayer* _inputFilePlayerPtr; 495 FilePlayer* _inputFilePlayerPtr;
507 FilePlayer* _outputFilePlayerPtr; 496 FilePlayer* _outputFilePlayerPtr;
508 FileRecorder* _outputFileRecorderPtr; 497 FileRecorder* _outputFileRecorderPtr;
509 int _inputFilePlayerId; 498 int _inputFilePlayerId;
510 int _outputFilePlayerId; 499 int _outputFilePlayerId;
511 int _outputFileRecorderId; 500 int _outputFileRecorderId;
512 bool _outputFileRecording; 501 bool _outputFileRecording;
513 DtmfInbandQueue _inbandDtmfQueue;
514 DtmfInband _inbandDtmfGenerator;
515 bool _outputExternalMedia; 502 bool _outputExternalMedia;
516 VoEMediaProcess* _inputExternalMediaCallbackPtr; 503 VoEMediaProcess* _inputExternalMediaCallbackPtr;
517 VoEMediaProcess* _outputExternalMediaCallbackPtr; 504 VoEMediaProcess* _outputExternalMediaCallbackPtr;
518 uint32_t _timeStamp; 505 uint32_t _timeStamp;
519 uint8_t _sendTelephoneEventPayloadType;
520 506
521 RemoteNtpTimeEstimator ntp_estimator_ GUARDED_BY(ts_stats_lock_); 507 RemoteNtpTimeEstimator ntp_estimator_ GUARDED_BY(ts_stats_lock_);
522 508
523 // Timestamp of the audio pulled from NetEq. 509 // Timestamp of the audio pulled from NetEq.
524 uint32_t jitter_buffer_playout_timestamp_; 510 uint32_t jitter_buffer_playout_timestamp_;
525 uint32_t playout_timestamp_rtp_ GUARDED_BY(video_sync_lock_); 511 uint32_t playout_timestamp_rtp_ GUARDED_BY(video_sync_lock_);
526 uint32_t playout_timestamp_rtcp_; 512 uint32_t playout_timestamp_rtcp_;
527 uint32_t playout_delay_ms_ GUARDED_BY(video_sync_lock_); 513 uint32_t playout_delay_ms_ GUARDED_BY(video_sync_lock_);
528 uint32_t _numberOfDiscardedPackets; 514 uint32_t _numberOfDiscardedPackets;
529 uint16_t send_sequence_number_; 515 uint16_t send_sequence_number_;
(...skipping 23 matching lines...) Expand all
553 int32_t _oldVadDecision; 539 int32_t _oldVadDecision;
554 int32_t _sendFrameType; // Send data is voice, 1-voice, 0-otherwise 540 int32_t _sendFrameType; // Send data is voice, 1-voice, 0-otherwise
555 // VoEBase 541 // VoEBase
556 bool _externalMixing; 542 bool _externalMixing;
557 bool _mixFileWithMicrophone; 543 bool _mixFileWithMicrophone;
558 // VoEVolumeControl 544 // VoEVolumeControl
559 bool _mute; 545 bool _mute;
560 float _panLeft; 546 float _panLeft;
561 float _panRight; 547 float _panRight;
562 float _outputGain; 548 float _outputGain;
563 // VoEDtmf
564 bool _playOutbandDtmfEvent;
565 bool _playInbandDtmfEvent;
566 // VoeRTP_RTCP 549 // VoeRTP_RTCP
567 uint32_t _lastLocalTimeStamp; 550 uint32_t _lastLocalTimeStamp;
568 int8_t _lastPayloadType; 551 int8_t _lastPayloadType;
569 bool _includeAudioLevelIndication; 552 bool _includeAudioLevelIndication;
570 // VoENetwork 553 // VoENetwork
571 AudioFrame::SpeechType _outputSpeechType; 554 AudioFrame::SpeechType _outputSpeechType;
572 // VoEVideoSync 555 // VoEVideoSync
573 rtc::CriticalSection video_sync_lock_; 556 rtc::CriticalSection video_sync_lock_;
574 uint32_t _average_jitter_buffer_delay_us GUARDED_BY(video_sync_lock_); 557 uint32_t _average_jitter_buffer_delay_us GUARDED_BY(video_sync_lock_);
575 uint32_t _previousTimestamp; 558 uint32_t _previousTimestamp;
(...skipping 14 matching lines...) Expand all
590 PacketRouter* packet_router_ = nullptr; 573 PacketRouter* packet_router_ = nullptr;
591 std::unique_ptr<TransportFeedbackProxy> feedback_observer_proxy_; 574 std::unique_ptr<TransportFeedbackProxy> feedback_observer_proxy_;
592 std::unique_ptr<TransportSequenceNumberProxy> seq_num_allocator_proxy_; 575 std::unique_ptr<TransportSequenceNumberProxy> seq_num_allocator_proxy_;
593 std::unique_ptr<RtpPacketSenderProxy> rtp_packet_sender_proxy_; 576 std::unique_ptr<RtpPacketSenderProxy> rtp_packet_sender_proxy_;
594 }; 577 };
595 578
596 } // namespace voe 579 } // namespace voe
597 } // namespace webrtc 580 } // namespace webrtc
598 581
599 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ 582 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_
OLDNEW
« no previous file with comments | « webrtc/voice_engine/BUILD.gn ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698