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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "media/base/decoder_buffer.h" | 9 #include "media/base/decoder_buffer.h" |
10 #include "media/filters/webvtt_util.h" | 10 #include "media/filters/webvtt_util.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 &FakeTextTrackStream::AbortPendingRead, base::Unretained(this))); | 31 &FakeTextTrackStream::AbortPendingRead, base::Unretained(this))); |
32 } | 32 } |
33 } | 33 } |
34 | 34 |
35 DemuxerStream::Type FakeTextTrackStream::type() { | 35 DemuxerStream::Type FakeTextTrackStream::type() { |
36 return DemuxerStream::TEXT; | 36 return DemuxerStream::TEXT; |
37 } | 37 } |
38 | 38 |
39 bool FakeTextTrackStream::SupportsConfigChanges() { return false; } | 39 bool FakeTextTrackStream::SupportsConfigChanges() { return false; } |
40 | 40 |
| 41 VideoRotation FakeTextTrackStream::video_rotation() { |
| 42 return VIDEO_ROTATION_0; |
| 43 } |
| 44 |
| 45 void FakeTextTrackStream::set_video_rotation(VideoRotation video_rotation) { |
| 46 } |
| 47 |
41 void FakeTextTrackStream::SatisfyPendingRead( | 48 void FakeTextTrackStream::SatisfyPendingRead( |
42 const base::TimeDelta& start, | 49 const base::TimeDelta& start, |
43 const base::TimeDelta& duration, | 50 const base::TimeDelta& duration, |
44 const std::string& id, | 51 const std::string& id, |
45 const std::string& content, | 52 const std::string& content, |
46 const std::string& settings) { | 53 const std::string& settings) { |
47 DCHECK(!read_cb_.is_null()); | 54 DCHECK(!read_cb_.is_null()); |
48 | 55 |
49 const uint8* const data_buf = reinterpret_cast<const uint8*>(content.data()); | 56 const uint8* const data_buf = reinterpret_cast<const uint8*>(content.data()); |
50 const int data_len = static_cast<int>(content.size()); | 57 const int data_len = static_cast<int>(content.size()); |
(...skipping 25 matching lines...) Expand all Loading... |
76 base::ResetAndReturn(&read_cb_).Run(kOk, DecoderBuffer::CreateEOSBuffer()); | 83 base::ResetAndReturn(&read_cb_).Run(kOk, DecoderBuffer::CreateEOSBuffer()); |
77 } | 84 } |
78 | 85 |
79 void FakeTextTrackStream::Stop() { | 86 void FakeTextTrackStream::Stop() { |
80 stopping_ = true; | 87 stopping_ = true; |
81 if (!read_cb_.is_null()) | 88 if (!read_cb_.is_null()) |
82 AbortPendingRead(); | 89 AbortPendingRead(); |
83 } | 90 } |
84 | 91 |
85 } // namespace media | 92 } // namespace media |
OLD | NEW |