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

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

Issue 2668393002: Rename DemuxerStreamProvider into MediaResource (Closed)
Patch Set: rebase Created 3 years, 10 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 current_timestamp_ += duration_; 208 current_timestamp_ += duration_;
209 209
210 num_buffers_left_in_current_config_--; 210 num_buffers_left_in_current_config_--;
211 if (num_buffers_left_in_current_config_ == 0) 211 if (num_buffers_left_in_current_config_ == 0)
212 num_configs_left_--; 212 num_configs_left_--;
213 213
214 num_buffers_returned_++; 214 num_buffers_returned_++;
215 base::ResetAndReturn(&read_cb_).Run(kOk, buffer); 215 base::ResetAndReturn(&read_cb_).Run(kOk, buffer);
216 } 216 }
217 217
218 FakeDemuxerStreamProvider::FakeDemuxerStreamProvider( 218 FakeMediaResource::FakeMediaResource(int num_video_configs,
219 int num_video_configs, 219 int num_video_buffers_in_one_config,
220 int num_video_buffers_in_one_config, 220 bool is_video_encrypted)
221 bool is_video_encrypted)
222 : fake_video_stream_(num_video_configs, 221 : fake_video_stream_(num_video_configs,
223 num_video_buffers_in_one_config, 222 num_video_buffers_in_one_config,
224 is_video_encrypted) { 223 is_video_encrypted) {}
225 }
226 224
227 FakeDemuxerStreamProvider::~FakeDemuxerStreamProvider() { 225 FakeMediaResource::~FakeMediaResource() {}
228 }
229 226
230 DemuxerStream* FakeDemuxerStreamProvider::GetStream(DemuxerStream::Type type) { 227 DemuxerStream* FakeMediaResource::GetStream(DemuxerStream::Type type) {
231 if (type == DemuxerStream::Type::AUDIO) 228 if (type == DemuxerStream::Type::AUDIO)
232 return nullptr; 229 return nullptr;
233 return &fake_video_stream_; 230 return &fake_video_stream_;
234 }; 231 };
235 232
236 } // namespace media 233 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698