| OLD | NEW |
| 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_NOT_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_NOT_IMPL_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_NOT_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_NOT_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // to maintain. | 21 // to maintain. |
| 22 class CONTENT_EXPORT WebRtcAudioDeviceNotImpl | 22 class CONTENT_EXPORT WebRtcAudioDeviceNotImpl |
| 23 : NON_EXPORTED_BASE(public webrtc::AudioDeviceModule) { | 23 : NON_EXPORTED_BASE(public webrtc::AudioDeviceModule) { |
| 24 public: | 24 public: |
| 25 WebRtcAudioDeviceNotImpl(); | 25 WebRtcAudioDeviceNotImpl(); |
| 26 | 26 |
| 27 // webrtc::Module implementation. | 27 // webrtc::Module implementation. |
| 28 // TODO(henrika): it is possible to add functionality in these methods. | 28 // TODO(henrika): it is possible to add functionality in these methods. |
| 29 // Only adding very basic support for now without triggering any callback | 29 // Only adding very basic support for now without triggering any callback |
| 30 // in the webrtc::AudioDeviceObserver interface. | 30 // in the webrtc::AudioDeviceObserver interface. |
| 31 virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE; | 31 virtual int32_t ChangeUniqueId(const int32_t id) override; |
| 32 virtual int32_t TimeUntilNextProcess() OVERRIDE; | 32 virtual int32_t TimeUntilNextProcess() override; |
| 33 virtual int32_t Process() OVERRIDE; | 33 virtual int32_t Process() override; |
| 34 | 34 |
| 35 // Methods in webrtc::AudioDeviceModule which are not yet implemented. | 35 // Methods in webrtc::AudioDeviceModule which are not yet implemented. |
| 36 // The idea is that we can move methods from this class to the real | 36 // The idea is that we can move methods from this class to the real |
| 37 // implementation in WebRtcAudioDeviceImpl when needed. | 37 // implementation in WebRtcAudioDeviceImpl when needed. |
| 38 | 38 |
| 39 virtual int32_t RegisterEventObserver( | 39 virtual int32_t RegisterEventObserver( |
| 40 webrtc::AudioDeviceObserver* event_callback) OVERRIDE; | 40 webrtc::AudioDeviceObserver* event_callback) override; |
| 41 virtual int32_t ActiveAudioLayer(AudioLayer* audio_layer) const OVERRIDE; | 41 virtual int32_t ActiveAudioLayer(AudioLayer* audio_layer) const override; |
| 42 virtual webrtc::AudioDeviceModule::ErrorCode LastError() const OVERRIDE; | 42 virtual webrtc::AudioDeviceModule::ErrorCode LastError() const override; |
| 43 virtual int16_t PlayoutDevices() OVERRIDE; | 43 virtual int16_t PlayoutDevices() override; |
| 44 virtual int16_t RecordingDevices() OVERRIDE; | 44 virtual int16_t RecordingDevices() override; |
| 45 virtual int32_t PlayoutDeviceName( | 45 virtual int32_t PlayoutDeviceName( |
| 46 uint16_t index, char name[webrtc::kAdmMaxDeviceNameSize], | 46 uint16_t index, char name[webrtc::kAdmMaxDeviceNameSize], |
| 47 char guid[webrtc::kAdmMaxGuidSize]) OVERRIDE; | 47 char guid[webrtc::kAdmMaxGuidSize]) override; |
| 48 virtual int32_t RecordingDeviceName( | 48 virtual int32_t RecordingDeviceName( |
| 49 uint16_t index, char name[webrtc::kAdmMaxDeviceNameSize], | 49 uint16_t index, char name[webrtc::kAdmMaxDeviceNameSize], |
| 50 char guid[webrtc::kAdmMaxGuidSize]) OVERRIDE; | 50 char guid[webrtc::kAdmMaxGuidSize]) override; |
| 51 virtual int32_t SetPlayoutDevice(uint16_t index) OVERRIDE; | 51 virtual int32_t SetPlayoutDevice(uint16_t index) override; |
| 52 virtual int32_t SetPlayoutDevice(WindowsDeviceType device) OVERRIDE; | 52 virtual int32_t SetPlayoutDevice(WindowsDeviceType device) override; |
| 53 virtual int32_t SetRecordingDevice(uint16_t index) OVERRIDE; | 53 virtual int32_t SetRecordingDevice(uint16_t index) override; |
| 54 virtual int32_t SetRecordingDevice(WindowsDeviceType device) OVERRIDE; | 54 virtual int32_t SetRecordingDevice(WindowsDeviceType device) override; |
| 55 virtual int32_t InitPlayout() OVERRIDE; | 55 virtual int32_t InitPlayout() override; |
| 56 virtual int32_t InitRecording() OVERRIDE; | 56 virtual int32_t InitRecording() override; |
| 57 virtual int32_t SetWaveOutVolume(uint16_t volume_left, | 57 virtual int32_t SetWaveOutVolume(uint16_t volume_left, |
| 58 uint16_t volume_right) OVERRIDE; | 58 uint16_t volume_right) override; |
| 59 virtual int32_t WaveOutVolume(uint16_t* volume_left, | 59 virtual int32_t WaveOutVolume(uint16_t* volume_left, |
| 60 uint16_t* volume_right) const OVERRIDE; | 60 uint16_t* volume_right) const override; |
| 61 virtual int32_t InitSpeaker() OVERRIDE; | 61 virtual int32_t InitSpeaker() override; |
| 62 virtual bool SpeakerIsInitialized() const OVERRIDE; | 62 virtual bool SpeakerIsInitialized() const override; |
| 63 virtual int32_t InitMicrophone() OVERRIDE; | 63 virtual int32_t InitMicrophone() override; |
| 64 virtual bool MicrophoneIsInitialized() const OVERRIDE; | 64 virtual bool MicrophoneIsInitialized() const override; |
| 65 virtual int32_t SpeakerVolumeIsAvailable(bool* available) OVERRIDE; | 65 virtual int32_t SpeakerVolumeIsAvailable(bool* available) override; |
| 66 virtual int32_t SetSpeakerVolume(uint32_t volume) OVERRIDE; | 66 virtual int32_t SetSpeakerVolume(uint32_t volume) override; |
| 67 virtual int32_t SpeakerVolume(uint32_t* volume) const OVERRIDE; | 67 virtual int32_t SpeakerVolume(uint32_t* volume) const override; |
| 68 virtual int32_t MaxSpeakerVolume(uint32_t* max_volume) const OVERRIDE; | 68 virtual int32_t MaxSpeakerVolume(uint32_t* max_volume) const override; |
| 69 virtual int32_t MinSpeakerVolume(uint32_t* min_volume) const OVERRIDE; | 69 virtual int32_t MinSpeakerVolume(uint32_t* min_volume) const override; |
| 70 virtual int32_t SpeakerVolumeStepSize(uint16_t* step_size) const OVERRIDE; | 70 virtual int32_t SpeakerVolumeStepSize(uint16_t* step_size) const override; |
| 71 virtual int32_t MicrophoneVolumeIsAvailable(bool* available) OVERRIDE; | 71 virtual int32_t MicrophoneVolumeIsAvailable(bool* available) override; |
| 72 virtual int32_t MicrophoneVolumeStepSize( | 72 virtual int32_t MicrophoneVolumeStepSize( |
| 73 uint16_t* step_size) const OVERRIDE; | 73 uint16_t* step_size) const override; |
| 74 virtual int32_t SpeakerMuteIsAvailable(bool* available) OVERRIDE; | 74 virtual int32_t SpeakerMuteIsAvailable(bool* available) override; |
| 75 virtual int32_t SetSpeakerMute(bool enable) OVERRIDE; | 75 virtual int32_t SetSpeakerMute(bool enable) override; |
| 76 virtual int32_t SpeakerMute(bool* enabled) const OVERRIDE; | 76 virtual int32_t SpeakerMute(bool* enabled) const override; |
| 77 virtual int32_t MicrophoneMuteIsAvailable(bool* available) OVERRIDE; | 77 virtual int32_t MicrophoneMuteIsAvailable(bool* available) override; |
| 78 virtual int32_t SetMicrophoneMute(bool enable) OVERRIDE; | 78 virtual int32_t SetMicrophoneMute(bool enable) override; |
| 79 virtual int32_t MicrophoneMute(bool* enabled) const OVERRIDE; | 79 virtual int32_t MicrophoneMute(bool* enabled) const override; |
| 80 virtual int32_t MicrophoneBoostIsAvailable(bool* available) OVERRIDE; | 80 virtual int32_t MicrophoneBoostIsAvailable(bool* available) override; |
| 81 virtual int32_t SetMicrophoneBoost(bool enable) OVERRIDE; | 81 virtual int32_t SetMicrophoneBoost(bool enable) override; |
| 82 virtual int32_t MicrophoneBoost(bool* enabled) const OVERRIDE; | 82 virtual int32_t MicrophoneBoost(bool* enabled) const override; |
| 83 virtual int32_t SetStereoPlayout(bool enable) OVERRIDE; | 83 virtual int32_t SetStereoPlayout(bool enable) override; |
| 84 virtual int32_t StereoPlayout(bool* enabled) const OVERRIDE; | 84 virtual int32_t StereoPlayout(bool* enabled) const override; |
| 85 virtual int32_t SetStereoRecording(bool enable) OVERRIDE; | 85 virtual int32_t SetStereoRecording(bool enable) override; |
| 86 virtual int32_t StereoRecording(bool* enabled) const OVERRIDE; | 86 virtual int32_t StereoRecording(bool* enabled) const override; |
| 87 virtual int32_t SetRecordingChannel(const ChannelType channel) OVERRIDE; | 87 virtual int32_t SetRecordingChannel(const ChannelType channel) override; |
| 88 virtual int32_t RecordingChannel(ChannelType* channel) const OVERRIDE; | 88 virtual int32_t RecordingChannel(ChannelType* channel) const override; |
| 89 virtual int32_t SetPlayoutBuffer( | 89 virtual int32_t SetPlayoutBuffer( |
| 90 const BufferType type, uint16_t size_ms) OVERRIDE; | 90 const BufferType type, uint16_t size_ms) override; |
| 91 virtual int32_t PlayoutBuffer( | 91 virtual int32_t PlayoutBuffer( |
| 92 BufferType* type, uint16_t* size_ms) const OVERRIDE; | 92 BufferType* type, uint16_t* size_ms) const override; |
| 93 virtual int32_t CPULoad(uint16_t* load) const OVERRIDE; | 93 virtual int32_t CPULoad(uint16_t* load) const override; |
| 94 virtual int32_t StartRawOutputFileRecording( | 94 virtual int32_t StartRawOutputFileRecording( |
| 95 const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize]) OVERRIDE; | 95 const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize]) override; |
| 96 virtual int32_t StopRawOutputFileRecording() OVERRIDE; | 96 virtual int32_t StopRawOutputFileRecording() override; |
| 97 virtual int32_t StartRawInputFileRecording( | 97 virtual int32_t StartRawInputFileRecording( |
| 98 const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize]) OVERRIDE; | 98 const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize]) override; |
| 99 virtual int32_t StopRawInputFileRecording() OVERRIDE; | 99 virtual int32_t StopRawInputFileRecording() override; |
| 100 virtual int32_t SetRecordingSampleRate( | 100 virtual int32_t SetRecordingSampleRate( |
| 101 const uint32_t samples_per_sec) OVERRIDE; | 101 const uint32_t samples_per_sec) override; |
| 102 virtual int32_t SetPlayoutSampleRate( | 102 virtual int32_t SetPlayoutSampleRate( |
| 103 const uint32_t samples_per_sec) OVERRIDE; | 103 const uint32_t samples_per_sec) override; |
| 104 virtual int32_t ResetAudioDevice() OVERRIDE; | 104 virtual int32_t ResetAudioDevice() override; |
| 105 virtual int32_t SetLoudspeakerStatus(bool enable) OVERRIDE; | 105 virtual int32_t SetLoudspeakerStatus(bool enable) override; |
| 106 virtual int32_t GetLoudspeakerStatus(bool* enabled) const OVERRIDE; | 106 virtual int32_t GetLoudspeakerStatus(bool* enabled) const override; |
| 107 virtual int32_t SetAGC(bool enable) OVERRIDE; | 107 virtual int32_t SetAGC(bool enable) override; |
| 108 virtual bool AGC() const OVERRIDE; | 108 virtual bool AGC() const override; |
| 109 | 109 |
| 110 protected: | 110 protected: |
| 111 virtual ~WebRtcAudioDeviceNotImpl() {}; | 111 virtual ~WebRtcAudioDeviceNotImpl() {}; |
| 112 | 112 |
| 113 private: | 113 private: |
| 114 base::TimeTicks last_process_time_; | 114 base::TimeTicks last_process_time_; |
| 115 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceNotImpl); | 115 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceNotImpl); |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 } // namespace content | 118 } // namespace content |
| 119 | 119 |
| 120 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_NOT_IMPL_H_ | 120 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_NOT_IMPL_H_ |
| OLD | NEW |