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

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: rebase Created 4 years, 5 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
« no previous file with comments | « media/base/fake_demuxer_stream.h ('k') | media/base/fake_text_track_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
112 NOTIMPLEMENTED();
113 }
114
115 void FakeDemuxerStream::SetStreamRestartedCB(const StreamRestartedCB& cb) {
116 NOTIMPLEMENTED();
117 }
118
107 void FakeDemuxerStream::HoldNextRead() { 119 void FakeDemuxerStream::HoldNextRead() {
108 DCHECK(task_runner_->BelongsToCurrentThread()); 120 DCHECK(task_runner_->BelongsToCurrentThread());
109 read_to_hold_ = next_read_num_; 121 read_to_hold_ = next_read_num_;
110 } 122 }
111 123
112 void FakeDemuxerStream::HoldNextConfigChangeRead() { 124 void FakeDemuxerStream::HoldNextConfigChangeRead() {
113 DCHECK(task_runner_->BelongsToCurrentThread()); 125 DCHECK(task_runner_->BelongsToCurrentThread());
114 // Set |read_to_hold_| to be the next config change read. 126 // Set |read_to_hold_| to be the next config change read.
115 read_to_hold_ = next_read_num_ + num_buffers_in_one_config_ - 127 read_to_hold_ = next_read_num_ + num_buffers_in_one_config_ -
116 next_read_num_ % (num_buffers_in_one_config_ + 1); 128 next_read_num_ % (num_buffers_in_one_config_ + 1);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 FakeDemuxerStreamProvider::~FakeDemuxerStreamProvider() { 229 FakeDemuxerStreamProvider::~FakeDemuxerStreamProvider() {
218 } 230 }
219 231
220 DemuxerStream* FakeDemuxerStreamProvider::GetStream(DemuxerStream::Type type) { 232 DemuxerStream* FakeDemuxerStreamProvider::GetStream(DemuxerStream::Type type) {
221 if (type == DemuxerStream::Type::AUDIO) 233 if (type == DemuxerStream::Type::AUDIO)
222 return nullptr; 234 return nullptr;
223 return &fake_video_stream_; 235 return &fake_video_stream_;
224 }; 236 };
225 237
226 } // namespace media 238 } // namespace media
OLDNEW
« no previous file with comments | « media/base/fake_demuxer_stream.h ('k') | media/base/fake_text_track_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698