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

Side by Side Diff: webrtc/voice_engine/channel.h

Issue 1702983002: Replace scoped_ptr with unique_ptr in webrtc/voice_engine/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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/test/mock_voice_engine.h ('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>
15
14 #include "webrtc/audio/audio_sink.h" 16 #include "webrtc/audio/audio_sink.h"
15 #include "webrtc/base/criticalsection.h" 17 #include "webrtc/base/criticalsection.h"
16 #include "webrtc/base/scoped_ptr.h"
17 #include "webrtc/common_audio/resampler/include/push_resampler.h" 18 #include "webrtc/common_audio/resampler/include/push_resampler.h"
18 #include "webrtc/common_types.h" 19 #include "webrtc/common_types.h"
19 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" 20 #include "webrtc/modules/audio_coding/include/audio_coding_module.h"
20 #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"
21 #include "webrtc/modules/audio_processing/rms_level.h" 22 #include "webrtc/modules/audio_processing/rms_level.h"
22 #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h" 23 #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h"
23 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" 24 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
24 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" 25 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
25 #include "webrtc/modules/utility/include/file_player.h" 26 #include "webrtc/modules/utility/include/file_player.h"
26 #include "webrtc/modules/utility/include/file_recorder.h" 27 #include "webrtc/modules/utility/include/file_recorder.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 int32_t Init(); 187 int32_t Init();
187 int32_t SetEngineInformation(Statistics& engineStatistics, 188 int32_t SetEngineInformation(Statistics& engineStatistics,
188 OutputMixer& outputMixer, 189 OutputMixer& outputMixer,
189 TransmitMixer& transmitMixer, 190 TransmitMixer& transmitMixer,
190 ProcessThread& moduleProcessThread, 191 ProcessThread& moduleProcessThread,
191 AudioDeviceModule& audioDeviceModule, 192 AudioDeviceModule& audioDeviceModule,
192 VoiceEngineObserver* voiceEngineObserver, 193 VoiceEngineObserver* voiceEngineObserver,
193 rtc::CriticalSection* callbackCritSect); 194 rtc::CriticalSection* callbackCritSect);
194 int32_t UpdateLocalTimeStamp(); 195 int32_t UpdateLocalTimeStamp();
195 196
196 void SetSink(rtc::scoped_ptr<AudioSinkInterface> sink); 197 void SetSink(std::unique_ptr<AudioSinkInterface> sink);
197 198
198 // API methods 199 // API methods
199 200
200 // VoEBase 201 // VoEBase
201 int32_t StartPlayout(); 202 int32_t StartPlayout();
202 int32_t StopPlayout(); 203 int32_t StopPlayout();
203 int32_t StartSend(); 204 int32_t StartSend();
204 int32_t StopSend(); 205 int32_t StopSend();
205 int32_t StartReceiving(); 206 int32_t StartReceiving();
206 int32_t StopReceiving(); 207 int32_t StopReceiving();
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 rtc::CriticalSection _fileCritSect; 487 rtc::CriticalSection _fileCritSect;
487 rtc::CriticalSection _callbackCritSect; 488 rtc::CriticalSection _callbackCritSect;
488 rtc::CriticalSection volume_settings_critsect_; 489 rtc::CriticalSection volume_settings_critsect_;
489 uint32_t _instanceId; 490 uint32_t _instanceId;
490 int32_t _channelId; 491 int32_t _channelId;
491 492
492 ChannelState channel_state_; 493 ChannelState channel_state_;
493 494
494 RtcEventLog* const event_log_; 495 RtcEventLog* const event_log_;
495 496
496 rtc::scoped_ptr<RtpHeaderParser> rtp_header_parser_; 497 std::unique_ptr<RtpHeaderParser> rtp_header_parser_;
497 rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_; 498 std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry_;
498 rtc::scoped_ptr<ReceiveStatistics> rtp_receive_statistics_; 499 std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_;
499 rtc::scoped_ptr<StatisticsProxy> statistics_proxy_; 500 std::unique_ptr<StatisticsProxy> statistics_proxy_;
500 rtc::scoped_ptr<RtpReceiver> rtp_receiver_; 501 std::unique_ptr<RtpReceiver> rtp_receiver_;
501 TelephoneEventHandler* telephone_event_handler_; 502 TelephoneEventHandler* telephone_event_handler_;
502 rtc::scoped_ptr<RtpRtcp> _rtpRtcpModule; 503 std::unique_ptr<RtpRtcp> _rtpRtcpModule;
503 rtc::scoped_ptr<AudioCodingModule> audio_coding_; 504 std::unique_ptr<AudioCodingModule> audio_coding_;
504 rtc::scoped_ptr<AudioSinkInterface> audio_sink_; 505 std::unique_ptr<AudioSinkInterface> audio_sink_;
505 AudioLevel _outputAudioLevel; 506 AudioLevel _outputAudioLevel;
506 bool _externalTransport; 507 bool _externalTransport;
507 AudioFrame _audioFrame; 508 AudioFrame _audioFrame;
508 // Downsamples to the codec rate if necessary. 509 // Downsamples to the codec rate if necessary.
509 PushResampler<int16_t> input_resampler_; 510 PushResampler<int16_t> input_resampler_;
510 FilePlayer* _inputFilePlayerPtr; 511 FilePlayer* _inputFilePlayerPtr;
511 FilePlayer* _outputFilePlayerPtr; 512 FilePlayer* _outputFilePlayerPtr;
512 FileRecorder* _outputFileRecorderPtr; 513 FileRecorder* _outputFileRecorderPtr;
513 int _inputFilePlayerId; 514 int _inputFilePlayerId;
514 int _outputFilePlayerId; 515 int _outputFilePlayerId;
(...skipping 13 matching lines...) Expand all
528 uint32_t jitter_buffer_playout_timestamp_; 529 uint32_t jitter_buffer_playout_timestamp_;
529 uint32_t playout_timestamp_rtp_ GUARDED_BY(video_sync_lock_); 530 uint32_t playout_timestamp_rtp_ GUARDED_BY(video_sync_lock_);
530 uint32_t playout_timestamp_rtcp_; 531 uint32_t playout_timestamp_rtcp_;
531 uint32_t playout_delay_ms_ GUARDED_BY(video_sync_lock_); 532 uint32_t playout_delay_ms_ GUARDED_BY(video_sync_lock_);
532 uint32_t _numberOfDiscardedPackets; 533 uint32_t _numberOfDiscardedPackets;
533 uint16_t send_sequence_number_; 534 uint16_t send_sequence_number_;
534 uint8_t restored_packet_[kVoiceEngineMaxIpPacketSizeBytes]; 535 uint8_t restored_packet_[kVoiceEngineMaxIpPacketSizeBytes];
535 536
536 rtc::CriticalSection ts_stats_lock_; 537 rtc::CriticalSection ts_stats_lock_;
537 538
538 rtc::scoped_ptr<rtc::TimestampWrapAroundHandler> rtp_ts_wraparound_handler_; 539 std::unique_ptr<rtc::TimestampWrapAroundHandler> rtp_ts_wraparound_handler_;
539 // The rtp timestamp of the first played out audio frame. 540 // The rtp timestamp of the first played out audio frame.
540 int64_t capture_start_rtp_time_stamp_; 541 int64_t capture_start_rtp_time_stamp_;
541 // The capture ntp time (in local timebase) of the first played out audio 542 // The capture ntp time (in local timebase) of the first played out audio
542 // frame. 543 // frame.
543 int64_t capture_start_ntp_time_ms_ GUARDED_BY(ts_stats_lock_); 544 int64_t capture_start_ntp_time_ms_ GUARDED_BY(ts_stats_lock_);
544 545
545 // uses 546 // uses
546 Statistics* _engineStatisticsPtr; 547 Statistics* _engineStatisticsPtr;
547 OutputMixer* _outputMixerPtr; 548 OutputMixer* _outputMixerPtr;
548 TransmitMixer* _transmitMixerPtr; 549 TransmitMixer* _transmitMixerPtr;
549 ProcessThread* _moduleProcessThreadPtr; 550 ProcessThread* _moduleProcessThreadPtr;
550 AudioDeviceModule* _audioDeviceModulePtr; 551 AudioDeviceModule* _audioDeviceModulePtr;
551 VoiceEngineObserver* _voiceEngineObserverPtr; // owned by base 552 VoiceEngineObserver* _voiceEngineObserverPtr; // owned by base
552 rtc::CriticalSection* _callbackCritSectPtr; // owned by base 553 rtc::CriticalSection* _callbackCritSectPtr; // owned by base
553 Transport* _transportPtr; // WebRtc socket or external transport 554 Transport* _transportPtr; // WebRtc socket or external transport
554 RMSLevel rms_level_; 555 RMSLevel rms_level_;
555 rtc::scoped_ptr<AudioProcessing> rx_audioproc_; // far end AudioProcessing 556 std::unique_ptr<AudioProcessing> rx_audioproc_; // far end AudioProcessing
556 VoERxVadCallback* _rxVadObserverPtr; 557 VoERxVadCallback* _rxVadObserverPtr;
557 int32_t _oldVadDecision; 558 int32_t _oldVadDecision;
558 int32_t _sendFrameType; // Send data is voice, 1-voice, 0-otherwise 559 int32_t _sendFrameType; // Send data is voice, 1-voice, 0-otherwise
559 // VoEBase 560 // VoEBase
560 bool _externalMixing; 561 bool _externalMixing;
561 bool _mixFileWithMicrophone; 562 bool _mixFileWithMicrophone;
562 // VoEVolumeControl 563 // VoEVolumeControl
563 bool _mute; 564 bool _mute;
564 float _panLeft; 565 float _panLeft;
565 float _panRight; 566 float _panRight;
(...skipping 11 matching lines...) Expand all
577 rtc::CriticalSection video_sync_lock_; 578 rtc::CriticalSection video_sync_lock_;
578 uint32_t _average_jitter_buffer_delay_us GUARDED_BY(video_sync_lock_); 579 uint32_t _average_jitter_buffer_delay_us GUARDED_BY(video_sync_lock_);
579 uint32_t _previousTimestamp; 580 uint32_t _previousTimestamp;
580 uint16_t _recPacketDelayMs GUARDED_BY(video_sync_lock_); 581 uint16_t _recPacketDelayMs GUARDED_BY(video_sync_lock_);
581 // VoEAudioProcessing 582 // VoEAudioProcessing
582 bool _RxVadDetection; 583 bool _RxVadDetection;
583 bool _rxAgcIsEnabled; 584 bool _rxAgcIsEnabled;
584 bool _rxNsIsEnabled; 585 bool _rxNsIsEnabled;
585 bool restored_packet_in_use_; 586 bool restored_packet_in_use_;
586 // RtcpBandwidthObserver 587 // RtcpBandwidthObserver
587 rtc::scoped_ptr<VoERtcpObserver> rtcp_observer_; 588 std::unique_ptr<VoERtcpObserver> rtcp_observer_;
588 rtc::scoped_ptr<NetworkPredictor> network_predictor_; 589 std::unique_ptr<NetworkPredictor> network_predictor_;
589 // An associated send channel. 590 // An associated send channel.
590 rtc::CriticalSection assoc_send_channel_lock_; 591 rtc::CriticalSection assoc_send_channel_lock_;
591 ChannelOwner associate_send_channel_ GUARDED_BY(assoc_send_channel_lock_); 592 ChannelOwner associate_send_channel_ GUARDED_BY(assoc_send_channel_lock_);
592 593
593 bool pacing_enabled_; 594 bool pacing_enabled_;
594 PacketRouter* packet_router_ = nullptr; 595 PacketRouter* packet_router_ = nullptr;
595 rtc::scoped_ptr<TransportFeedbackProxy> feedback_observer_proxy_; 596 std::unique_ptr<TransportFeedbackProxy> feedback_observer_proxy_;
596 rtc::scoped_ptr<TransportSequenceNumberProxy> seq_num_allocator_proxy_; 597 std::unique_ptr<TransportSequenceNumberProxy> seq_num_allocator_proxy_;
597 rtc::scoped_ptr<RtpPacketSenderProxy> rtp_packet_sender_proxy_; 598 std::unique_ptr<RtpPacketSenderProxy> rtp_packet_sender_proxy_;
598 }; 599 };
599 600
600 } // namespace voe 601 } // namespace voe
601 } // namespace webrtc 602 } // namespace webrtc
602 603
603 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ 604 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_
OLDNEW
« no previous file with comments | « webrtc/test/mock_voice_engine.h ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698