| OLD | NEW |
| 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 CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
| 9 #include "base/process/process.h" | 9 #include "base/process/process.h" |
| 10 #include "base/sync_socket.h" | 10 #include "base/sync_socket.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // process. | 28 // process. |
| 29 class AudioInputSyncWriter : public media::AudioInputController::SyncWriter { | 29 class AudioInputSyncWriter : public media::AudioInputController::SyncWriter { |
| 30 public: | 30 public: |
| 31 explicit AudioInputSyncWriter(base::SharedMemory* shared_memory, | 31 explicit AudioInputSyncWriter(base::SharedMemory* shared_memory, |
| 32 int shared_memory_segment_count, | 32 int shared_memory_segment_count, |
| 33 const media::AudioParameters& params); | 33 const media::AudioParameters& params); |
| 34 | 34 |
| 35 virtual ~AudioInputSyncWriter(); | 35 virtual ~AudioInputSyncWriter(); |
| 36 | 36 |
| 37 // media::AudioInputController::SyncWriter implementation. | 37 // media::AudioInputController::SyncWriter implementation. |
| 38 virtual void UpdateRecordedBytes(uint32 bytes) OVERRIDE; | |
| 39 virtual void Write(const media::AudioBus* data, | 38 virtual void Write(const media::AudioBus* data, |
| 40 double volume, | 39 double volume, |
| 41 bool key_pressed) OVERRIDE; | 40 bool key_pressed, |
| 41 uint32 bytes) OVERRIDE; |
| 42 virtual void Close() OVERRIDE; | 42 virtual void Close() OVERRIDE; |
| 43 | 43 |
| 44 bool Init(); | 44 bool Init(); |
| 45 bool PrepareForeignSocketHandle(base::ProcessHandle process_handle, | 45 bool PrepareForeignSocketHandle(base::ProcessHandle process_handle, |
| 46 #if defined(OS_WIN) | 46 #if defined(OS_WIN) |
| 47 base::SyncSocket::Handle* foreign_handle); | 47 base::SyncSocket::Handle* foreign_handle); |
| 48 #else | 48 #else |
| 49 base::FileDescriptor* foreign_handle); | 49 base::FileDescriptor* foreign_handle); |
| 50 #endif | 50 #endif |
| 51 | 51 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 74 // Vector of audio buses allocated during construction and deleted in the | 74 // Vector of audio buses allocated during construction and deleted in the |
| 75 // destructor. | 75 // destructor. |
| 76 ScopedVector<media::AudioBus> audio_buses_; | 76 ScopedVector<media::AudioBus> audio_buses_; |
| 77 | 77 |
| 78 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputSyncWriter); | 78 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputSyncWriter); |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 } // namespace content | 81 } // namespace content |
| 82 | 82 |
| 83 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_ | 83 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_ |
| OLD | NEW |