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

Side by Side Diff: media/filters/dummy_demuxer.cc

Issue 9860027: Remove DemuxerFactory and URL parameter from Pipeline. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: added some todos Created 8 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/filters/dummy_demuxer.h" 5 #include "media/filters/dummy_demuxer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace media { 9 namespace media {
10 10
(...skipping 29 matching lines...) Expand all
40 if (has_audio) 40 if (has_audio)
41 streams_[DemuxerStream::AUDIO] = 41 streams_[DemuxerStream::AUDIO] =
42 new DummyDemuxerStream(DemuxerStream::AUDIO); 42 new DummyDemuxerStream(DemuxerStream::AUDIO);
43 if (has_video) 43 if (has_video)
44 streams_[DemuxerStream::VIDEO] = 44 streams_[DemuxerStream::VIDEO] =
45 new DummyDemuxerStream(DemuxerStream::VIDEO); 45 new DummyDemuxerStream(DemuxerStream::VIDEO);
46 } 46 }
47 47
48 DummyDemuxer::~DummyDemuxer() {} 48 DummyDemuxer::~DummyDemuxer() {}
49 49
50 int DummyDemuxer::GetBitrate() { 50 void DummyDemuxer::Initialize(const PipelineStatusCB& status_cb) {
51 return 0; 51 status_cb.Run(PIPELINE_OK);
52 } 52 }
53 53
54 scoped_refptr<DemuxerStream> DummyDemuxer::GetStream(DemuxerStream::Type type) { 54 scoped_refptr<DemuxerStream> DummyDemuxer::GetStream(DemuxerStream::Type type) {
55 return streams_[type]; 55 return streams_[type];
56 } 56 }
57 57
58 void DummyDemuxer::set_host(DemuxerHost* demuxer_host) { 58 void DummyDemuxer::set_host(DemuxerHost* demuxer_host) {
59 Demuxer::set_host(demuxer_host); 59 Demuxer::set_host(demuxer_host);
60 host()->SetDuration(media::kInfiniteDuration()); 60 host()->SetDuration(media::kInfiniteDuration());
61 } 61 }
62 62
63 base::TimeDelta DummyDemuxer::GetStartTime() const { 63 base::TimeDelta DummyDemuxer::GetStartTime() const {
64 return base::TimeDelta(); 64 return base::TimeDelta();
65 } 65 }
66 66
67 int DummyDemuxer::GetBitrate() {
68 return 0;
69 }
70
67 bool DummyDemuxer::IsLocalSource() { 71 bool DummyDemuxer::IsLocalSource() {
68 return local_source_; 72 return local_source_;
69 } 73 }
70 74
71 bool DummyDemuxer::IsSeekable() { 75 bool DummyDemuxer::IsSeekable() {
72 // This is always false because DummyDemuxer is only used by WebRTC and such 76 // This is always false because DummyDemuxer is only used by WebRTC and such
73 // streams are not seekable. 77 // streams are not seekable.
74 return false; 78 return false;
75 } 79 }
76 80
77 } // namespace media 81 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698