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 24 matching lines...) Expand all Loading... | |
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 PrepareForeignSocketHandle(base::ProcessHandle process_handle, | 45 bool PrepareForeignSocket(base::ProcessHandle process_handle, |
46 #if defined(OS_WIN) | 46 base::SyncSocket::TransitDescriptor * descriptor); |
burnik
2014/09/01 14:59:34
Nit done.
| |
47 base::SyncSocket::Handle* foreign_handle); | |
48 #else | |
49 base::FileDescriptor* foreign_handle); | |
50 #endif | |
51 | 47 |
52 private: | 48 private: |
53 base::SharedMemory* shared_memory_; | 49 base::SharedMemory* shared_memory_; |
54 uint32 shared_memory_segment_size_; | 50 uint32 shared_memory_segment_size_; |
55 uint32 shared_memory_segment_count_; | 51 uint32 shared_memory_segment_count_; |
56 uint32 current_segment_id_; | 52 uint32 current_segment_id_; |
57 | 53 |
58 // Socket for transmitting audio data. | 54 // Socket for transmitting audio data. |
59 scoped_ptr<base::CancelableSyncSocket> socket_; | 55 scoped_ptr<base::CancelableSyncSocket> socket_; |
60 | 56 |
(...skipping 13 matching lines...) Expand all Loading... | |
74 // Vector of audio buses allocated during construction and deleted in the | 70 // Vector of audio buses allocated during construction and deleted in the |
75 // destructor. | 71 // destructor. |
76 ScopedVector<media::AudioBus> audio_buses_; | 72 ScopedVector<media::AudioBus> audio_buses_; |
77 | 73 |
78 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputSyncWriter); | 74 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputSyncWriter); |
79 }; | 75 }; |
80 | 76 |
81 } // namespace content | 77 } // namespace content |
82 | 78 |
83 #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 |