| 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; | 38 virtual void UpdateRecordedBytes(uint32 bytes) override; |
| 39 virtual void Write(const media::AudioBus* data, | 39 virtual void Write(const media::AudioBus* data, |
| 40 double volume, | 40 double volume, |
| 41 bool key_pressed) OVERRIDE; | 41 bool key_pressed) override; |
| 42 virtual void Close() OVERRIDE; | 42 virtual void Close() override; |
| 43 | 43 |
| 44 bool Init(); | 44 bool Init(); |
| 45 bool PrepareForeignSocket(base::ProcessHandle process_handle, | 45 bool PrepareForeignSocket(base::ProcessHandle process_handle, |
| 46 base::SyncSocket::TransitDescriptor* descriptor); | 46 base::SyncSocket::TransitDescriptor* descriptor); |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 base::SharedMemory* shared_memory_; | 49 base::SharedMemory* shared_memory_; |
| 50 uint32 shared_memory_segment_size_; | 50 uint32 shared_memory_segment_size_; |
| 51 uint32 shared_memory_segment_count_; | 51 uint32 shared_memory_segment_count_; |
| 52 uint32 current_segment_id_; | 52 uint32 current_segment_id_; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 70 // Vector of audio buses allocated during construction and deleted in the | 70 // Vector of audio buses allocated during construction and deleted in the |
| 71 // destructor. | 71 // destructor. |
| 72 ScopedVector<media::AudioBus> audio_buses_; | 72 ScopedVector<media::AudioBus> audio_buses_; |
| 73 | 73 |
| 74 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputSyncWriter); | 74 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputSyncWriter); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace content | 77 } // namespace content |
| 78 | 78 |
| 79 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_ | 79 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_ |
| OLD | NEW |