| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // A fake media source that generates video and audio frames to a cast | 5 // A fake media source that generates video and audio frames to a cast |
| 6 // sender. | 6 // sender. |
| 7 // This class can transcode a WebM file using FFmpeg. It can also | 7 // This class can transcode a WebM file using FFmpeg. It can also |
| 8 // generate an animation and audio of fixed frequency. | 8 // generate an animation and audio of fixed frequency. |
| 9 | 9 |
| 10 #ifndef MEDIA_CAST_TEST_FAKE_MEDIA_SOURCE_H_ | 10 #ifndef MEDIA_CAST_TEST_FAKE_MEDIA_SOURCE_H_ |
| 11 #define MEDIA_CAST_TEST_FAKE_MEDIA_SOURCE_H_ | 11 #define MEDIA_CAST_TEST_FAKE_MEDIA_SOURCE_H_ |
| 12 | 12 |
| 13 #include <stdint.h> | 13 #include <stdint.h> |
| 14 | 14 |
| 15 #include <queue> | 15 #include <queue> |
| 16 | 16 |
| 17 #include "base/files/file_path.h" | 17 #include "base/files/file_path.h" |
| 18 #include "base/files/memory_mapped_file.h" | 18 #include "base/files/memory_mapped_file.h" |
| 19 #include "base/macros.h" | 19 #include "base/macros.h" |
| 20 #include "base/memory/ref_counted.h" | 20 #include "base/memory/ref_counted.h" |
| 21 #include "base/memory/weak_ptr.h" | 21 #include "base/memory/weak_ptr.h" |
| 22 #include "base/single_thread_task_runner.h" | 22 #include "base/single_thread_task_runner.h" |
| 23 #include "base/time/tick_clock.h" | 23 #include "base/time/tick_clock.h" |
| 24 #include "media/audio/audio_parameters.h" | |
| 25 #include "media/base/audio_converter.h" | 24 #include "media/base/audio_converter.h" |
| 25 #include "media/base/audio_parameters.h" |
| 26 #include "media/cast/cast_config.h" | 26 #include "media/cast/cast_config.h" |
| 27 #include "media/filters/audio_renderer_algorithm.h" | 27 #include "media/filters/audio_renderer_algorithm.h" |
| 28 #include "media/filters/ffmpeg_demuxer.h" | 28 #include "media/filters/ffmpeg_demuxer.h" |
| 29 | 29 |
| 30 struct AVCodecContext; | 30 struct AVCodecContext; |
| 31 struct AVFormatContext; | 31 struct AVFormatContext; |
| 32 | 32 |
| 33 namespace media { | 33 namespace media { |
| 34 | 34 |
| 35 class AudioBus; | 35 class AudioBus; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 // NOTE: Weak pointers must be invalidated before all other member variables. | 169 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 170 base::WeakPtrFactory<FakeMediaSource> weak_factory_; | 170 base::WeakPtrFactory<FakeMediaSource> weak_factory_; |
| 171 | 171 |
| 172 DISALLOW_COPY_AND_ASSIGN(FakeMediaSource); | 172 DISALLOW_COPY_AND_ASSIGN(FakeMediaSource); |
| 173 }; | 173 }; |
| 174 | 174 |
| 175 } // namespace cast | 175 } // namespace cast |
| 176 } // namespace media | 176 } // namespace media |
| 177 | 177 |
| 178 #endif // MEDIA_CAST_TEST_FAKE_MEDIA_SOURCE_H_ | 178 #endif // MEDIA_CAST_TEST_FAKE_MEDIA_SOURCE_H_ |
| OLD | NEW |