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

Unified Diff: media/base/fake_demuxer_stream.cc

Issue 2491043003: MediaResource refactoring to support multiple streams (Closed)
Patch Set: rebase Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: media/base/fake_demuxer_stream.cc
diff --git a/media/base/fake_demuxer_stream.cc b/media/base/fake_demuxer_stream.cc
index 54de722fde2e527e7e3ee7b1440866ea9e5642f6..b15990d69130ebd92fd0ea6a149119ce65900e7a 100644
--- a/media/base/fake_demuxer_stream.cc
+++ b/media/base/fake_demuxer_stream.cc
@@ -111,11 +111,6 @@ void FakeDemuxerStream::set_enabled(bool enabled, base::TimeDelta timestamp) {
NOTIMPLEMENTED();
}
-void FakeDemuxerStream::SetStreamStatusChangeCB(
- const StreamStatusChangeCB& cb) {
- NOTIMPLEMENTED();
-}
-
void FakeDemuxerStream::HoldNextRead() {
DCHECK(task_runner_->BelongsToCurrentThread());
read_to_hold_ = next_read_num_;
@@ -215,22 +210,25 @@ void FakeDemuxerStream::DoRead() {
base::ResetAndReturn(&read_cb_).Run(kOk, buffer);
}
-FakeDemuxerStreamProvider::FakeDemuxerStreamProvider(
- int num_video_configs,
- int num_video_buffers_in_one_config,
- bool is_video_encrypted)
+FakeMediaResource::FakeMediaResource(int num_video_configs,
+ int num_video_buffers_in_one_config,
+ bool is_video_encrypted)
: fake_video_stream_(num_video_configs,
num_video_buffers_in_one_config,
- is_video_encrypted) {
+ is_video_encrypted) {}
+
+FakeMediaResource::~FakeMediaResource() {}
+
+std::vector<DemuxerStream*> FakeMediaResource::GetStreams() {
+ std::vector<DemuxerStream*> result;
+ result.push_back(&fake_video_stream_);
+ return result;
}
-FakeDemuxerStreamProvider::~FakeDemuxerStreamProvider() {
+void FakeMediaResource::SetStreamStatusChangeCB(
+ const StreamStatusChangeCB& cb) {
+ NOTIMPLEMENTED();
}
-DemuxerStream* FakeDemuxerStreamProvider::GetStream(DemuxerStream::Type type) {
- if (type == DemuxerStream::Type::AUDIO)
- return nullptr;
- return &fake_video_stream_;
-};
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698