| 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 #include "media/base/fake_text_track_stream.h" | 5 #include "media/base/fake_text_track_stream.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 DemuxerStream::Type FakeTextTrackStream::type() const { | 39 DemuxerStream::Type FakeTextTrackStream::type() const { |
| 40 return DemuxerStream::TEXT; | 40 return DemuxerStream::TEXT; |
| 41 } | 41 } |
| 42 | 42 |
| 43 bool FakeTextTrackStream::SupportsConfigChanges() { return false; } | 43 bool FakeTextTrackStream::SupportsConfigChanges() { return false; } |
| 44 | 44 |
| 45 VideoRotation FakeTextTrackStream::video_rotation() { | 45 VideoRotation FakeTextTrackStream::video_rotation() { |
| 46 return VIDEO_ROTATION_0; | 46 return VIDEO_ROTATION_0; |
| 47 } | 47 } |
| 48 | 48 |
| 49 bool FakeTextTrackStream::enabled() const { |
| 50 return true; |
| 51 } |
| 52 |
| 53 void FakeTextTrackStream::set_enabled(bool enabled, base::TimeDelta timestamp) { |
| 54 NOTIMPLEMENTED(); |
| 55 } |
| 56 |
| 57 void FakeTextTrackStream::SetStreamRestartedCB(const StreamRestartedCB& cb) { |
| 58 NOTIMPLEMENTED(); |
| 59 } |
| 60 |
| 49 void FakeTextTrackStream::SatisfyPendingRead( | 61 void FakeTextTrackStream::SatisfyPendingRead( |
| 50 const base::TimeDelta& start, | 62 const base::TimeDelta& start, |
| 51 const base::TimeDelta& duration, | 63 const base::TimeDelta& duration, |
| 52 const std::string& id, | 64 const std::string& id, |
| 53 const std::string& content, | 65 const std::string& content, |
| 54 const std::string& settings) { | 66 const std::string& settings) { |
| 55 DCHECK(!read_cb_.is_null()); | 67 DCHECK(!read_cb_.is_null()); |
| 56 | 68 |
| 57 const uint8_t* const data_buf = | 69 const uint8_t* const data_buf = |
| 58 reinterpret_cast<const uint8_t*>(content.data()); | 70 reinterpret_cast<const uint8_t*>(content.data()); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 88 base::ResetAndReturn(&read_cb_).Run(kOk, DecoderBuffer::CreateEOSBuffer()); | 100 base::ResetAndReturn(&read_cb_).Run(kOk, DecoderBuffer::CreateEOSBuffer()); |
| 89 } | 101 } |
| 90 | 102 |
| 91 void FakeTextTrackStream::Stop() { | 103 void FakeTextTrackStream::Stop() { |
| 92 stopping_ = true; | 104 stopping_ = true; |
| 93 if (!read_cb_.is_null()) | 105 if (!read_cb_.is_null()) |
| 94 AbortPendingRead(); | 106 AbortPendingRead(); |
| 95 } | 107 } |
| 96 | 108 |
| 97 } // namespace media | 109 } // namespace media |
| OLD | NEW |