| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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" | |
| 23 #include "base/platform_thread.h" | 22 #include "base/platform_thread.h" |
| 24 #include "base/scoped_ptr.h" | 23 #include "base/scoped_ptr.h" |
| 25 #include "media/base/buffers.h" | 24 #include "media/base/buffers.h" |
| 26 #include "media/base/filters.h" | 25 #include "media/base/filters.h" |
| 27 #include "media/filters/audio_renderer_base.h" | 26 #include "media/filters/audio_renderer_base.h" |
| 28 | 27 |
| 29 namespace media { | 28 namespace media { |
| 30 | 29 |
| 31 class NullAudioRenderer : public AudioRendererBase, PlatformThread::Delegate { | 30 class NullAudioRenderer : public AudioRendererBase, PlatformThread::Delegate { |
| 32 public: | 31 public: |
| (...skipping 26 matching lines...) Expand all Loading... |
| 59 | 58 |
| 60 // Shutdown flag. | 59 // Shutdown flag. |
| 61 bool shutdown_; | 60 bool shutdown_; |
| 62 | 61 |
| 63 DISALLOW_COPY_AND_ASSIGN(NullAudioRenderer); | 62 DISALLOW_COPY_AND_ASSIGN(NullAudioRenderer); |
| 64 }; | 63 }; |
| 65 | 64 |
| 66 } // namespace media | 65 } // namespace media |
| 67 | 66 |
| 68 #endif // MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ | 67 #endif // MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ |
| OLD | NEW |