| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BASE_FAKE_TEXT_TRACK_STREAM_H_ | 5 #ifndef MEDIA_BASE_FAKE_TEXT_TRACK_STREAM_H_ |
| 6 #define MEDIA_BASE_FAKE_TEXT_TRACK_STREAM_H_ | 6 #define MEDIA_BASE_FAKE_TEXT_TRACK_STREAM_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "media/base/audio_decoder_config.h" | 10 #include "media/base/audio_decoder_config.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 ~FakeTextTrackStream() override; | 22 ~FakeTextTrackStream() override; |
| 23 | 23 |
| 24 // DemuxerStream implementation. | 24 // DemuxerStream implementation. |
| 25 void Read(const ReadCB&) override; | 25 void Read(const ReadCB&) override; |
| 26 MOCK_METHOD0(audio_decoder_config, AudioDecoderConfig()); | 26 MOCK_METHOD0(audio_decoder_config, AudioDecoderConfig()); |
| 27 MOCK_METHOD0(video_decoder_config, VideoDecoderConfig()); | 27 MOCK_METHOD0(video_decoder_config, VideoDecoderConfig()); |
| 28 Type type() const override; | 28 Type type() const override; |
| 29 MOCK_METHOD0(EnableBitstreamConverter, void()); | 29 MOCK_METHOD0(EnableBitstreamConverter, void()); |
| 30 bool SupportsConfigChanges() override; | 30 bool SupportsConfigChanges() override; |
| 31 VideoRotation video_rotation() override; | 31 VideoRotation video_rotation() override; |
| 32 bool enabled() const override { return true; } |
| 33 void set_enabled(bool enabled, base::TimeDelta timestamp) override {} |
| 32 | 34 |
| 33 void SatisfyPendingRead(const base::TimeDelta& start, | 35 void SatisfyPendingRead(const base::TimeDelta& start, |
| 34 const base::TimeDelta& duration, | 36 const base::TimeDelta& duration, |
| 35 const std::string& id, | 37 const std::string& id, |
| 36 const std::string& content, | 38 const std::string& content, |
| 37 const std::string& settings); | 39 const std::string& settings); |
| 38 void AbortPendingRead(); | 40 void AbortPendingRead(); |
| 39 void SendEosNotification(); | 41 void SendEosNotification(); |
| 40 | 42 |
| 41 void Stop(); | 43 void Stop(); |
| 42 | 44 |
| 43 MOCK_METHOD0(OnRead, void()); | 45 MOCK_METHOD0(OnRead, void()); |
| 44 | 46 |
| 45 private: | 47 private: |
| 46 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 48 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 47 ReadCB read_cb_; | 49 ReadCB read_cb_; |
| 48 bool stopping_; | 50 bool stopping_; |
| 49 | 51 |
| 50 DISALLOW_COPY_AND_ASSIGN(FakeTextTrackStream); | 52 DISALLOW_COPY_AND_ASSIGN(FakeTextTrackStream); |
| 51 }; | 53 }; |
| 52 | 54 |
| 53 } // namespace media | 55 } // namespace media |
| 54 | 56 |
| 55 #endif // MEDIA_BASE_FAKE_TEXT_TRACK_STREAM_H_ | 57 #endif // MEDIA_BASE_FAKE_TEXT_TRACK_STREAM_H_ |
| OLD | NEW |