Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: media/base/fake_demuxer_stream.cc

Issue 1935873002: Implement disabling and enabling media tracks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@track-control2
Patch Set: Updated comments + dchecks in ffmpeg demux stream Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 98
99 bool FakeDemuxerStream::SupportsConfigChanges() { 99 bool FakeDemuxerStream::SupportsConfigChanges() {
100 return config_changes_; 100 return config_changes_;
101 } 101 }
102 102
103 VideoRotation FakeDemuxerStream::video_rotation() { 103 VideoRotation FakeDemuxerStream::video_rotation() {
104 return VIDEO_ROTATION_0; 104 return VIDEO_ROTATION_0;
105 } 105 }
106 106
107 bool FakeDemuxerStream::enabled() const {
108 return true;
109 }
110
111 void FakeDemuxerStream::set_enabled(bool enabled, base::TimeDelta timestamp) {}
chcunningham 2016/06/02 23:49:42 ditto for the other fakes
chcunningham 2016/06/02 23:49:42 NOTIMPLEMENTED()
112
107 void FakeDemuxerStream::HoldNextRead() { 113 void FakeDemuxerStream::HoldNextRead() {
108 DCHECK(task_runner_->BelongsToCurrentThread()); 114 DCHECK(task_runner_->BelongsToCurrentThread());
109 read_to_hold_ = next_read_num_; 115 read_to_hold_ = next_read_num_;
110 } 116 }
111 117
112 void FakeDemuxerStream::HoldNextConfigChangeRead() { 118 void FakeDemuxerStream::HoldNextConfigChangeRead() {
113 DCHECK(task_runner_->BelongsToCurrentThread()); 119 DCHECK(task_runner_->BelongsToCurrentThread());
114 // Set |read_to_hold_| to be the next config change read. 120 // Set |read_to_hold_| to be the next config change read.
115 read_to_hold_ = next_read_num_ + num_buffers_in_one_config_ - 121 read_to_hold_ = next_read_num_ + num_buffers_in_one_config_ -
116 next_read_num_ % (num_buffers_in_one_config_ + 1); 122 next_read_num_ % (num_buffers_in_one_config_ + 1);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 FakeDemuxerStreamProvider::~FakeDemuxerStreamProvider() { 223 FakeDemuxerStreamProvider::~FakeDemuxerStreamProvider() {
218 } 224 }
219 225
220 DemuxerStream* FakeDemuxerStreamProvider::GetStream(DemuxerStream::Type type) { 226 DemuxerStream* FakeDemuxerStreamProvider::GetStream(DemuxerStream::Type type) {
221 if (type == DemuxerStream::Type::AUDIO) 227 if (type == DemuxerStream::Type::AUDIO)
222 return nullptr; 228 return nullptr;
223 return &fake_video_stream_; 229 return &fake_video_stream_;
224 }; 230 };
225 231
226 } // namespace media 232 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698