| OLD | NEW |
| 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_NULL_AUDIO_SINK_H_ | 5 #ifndef MEDIA_AUDIO_NULL_AUDIO_SINK_H_ |
| 6 #define MEDIA_AUDIO_NULL_AUDIO_SINK_H_ | 6 #define MEDIA_AUDIO_NULL_AUDIO_SINK_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "media/base/audio_renderer_sink.h" | 12 #include "media/base/audio_renderer_sink.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 class SingleThreadTaskRunner; | 15 class SingleThreadTaskRunner; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace media { | 18 namespace media { |
| 19 class AudioBus; | 19 class AudioBus; |
| 20 class AudioHash; | 20 class AudioHash; |
| 21 class FakeAudioWorker; | 21 class FakeAudioWorker; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 50 private: | 50 private: |
| 51 // Task that periodically calls Render() to consume audio data. | 51 // Task that periodically calls Render() to consume audio data. |
| 52 void CallRender(); | 52 void CallRender(); |
| 53 | 53 |
| 54 bool initialized_; | 54 bool initialized_; |
| 55 bool started_; | 55 bool started_; |
| 56 bool playing_; | 56 bool playing_; |
| 57 RenderCallback* callback_; | 57 RenderCallback* callback_; |
| 58 | 58 |
| 59 // Controls whether or not a running hash is computed for audio frames. | 59 // Controls whether or not a running hash is computed for audio frames. |
| 60 scoped_ptr<AudioHash> audio_hash_; | 60 std::unique_ptr<AudioHash> audio_hash_; |
| 61 | 61 |
| 62 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 62 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 63 scoped_ptr<FakeAudioWorker> fake_worker_; | 63 std::unique_ptr<FakeAudioWorker> fake_worker_; |
| 64 scoped_ptr<AudioBus> audio_bus_; | 64 std::unique_ptr<AudioBus> audio_bus_; |
| 65 | 65 |
| 66 DISALLOW_COPY_AND_ASSIGN(NullAudioSink); | 66 DISALLOW_COPY_AND_ASSIGN(NullAudioSink); |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 } // namespace media | 69 } // namespace media |
| 70 | 70 |
| 71 #endif // MEDIA_AUDIO_NULL_AUDIO_SINK_H_ | 71 #endif // MEDIA_AUDIO_NULL_AUDIO_SINK_H_ |
| OLD | NEW |