| 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/base/fake_demuxer_stream.h" | 5 #include "media/base/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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 } | 91 } |
| 92 | 92 |
| 93 bool FakeDemuxerStream::SupportsConfigChanges() { | 93 bool FakeDemuxerStream::SupportsConfigChanges() { |
| 94 return config_changes_; | 94 return config_changes_; |
| 95 } | 95 } |
| 96 | 96 |
| 97 VideoRotation FakeDemuxerStream::video_rotation() { | 97 VideoRotation FakeDemuxerStream::video_rotation() { |
| 98 return VIDEO_ROTATION_0; | 98 return VIDEO_ROTATION_0; |
| 99 } | 99 } |
| 100 | 100 |
| 101 size_t FakeDemuxerStream::GetMemoryLimit() const { |
| 102 NOTIMPLEMENTED(); |
| 103 return 0; |
| 104 } |
| 105 |
| 106 void FakeDemuxerStream::SetMemoryLimit(size_t memory_limit) { |
| 107 NOTIMPLEMENTED(); |
| 108 } |
| 109 |
| 101 void FakeDemuxerStream::HoldNextRead() { | 110 void FakeDemuxerStream::HoldNextRead() { |
| 102 DCHECK(task_runner_->BelongsToCurrentThread()); | 111 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 103 read_to_hold_ = next_read_num_; | 112 read_to_hold_ = next_read_num_; |
| 104 } | 113 } |
| 105 | 114 |
| 106 void FakeDemuxerStream::HoldNextConfigChangeRead() { | 115 void FakeDemuxerStream::HoldNextConfigChangeRead() { |
| 107 DCHECK(task_runner_->BelongsToCurrentThread()); | 116 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 108 // Set |read_to_hold_| to be the next config change read. | 117 // Set |read_to_hold_| to be the next config change read. |
| 109 read_to_hold_ = next_read_num_ + num_buffers_in_one_config_ - | 118 read_to_hold_ = next_read_num_ + num_buffers_in_one_config_ - |
| 110 next_read_num_ % (num_buffers_in_one_config_ + 1); | 119 next_read_num_ % (num_buffers_in_one_config_ + 1); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 FakeDemuxerStreamProvider::~FakeDemuxerStreamProvider() { | 214 FakeDemuxerStreamProvider::~FakeDemuxerStreamProvider() { |
| 206 } | 215 } |
| 207 | 216 |
| 208 DemuxerStream* FakeDemuxerStreamProvider::GetStream(DemuxerStream::Type type) { | 217 DemuxerStream* FakeDemuxerStreamProvider::GetStream(DemuxerStream::Type type) { |
| 209 if (type == DemuxerStream::Type::AUDIO) | 218 if (type == DemuxerStream::Type::AUDIO) |
| 210 return nullptr; | 219 return nullptr; |
| 211 return &fake_video_stream_; | 220 return &fake_video_stream_; |
| 212 }; | 221 }; |
| 213 | 222 |
| 214 } // namespace media | 223 } // namespace media |
| OLD | NEW |