OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/filters/fake_demuxer_stream.h" | 5 #include "media/filters/fake_demuxer_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 "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 } | 90 } |
91 | 91 |
92 void FakeDemuxerStream::EnableBitstreamConverter() { | 92 void FakeDemuxerStream::EnableBitstreamConverter() { |
93 DCHECK(task_runner_->BelongsToCurrentThread()); | 93 DCHECK(task_runner_->BelongsToCurrentThread()); |
94 } | 94 } |
95 | 95 |
96 bool FakeDemuxerStream::SupportsConfigChanges() { | 96 bool FakeDemuxerStream::SupportsConfigChanges() { |
97 return config_changes_; | 97 return config_changes_; |
98 } | 98 } |
99 | 99 |
| 100 VideoRotation FakeDemuxerStream::video_rotation() { |
| 101 return VIDEO_ROTATION_0; |
| 102 } |
| 103 |
| 104 void FakeDemuxerStream::set_video_rotation() { |
| 105 } |
| 106 |
100 void FakeDemuxerStream::HoldNextRead() { | 107 void FakeDemuxerStream::HoldNextRead() { |
101 DCHECK(task_runner_->BelongsToCurrentThread()); | 108 DCHECK(task_runner_->BelongsToCurrentThread()); |
102 read_to_hold_ = next_read_num_; | 109 read_to_hold_ = next_read_num_; |
103 } | 110 } |
104 | 111 |
105 void FakeDemuxerStream::HoldNextConfigChangeRead() { | 112 void FakeDemuxerStream::HoldNextConfigChangeRead() { |
106 DCHECK(task_runner_->BelongsToCurrentThread()); | 113 DCHECK(task_runner_->BelongsToCurrentThread()); |
107 // Set |read_to_hold_| to be the next config change read. | 114 // Set |read_to_hold_| to be the next config change read. |
108 read_to_hold_ = next_read_num_ + num_buffers_in_one_config_ - | 115 read_to_hold_ = next_read_num_ + num_buffers_in_one_config_ - |
109 next_read_num_ % (num_buffers_in_one_config_ + 1); | 116 next_read_num_ % (num_buffers_in_one_config_ + 1); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 193 |
187 num_buffers_left_in_current_config_--; | 194 num_buffers_left_in_current_config_--; |
188 if (num_buffers_left_in_current_config_ == 0) | 195 if (num_buffers_left_in_current_config_ == 0) |
189 num_configs_left_--; | 196 num_configs_left_--; |
190 | 197 |
191 num_buffers_returned_++; | 198 num_buffers_returned_++; |
192 base::ResetAndReturn(&read_cb_).Run(kOk, buffer); | 199 base::ResetAndReturn(&read_cb_).Run(kOk, buffer); |
193 } | 200 } |
194 | 201 |
195 } // namespace media | 202 } // namespace media |
OLD | NEW |