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

Side by Side Diff: content/renderer/media/webrtc_audio_device_impl.h

Issue 633303002: Replace FINAL and OVERRIDE with their C++11 counterparts in content/renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // The maximum volume value WebRtc uses. 276 // The maximum volume value WebRtc uses.
277 static const int kMaxVolumeLevel = 255; 277 static const int kMaxVolumeLevel = 255;
278 278
279 // Instances of this object are created on the main render thread. 279 // Instances of this object are created on the main render thread.
280 WebRtcAudioDeviceImpl(); 280 WebRtcAudioDeviceImpl();
281 281
282 // webrtc::RefCountedModule implementation. 282 // webrtc::RefCountedModule implementation.
283 // The creator must call AddRef() after construction and use Release() 283 // The creator must call AddRef() after construction and use Release()
284 // to release the reference and delete this object. 284 // to release the reference and delete this object.
285 // Called on the main render thread. 285 // Called on the main render thread.
286 virtual int32_t AddRef() OVERRIDE; 286 virtual int32_t AddRef() override;
287 virtual int32_t Release() OVERRIDE; 287 virtual int32_t Release() override;
288 288
289 // webrtc::AudioDeviceModule implementation. 289 // webrtc::AudioDeviceModule implementation.
290 // All implemented methods are called on the main render thread unless 290 // All implemented methods are called on the main render thread unless
291 // anything else is stated. 291 // anything else is stated.
292 292
293 virtual int32_t RegisterAudioCallback(webrtc::AudioTransport* audio_callback) 293 virtual int32_t RegisterAudioCallback(webrtc::AudioTransport* audio_callback)
294 OVERRIDE; 294 override;
295 295
296 virtual int32_t Init() OVERRIDE; 296 virtual int32_t Init() override;
297 virtual int32_t Terminate() OVERRIDE; 297 virtual int32_t Terminate() override;
298 virtual bool Initialized() const OVERRIDE; 298 virtual bool Initialized() const override;
299 299
300 virtual int32_t PlayoutIsAvailable(bool* available) OVERRIDE; 300 virtual int32_t PlayoutIsAvailable(bool* available) override;
301 virtual bool PlayoutIsInitialized() const OVERRIDE; 301 virtual bool PlayoutIsInitialized() const override;
302 virtual int32_t RecordingIsAvailable(bool* available) OVERRIDE; 302 virtual int32_t RecordingIsAvailable(bool* available) override;
303 virtual bool RecordingIsInitialized() const OVERRIDE; 303 virtual bool RecordingIsInitialized() const override;
304 304
305 // All Start/Stop methods are called on a libJingle worker thread. 305 // All Start/Stop methods are called on a libJingle worker thread.
306 virtual int32_t StartPlayout() OVERRIDE; 306 virtual int32_t StartPlayout() override;
307 virtual int32_t StopPlayout() OVERRIDE; 307 virtual int32_t StopPlayout() override;
308 virtual bool Playing() const OVERRIDE; 308 virtual bool Playing() const override;
309 virtual int32_t StartRecording() OVERRIDE; 309 virtual int32_t StartRecording() override;
310 virtual int32_t StopRecording() OVERRIDE; 310 virtual int32_t StopRecording() override;
311 virtual bool Recording() const OVERRIDE; 311 virtual bool Recording() const override;
312 312
313 // Called on the AudioInputDevice worker thread. 313 // Called on the AudioInputDevice worker thread.
314 virtual int32_t SetMicrophoneVolume(uint32_t volume) OVERRIDE; 314 virtual int32_t SetMicrophoneVolume(uint32_t volume) override;
315 315
316 // TODO(henrika): sort out calling thread once we start using this API. 316 // TODO(henrika): sort out calling thread once we start using this API.
317 virtual int32_t MicrophoneVolume(uint32_t* volume) const OVERRIDE; 317 virtual int32_t MicrophoneVolume(uint32_t* volume) const override;
318 318
319 virtual int32_t MaxMicrophoneVolume(uint32_t* max_volume) const OVERRIDE; 319 virtual int32_t MaxMicrophoneVolume(uint32_t* max_volume) const override;
320 virtual int32_t MinMicrophoneVolume(uint32_t* min_volume) const OVERRIDE; 320 virtual int32_t MinMicrophoneVolume(uint32_t* min_volume) const override;
321 virtual int32_t StereoPlayoutIsAvailable(bool* available) const OVERRIDE; 321 virtual int32_t StereoPlayoutIsAvailable(bool* available) const override;
322 virtual int32_t StereoRecordingIsAvailable(bool* available) const OVERRIDE; 322 virtual int32_t StereoRecordingIsAvailable(bool* available) const override;
323 virtual int32_t PlayoutDelay(uint16_t* delay_ms) const OVERRIDE; 323 virtual int32_t PlayoutDelay(uint16_t* delay_ms) const override;
324 virtual int32_t RecordingDelay(uint16_t* delay_ms) const OVERRIDE; 324 virtual int32_t RecordingDelay(uint16_t* delay_ms) const override;
325 virtual int32_t RecordingSampleRate(uint32_t* sample_rate) const OVERRIDE; 325 virtual int32_t RecordingSampleRate(uint32_t* sample_rate) const override;
326 virtual int32_t PlayoutSampleRate(uint32_t* sample_rate) const OVERRIDE; 326 virtual int32_t PlayoutSampleRate(uint32_t* sample_rate) const override;
327 327
328 // Sets the |renderer_|, returns false if |renderer_| already exists. 328 // Sets the |renderer_|, returns false if |renderer_| already exists.
329 // Called on the main renderer thread. 329 // Called on the main renderer thread.
330 bool SetAudioRenderer(WebRtcAudioRenderer* renderer); 330 bool SetAudioRenderer(WebRtcAudioRenderer* renderer);
331 331
332 // Adds/Removes the capturer to the ADM. 332 // Adds/Removes the capturer to the ADM.
333 // TODO(xians): Remove these two methods once the ADM does not need to pass 333 // TODO(xians): Remove these two methods once the ADM does not need to pass
334 // hardware information up to WebRtc. 334 // hardware information up to WebRtc.
335 void AddAudioCapturer(const scoped_refptr<WebRtcAudioCapturer>& capturer); 335 void AddAudioCapturer(const scoped_refptr<WebRtcAudioCapturer>& capturer);
336 void RemoveAudioCapturer(const scoped_refptr<WebRtcAudioCapturer>& capturer); 336 void RemoveAudioCapturer(const scoped_refptr<WebRtcAudioCapturer>& capturer);
(...skipping 28 matching lines...) Expand all
365 365
366 // Called on the AudioInputDevice worker thread. 366 // Called on the AudioInputDevice worker thread.
367 virtual int OnData(const int16* audio_data, 367 virtual int OnData(const int16* audio_data,
368 int sample_rate, 368 int sample_rate,
369 int number_of_channels, 369 int number_of_channels,
370 int number_of_frames, 370 int number_of_frames,
371 const std::vector<int>& channels, 371 const std::vector<int>& channels,
372 int audio_delay_milliseconds, 372 int audio_delay_milliseconds,
373 int current_volume, 373 int current_volume,
374 bool need_audio_processing, 374 bool need_audio_processing,
375 bool key_pressed) OVERRIDE; 375 bool key_pressed) override;
376 376
377 // Called on the AudioInputDevice worker thread. 377 // Called on the AudioInputDevice worker thread.
378 virtual void OnSetFormat(const media::AudioParameters& params) OVERRIDE; 378 virtual void OnSetFormat(const media::AudioParameters& params) override;
379 379
380 // WebRtcAudioRendererSource implementation. 380 // WebRtcAudioRendererSource implementation.
381 381
382 // Called on the AudioOutputDevice worker thread. 382 // Called on the AudioOutputDevice worker thread.
383 virtual void RenderData(media::AudioBus* audio_bus, 383 virtual void RenderData(media::AudioBus* audio_bus,
384 int sample_rate, 384 int sample_rate,
385 int audio_delay_milliseconds, 385 int audio_delay_milliseconds,
386 base::TimeDelta* current_time) OVERRIDE; 386 base::TimeDelta* current_time) override;
387 387
388 // Called on the main render thread. 388 // Called on the main render thread.
389 virtual void RemoveAudioRenderer(WebRtcAudioRenderer* renderer) OVERRIDE; 389 virtual void RemoveAudioRenderer(WebRtcAudioRenderer* renderer) override;
390 390
391 // WebRtcPlayoutDataSource implementation. 391 // WebRtcPlayoutDataSource implementation.
392 virtual void AddPlayoutSink(WebRtcPlayoutDataSource::Sink* sink) OVERRIDE; 392 virtual void AddPlayoutSink(WebRtcPlayoutDataSource::Sink* sink) override;
393 virtual void RemovePlayoutSink(WebRtcPlayoutDataSource::Sink* sink) OVERRIDE; 393 virtual void RemovePlayoutSink(WebRtcPlayoutDataSource::Sink* sink) override;
394 394
395 // Used to DCHECK that we are called on the correct thread. 395 // Used to DCHECK that we are called on the correct thread.
396 base::ThreadChecker thread_checker_; 396 base::ThreadChecker thread_checker_;
397 397
398 int ref_count_; 398 int ref_count_;
399 399
400 // List of captures which provides access to the native audio input layer 400 // List of captures which provides access to the native audio input layer
401 // in the browser process. 401 // in the browser process.
402 CapturerList capturers_; 402 CapturerList capturers_;
403 403
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 442
443 // Flag to tell if audio processing is enabled in MediaStreamAudioProcessor. 443 // Flag to tell if audio processing is enabled in MediaStreamAudioProcessor.
444 const bool is_audio_track_processing_enabled_; 444 const bool is_audio_track_processing_enabled_;
445 445
446 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); 446 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl);
447 }; 447 };
448 448
449 } // namespace content 449 } // namespace content
450 450
451 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ 451 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc_audio_capturer_unittest.cc ('k') | content/renderer/media/webrtc_audio_device_not_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698