OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_FILTERS_NULL_AUDIO_RENDERER_H_ | 5 #ifndef MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ |
6 #define MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ | 6 #define MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ |
7 | 7 |
8 // NullAudioRenderer effectively uses an extra thread to "throw away" the | 8 // NullAudioRenderer effectively uses an extra thread to "throw away" the |
9 // audio data at a rate resembling normal playback speed. It's just like | 9 // audio data at a rate resembling normal playback speed. It's just like |
10 // decoding to /dev/null! | 10 // decoding to /dev/null! |
11 // | 11 // |
12 // NullAudioRenderer can also be used in situations where the client has no | 12 // NullAudioRenderer can also be used in situations where the client has no |
13 // audio device or we haven't written an audio implementation for a particular | 13 // audio device or we haven't written an audio implementation for a particular |
14 // platform yet. | 14 // platform yet. |
15 | 15 |
16 #include <deque> | 16 #include <deque> |
17 | 17 |
18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
19 #include "base/threading/platform_thread.h" | 19 #include "base/threading/platform_thread.h" |
20 #include "media/base/buffers.h" | 20 #include "media/base/buffers.h" |
21 #include "media/base/filters.h" | 21 #include "media/base/filters.h" |
22 #include "media/filters/audio_renderer_base.h" | 22 #include "media/filters/audio_renderer_base.h" |
23 | 23 |
24 namespace media { | 24 namespace media { |
25 | 25 |
26 class MEDIA_EXPORT NullAudioRenderer | 26 class NullAudioRenderer |
27 : public AudioRendererBase, | 27 : public AudioRendererBase, |
28 public base::PlatformThread::Delegate { | 28 public base::PlatformThread::Delegate { |
29 public: | 29 public: |
30 NullAudioRenderer(); | 30 NullAudioRenderer(); |
31 virtual ~NullAudioRenderer(); | 31 virtual ~NullAudioRenderer(); |
32 | 32 |
33 // AudioRenderer implementation. | 33 // AudioRenderer implementation. |
34 virtual void SetVolume(float volume); | 34 virtual void SetVolume(float volume); |
35 | 35 |
36 // PlatformThread::Delegate implementation. | 36 // PlatformThread::Delegate implementation. |
(...skipping 18 matching lines...) Expand all Loading... |
55 | 55 |
56 // Shutdown flag. | 56 // Shutdown flag. |
57 bool shutdown_; | 57 bool shutdown_; |
58 | 58 |
59 DISALLOW_COPY_AND_ASSIGN(NullAudioRenderer); | 59 DISALLOW_COPY_AND_ASSIGN(NullAudioRenderer); |
60 }; | 60 }; |
61 | 61 |
62 } // namespace media | 62 } // namespace media |
63 | 63 |
64 #endif // MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ | 64 #endif // MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ |
OLD | NEW |