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

Side by Side Diff: media/audio/audio_input_controller.h

Issue 510913005: Add native log and uma stat when all input shared memory buffers are full (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed the comments. Created 6 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_
6 #define MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ 6 #define MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_
7 7
8 #include <string> 8 #include <string>
9 #include "base/atomicops.h" 9 #include "base/atomicops.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 protected: 125 protected:
126 virtual ~EventHandler() {} 126 virtual ~EventHandler() {}
127 }; 127 };
128 128
129 // A synchronous writer interface used by AudioInputController for 129 // A synchronous writer interface used by AudioInputController for
130 // synchronous writing. 130 // synchronous writing.
131 class SyncWriter { 131 class SyncWriter {
132 public: 132 public:
133 virtual ~SyncWriter() {} 133 virtual ~SyncWriter() {}
134 134
135 // Notify the synchronous writer about the number of bytes in the 135 // Write certain amount of data from |data| and notify the synchronous
136 // soundcard which has been recorded. 136 // receiver by sending the hardware delay in bytes via sync socket.
137 virtual void UpdateRecordedBytes(uint32 bytes) = 0;
138
139 // Write certain amount of data from |data|.
140 virtual void Write(const AudioBus* data, 137 virtual void Write(const AudioBus* data,
141 double volume, 138 double volume,
142 bool key_pressed) = 0; 139 bool key_pressed,
140 uint32 hardware_delay_bytes) = 0;
143 141
144 // Close this synchronous writer. 142 // Close this synchronous writer.
145 virtual void Close() = 0; 143 virtual void Close() = 0;
146 }; 144 };
147 145
148 // AudioInputController::Create() can use the currently registered Factory 146 // AudioInputController::Create() can use the currently registered Factory
149 // to create the AudioInputController. Factory is intended for testing only. 147 // to create the AudioInputController. Factory is intended for testing only.
150 // |user_input_monitor| is used for typing detection and can be NULL. 148 // |user_input_monitor| is used for typing detection and can be NULL.
151 class Factory { 149 class Factory {
152 public: 150 public:
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 #endif 365 #endif
368 366
369 size_t prev_key_down_count_; 367 size_t prev_key_down_count_;
370 368
371 DISALLOW_COPY_AND_ASSIGN(AudioInputController); 369 DISALLOW_COPY_AND_ASSIGN(AudioInputController);
372 }; 370 };
373 371
374 } // namespace media 372 } // namespace media
375 373
376 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ 374 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698