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::SatisfyPendingRead( | 49 void FakeTextTrackStream::SatisfyPendingRead( |
58 const base::TimeDelta& start, | 50 const base::TimeDelta& start, |
59 const base::TimeDelta& duration, | 51 const base::TimeDelta& duration, |
60 const std::string& id, | 52 const std::string& id, |
61 const std::string& content, | 53 const std::string& content, |
62 const std::string& settings) { | 54 const std::string& settings) { |
63 DCHECK(!read_cb_.is_null()); | 55 DCHECK(!read_cb_.is_null()); |
64 | 56 |
65 const uint8_t* const data_buf = | 57 const uint8_t* const data_buf = |
66 reinterpret_cast<const uint8_t*>(content.data()); | 58 reinterpret_cast<const uint8_t*>(content.data()); |
(...skipping 29 matching lines...) Expand all Loading... |
96 base::ResetAndReturn(&read_cb_).Run(kOk, DecoderBuffer::CreateEOSBuffer()); | 88 base::ResetAndReturn(&read_cb_).Run(kOk, DecoderBuffer::CreateEOSBuffer()); |
97 } | 89 } |
98 | 90 |
99 void FakeTextTrackStream::Stop() { | 91 void FakeTextTrackStream::Stop() { |
100 stopping_ = true; | 92 stopping_ = true; |
101 if (!read_cb_.is_null()) | 93 if (!read_cb_.is_null()) |
102 AbortPendingRead(); | 94 AbortPendingRead(); |
103 } | 95 } |
104 | 96 |
105 } // namespace media | 97 } // namespace media |
OLD | NEW |