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

Side by Side Diff: voice_engine/channel.h

Issue 3019513002: Remove the VoiceEngineObserver callback interface. (Closed)
Patch Set: rebase + build error Created 3 years, 2 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 | « voice_engine/BUILD.gn ('k') | 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
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 class RateLimiter; 48 class RateLimiter;
49 class ReceiveStatistics; 49 class ReceiveStatistics;
50 class RemoteNtpTimeEstimator; 50 class RemoteNtpTimeEstimator;
51 class RtcEventLog; 51 class RtcEventLog;
52 class RTPPayloadRegistry; 52 class RTPPayloadRegistry;
53 class RTPReceiverAudio; 53 class RTPReceiverAudio;
54 class RtpPacketReceived; 54 class RtpPacketReceived;
55 class RtpRtcp; 55 class RtpRtcp;
56 class RtpTransportControllerSendInterface; 56 class RtpTransportControllerSendInterface;
57 class TelephoneEventHandler; 57 class TelephoneEventHandler;
58 class VoiceEngineObserver;
59 58
60 struct SenderInfo; 59 struct SenderInfo;
61 60
62 struct CallStatistics { 61 struct CallStatistics {
63 unsigned short fractionLost; 62 unsigned short fractionLost;
64 unsigned int cumulativeLost; 63 unsigned int cumulativeLost;
65 unsigned int extendedMax; 64 unsigned int extendedMax;
66 unsigned int jitterSamples; 65 unsigned int jitterSamples;
67 int64_t rttMs; 66 int64_t rttMs;
68 size_t bytesSent; 67 size_t bytesSent;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 uint32_t instanceId, 153 uint32_t instanceId,
155 const VoEBase::ChannelConfig& config); 154 const VoEBase::ChannelConfig& config);
156 Channel(int32_t channelId, 155 Channel(int32_t channelId,
157 uint32_t instanceId, 156 uint32_t instanceId,
158 const VoEBase::ChannelConfig& config); 157 const VoEBase::ChannelConfig& config);
159 int32_t Init(); 158 int32_t Init();
160 void Terminate(); 159 void Terminate();
161 int32_t SetEngineInformation(Statistics& engineStatistics, 160 int32_t SetEngineInformation(Statistics& engineStatistics,
162 ProcessThread& moduleProcessThread, 161 ProcessThread& moduleProcessThread,
163 AudioDeviceModule& audioDeviceModule, 162 AudioDeviceModule& audioDeviceModule,
164 VoiceEngineObserver* voiceEngineObserver,
165 rtc::CriticalSection* callbackCritSect, 163 rtc::CriticalSection* callbackCritSect,
166 rtc::TaskQueue* encoder_queue); 164 rtc::TaskQueue* encoder_queue);
167 165
168 void SetSink(std::unique_ptr<AudioSinkInterface> sink); 166 void SetSink(std::unique_ptr<AudioSinkInterface> sink);
169 167
170 // TODO(ossu): Don't use! It's only here to confirm that the decoder factory 168 // TODO(ossu): Don't use! It's only here to confirm that the decoder factory
171 // passed into AudioReceiveStream is the same as the one set when creating the 169 // passed into AudioReceiveStream is the same as the one set when creating the
172 // ADM. Once Channel creation is moved into Audio{Send,Receive}Stream this can 170 // ADM. Once Channel creation is moved into Audio{Send,Receive}Stream this can
173 // go. 171 // go.
174 const rtc::scoped_refptr<AudioDecoderFactory>& GetAudioDecoderFactory() const; 172 const rtc::scoped_refptr<AudioDecoderFactory>& GetAudioDecoderFactory() const;
175 173
176 void SetReceiveCodecs(const std::map<int, SdpAudioFormat>& codecs); 174 void SetReceiveCodecs(const std::map<int, SdpAudioFormat>& codecs);
177 175
178 // Send using this encoder, with this payload type. 176 // Send using this encoder, with this payload type.
179 bool SetEncoder(int payload_type, std::unique_ptr<AudioEncoder> encoder); 177 bool SetEncoder(int payload_type, std::unique_ptr<AudioEncoder> encoder);
180 void ModifyEncoder( 178 void ModifyEncoder(
181 rtc::FunctionView<void(std::unique_ptr<AudioEncoder>*)> modifier); 179 rtc::FunctionView<void(std::unique_ptr<AudioEncoder>*)> modifier);
182 180
183 // API methods 181 // API methods
184 182
185 // VoEBase 183 // VoEBase
186 int32_t StartPlayout(); 184 int32_t StartPlayout();
187 int32_t StopPlayout(); 185 int32_t StopPlayout();
188 int32_t StartSend(); 186 int32_t StartSend();
189 void StopSend(); 187 void StopSend();
190 int32_t RegisterVoiceEngineObserver(VoiceEngineObserver& observer);
191 int32_t DeRegisterVoiceEngineObserver();
192 188
193 // Codecs 189 // Codecs
194 int32_t GetSendCodec(CodecInst& codec); 190 int32_t GetSendCodec(CodecInst& codec);
195 int32_t GetRecCodec(CodecInst& codec); 191 int32_t GetRecCodec(CodecInst& codec);
196 int32_t SetSendCodec(const CodecInst& codec); 192 int32_t SetSendCodec(const CodecInst& codec);
197 void SetBitRate(int bitrate_bps, int64_t probing_interval_ms); 193 void SetBitRate(int bitrate_bps, int64_t probing_interval_ms);
198 bool EnableAudioNetworkAdaptor(const std::string& config_string); 194 bool EnableAudioNetworkAdaptor(const std::string& config_string);
199 void DisableAudioNetworkAdaptor(); 195 void DisableAudioNetworkAdaptor();
200 void SetReceiverFrameLengthRange(int min_frame_length_ms, 196 void SetReceiverFrameLengthRange(int min_frame_length_ms,
201 int max_frame_length_ms); 197 int max_frame_length_ms);
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 // The rtp timestamp of the first played out audio frame. 416 // The rtp timestamp of the first played out audio frame.
421 int64_t capture_start_rtp_time_stamp_; 417 int64_t capture_start_rtp_time_stamp_;
422 // The capture ntp time (in local timebase) of the first played out audio 418 // The capture ntp time (in local timebase) of the first played out audio
423 // frame. 419 // frame.
424 int64_t capture_start_ntp_time_ms_ RTC_GUARDED_BY(ts_stats_lock_); 420 int64_t capture_start_ntp_time_ms_ RTC_GUARDED_BY(ts_stats_lock_);
425 421
426 // uses 422 // uses
427 Statistics* _engineStatisticsPtr; 423 Statistics* _engineStatisticsPtr;
428 ProcessThread* _moduleProcessThreadPtr; 424 ProcessThread* _moduleProcessThreadPtr;
429 AudioDeviceModule* _audioDeviceModulePtr; 425 AudioDeviceModule* _audioDeviceModulePtr;
430 VoiceEngineObserver* _voiceEngineObserverPtr; // owned by base
431 rtc::CriticalSection* _callbackCritSectPtr; // owned by base 426 rtc::CriticalSection* _callbackCritSectPtr; // owned by base
432 Transport* _transportPtr; // WebRtc socket or external transport 427 Transport* _transportPtr; // WebRtc socket or external transport
433 RmsLevel rms_level_ RTC_ACCESS_ON(encoder_queue_); 428 RmsLevel rms_level_ RTC_ACCESS_ON(encoder_queue_);
434 bool input_mute_ RTC_GUARDED_BY(volume_settings_critsect_); 429 bool input_mute_ RTC_GUARDED_BY(volume_settings_critsect_);
435 bool previous_frame_muted_ RTC_ACCESS_ON(encoder_queue_); 430 bool previous_frame_muted_ RTC_ACCESS_ON(encoder_queue_);
436 float _outputGain RTC_GUARDED_BY(volume_settings_critsect_); 431 float _outputGain RTC_GUARDED_BY(volume_settings_critsect_);
437 // VoeRTP_RTCP 432 // VoeRTP_RTCP
438 // TODO(henrika): can today be accessed on the main thread and on the 433 // TODO(henrika): can today be accessed on the main thread and on the
439 // task queue; hence potential race. 434 // task queue; hence potential race.
440 bool _includeAudioLevelIndication; 435 bool _includeAudioLevelIndication;
(...skipping 29 matching lines...) Expand all
470 465
471 bool encoder_queue_is_active_ RTC_GUARDED_BY(encoder_queue_lock_) = false; 466 bool encoder_queue_is_active_ RTC_GUARDED_BY(encoder_queue_lock_) = false;
472 467
473 rtc::TaskQueue* encoder_queue_ = nullptr; 468 rtc::TaskQueue* encoder_queue_ = nullptr;
474 }; 469 };
475 470
476 } // namespace voe 471 } // namespace voe
477 } // namespace webrtc 472 } // namespace webrtc
478 473
479 #endif // VOICE_ENGINE_CHANNEL_H_ 474 #endif // VOICE_ENGINE_CHANNEL_H_
OLDNEW
« no previous file with comments | « voice_engine/BUILD.gn ('k') | voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698