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 #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 // It supports any type of MediaFormat as long as the mime type has been set to | 16 // It supports any type of MediaFormat as long as the mime type has been set to |
17 // audio/x-uncompressed. Playback rate is also supported and NullAudioRenderer | 17 // audio/x-uncompressed. Playback rate is also supported and NullAudioRenderer |
18 // will slow down and speed up accordingly. | 18 // will slow down and speed up accordingly. |
19 | 19 |
20 #include <deque> | 20 #include <deque> |
21 | 21 |
22 #include "base/lock.h" | 22 #include "base/lock.h" |
23 #include "base/platform_thread.h" | 23 #include "base/platform_thread.h" |
| 24 #include "base/scoped_ptr.h" |
24 #include "media/base/buffers.h" | 25 #include "media/base/buffers.h" |
25 #include "media/base/factory.h" | 26 #include "media/base/factory.h" |
26 #include "media/base/filters.h" | 27 #include "media/base/filters.h" |
27 #include "media/filters/audio_renderer_base.h" | 28 #include "media/filters/audio_renderer_base.h" |
28 | 29 |
29 namespace media { | 30 namespace media { |
30 | 31 |
31 class NullAudioRenderer : public AudioRendererBase, PlatformThread::Delegate { | 32 class NullAudioRenderer : public AudioRendererBase, PlatformThread::Delegate { |
32 public: | 33 public: |
33 // FilterFactory provider. | 34 // FilterFactory provider. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 76 |
76 // Shutdown flag. | 77 // Shutdown flag. |
77 bool shutdown_; | 78 bool shutdown_; |
78 | 79 |
79 DISALLOW_COPY_AND_ASSIGN(NullAudioRenderer); | 80 DISALLOW_COPY_AND_ASSIGN(NullAudioRenderer); |
80 }; | 81 }; |
81 | 82 |
82 } // namespace media | 83 } // namespace media |
83 | 84 |
84 #endif // MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ | 85 #endif // MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ |
OLD | NEW |