OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // AudioRendererHost serves audio related requests from AudioRenderer which | 5 // AudioRendererHost serves audio related requests from AudioRenderer which |
6 // lives inside the render process and provide access to audio hardware. It maps | 6 // lives inside the render process and provide access to audio hardware. It maps |
7 // an internal ID to AudioRendererHost::IPCAudioSource in a map, which is the | 7 // an internal ID to AudioRendererHost::IPCAudioSource in a map, which is the |
8 // actual object providing audio packets through IPC. It creates the actual | 8 // actual object providing audio packets through IPC. It creates the actual |
9 // AudioOutputStream object when requested by the renderer provided with | 9 // AudioOutputStream object when requested by the renderer provided with |
10 // render view id and stream id. | 10 // render view id and stream id. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 #define CHROME_BROWSER_RENDERER_HOST_AUDIO_RENDERER_HOST_H_ | 68 #define CHROME_BROWSER_RENDERER_HOST_AUDIO_RENDERER_HOST_H_ |
69 | 69 |
70 #include <map> | 70 #include <map> |
71 #include <deque> | 71 #include <deque> |
72 | 72 |
73 #include "base/lock.h" | 73 #include "base/lock.h" |
74 #include "base/process.h" | 74 #include "base/process.h" |
75 #include "base/ref_counted.h" | 75 #include "base/ref_counted.h" |
76 #include "base/shared_memory.h" | 76 #include "base/shared_memory.h" |
77 #include "base/waitable_event.h" | 77 #include "base/waitable_event.h" |
78 #include "chrome/common/ipc_message.h" | 78 #include "ipc/ipc_message.h" |
79 #include "media/audio/audio_output.h" | 79 #include "media/audio/audio_output.h" |
80 #include "media/audio/simple_sources.h" | 80 #include "media/audio/simple_sources.h" |
81 #include "testing/gtest/include/gtest/gtest_prod.h" | 81 #include "testing/gtest/include/gtest/gtest_prod.h" |
82 | 82 |
83 class AudioManager; | 83 class AudioManager; |
84 class MessageLoop; | 84 class MessageLoop; |
85 struct ViewHostMsg_Audio_CreateStream; | 85 struct ViewHostMsg_Audio_CreateStream; |
86 | 86 |
87 class AudioRendererHost : public base::RefCountedThreadSafe<AudioRendererHost> { | 87 class AudioRendererHost : public base::RefCountedThreadSafe<AudioRendererHost> { |
88 private: | 88 private: |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 typedef std::pair<int32, int32> SourceID; | 344 typedef std::pair<int32, int32> SourceID; |
345 typedef std::map<SourceID, IPCAudioSource*> SourceMap; | 345 typedef std::map<SourceID, IPCAudioSource*> SourceMap; |
346 SourceMap sources_; | 346 SourceMap sources_; |
347 | 347 |
348 MessageLoop* io_loop_; | 348 MessageLoop* io_loop_; |
349 | 349 |
350 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); | 350 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); |
351 }; | 351 }; |
352 | 352 |
353 #endif // CHROME_BROWSER_RENDERER_HOST_AUDIO_RENDERER_HOST_H_ | 353 #endif // CHROME_BROWSER_RENDERER_HOST_AUDIO_RENDERER_HOST_H_ |
OLD | NEW |