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_SYNC_READER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_ |
7 | 7 |
8 #include "base/process/process.h" | 8 #include "base/process/process.h" |
9 #include "base/sync_socket.h" | 9 #include "base/sync_socket.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 // process. | 28 // process. |
29 class AudioSyncReader : public media::AudioOutputController::SyncReader { | 29 class AudioSyncReader : public media::AudioOutputController::SyncReader { |
30 public: | 30 public: |
31 AudioSyncReader(base::SharedMemory* shared_memory, | 31 AudioSyncReader(base::SharedMemory* shared_memory, |
32 const media::AudioParameters& params); | 32 const media::AudioParameters& params); |
33 | 33 |
34 virtual ~AudioSyncReader(); | 34 virtual ~AudioSyncReader(); |
35 | 35 |
36 // media::AudioOutputController::SyncReader implementations. | 36 // media::AudioOutputController::SyncReader implementations. |
37 virtual void UpdatePendingBytes(uint32 bytes) OVERRIDE; | 37 virtual void UpdatePendingBytes(uint32 bytes) OVERRIDE; |
38 virtual void Read(const media::AudioBus* source, | 38 virtual void Read(media::AudioBus* dest) OVERRIDE; |
39 media::AudioBus* dest) OVERRIDE; | |
40 virtual void Close() OVERRIDE; | 39 virtual void Close() OVERRIDE; |
41 | 40 |
42 bool Init(); | 41 bool Init(); |
43 bool PrepareForeignSocketHandle(base::ProcessHandle process_handle, | 42 bool PrepareForeignSocketHandle(base::ProcessHandle process_handle, |
44 #if defined(OS_WIN) | 43 #if defined(OS_WIN) |
45 base::SyncSocket::Handle* foreign_handle); | 44 base::SyncSocket::Handle* foreign_handle); |
46 #else | 45 #else |
47 base::FileDescriptor* foreign_handle); | 46 base::FileDescriptor* foreign_handle); |
48 #endif | 47 #endif |
49 | 48 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // The index of the audio buffer we're expecting to be sent from the renderer; | 82 // The index of the audio buffer we're expecting to be sent from the renderer; |
84 // used to block with timeout for audio data. | 83 // used to block with timeout for audio data. |
85 uint32 buffer_index_; | 84 uint32 buffer_index_; |
86 | 85 |
87 DISALLOW_COPY_AND_ASSIGN(AudioSyncReader); | 86 DISALLOW_COPY_AND_ASSIGN(AudioSyncReader); |
88 }; | 87 }; |
89 | 88 |
90 } // namespace content | 89 } // namespace content |
91 | 90 |
92 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_ | 91 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_ |
OLD | NEW |