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

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

Issue 10832285: Switch OnMoreData() to use AudioBus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Created 8 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 | Annotate | Revision Log
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_DEVICE_THREAD_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_DEVICE_THREAD_H_
6 #define MEDIA_AUDIO_AUDIO_DEVICE_THREAD_H_ 6 #define MEDIA_AUDIO_AUDIO_DEVICE_THREAD_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/shared_memory.h" 11 #include "base/shared_memory.h"
12 #include "base/sync_socket.h" 12 #include "base/sync_socket.h"
13 #include "base/synchronization/lock.h" 13 #include "base/synchronization/lock.h"
14 #include "media/base/media_export.h" 14 #include "media/base/media_export.h"
15 #include "media/audio/audio_parameters.h" 15 #include "media/audio/audio_parameters.h"
16 #include "media/audio/shared_memory_util.h"
16 17
17 class MessageLoop; 18 class MessageLoop;
18 19
19 namespace media { 20 namespace media {
20 class AudioBus; 21 class AudioBus;
21 22
22 // Data transfer between browser and render process uses a combination 23 // Data transfer between browser and render process uses a combination
23 // of sync sockets and shared memory. To read from the socket and render 24 // of sync sockets and shared memory. To read from the socket and render
24 // data, we use a worker thread, a.k.a. the AudioDeviceThread, which reads 25 // data, we use a worker thread, a.k.a. the AudioDeviceThread, which reads
25 // data from the browser via the socket and fills the shared memory from the 26 // data from the browser via the socket and fills the shared memory from the
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 103
103 base::Lock thread_lock_; 104 base::Lock thread_lock_;
104 scoped_refptr<AudioDeviceThread::Thread> thread_; 105 scoped_refptr<AudioDeviceThread::Thread> thread_;
105 106
106 DISALLOW_COPY_AND_ASSIGN(AudioDeviceThread); 107 DISALLOW_COPY_AND_ASSIGN(AudioDeviceThread);
107 }; 108 };
108 109
109 } // namespace media. 110 } // namespace media.
110 111
111 #endif // MEDIA_AUDIO_AUDIO_DEVICE_THREAD_H_ 112 #endif // MEDIA_AUDIO_AUDIO_DEVICE_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698