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

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

Issue 9864022: Move DataSource::SetPreload() to BufferedDataSource. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: 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 void DummyDemuxer::SetPreload(Preload preload) {}
51
52 int DummyDemuxer::GetBitrate() { 50 int DummyDemuxer::GetBitrate() {
53 return 0; 51 return 0;
54 } 52 }
55 53
56 scoped_refptr<DemuxerStream> DummyDemuxer::GetStream(DemuxerStream::Type type) { 54 scoped_refptr<DemuxerStream> DummyDemuxer::GetStream(DemuxerStream::Type type) {
57 return streams_[type]; 55 return streams_[type];
58 } 56 }
59 57
60 void DummyDemuxer::set_host(DemuxerHost* demuxer_host) { 58 void DummyDemuxer::set_host(DemuxerHost* demuxer_host) {
61 Demuxer::set_host(demuxer_host); 59 Demuxer::set_host(demuxer_host);
62 host()->SetDuration(media::kInfiniteDuration()); 60 host()->SetDuration(media::kInfiniteDuration());
63 } 61 }
64 62
65 base::TimeDelta DummyDemuxer::GetStartTime() const { 63 base::TimeDelta DummyDemuxer::GetStartTime() const {
66 return base::TimeDelta(); 64 return base::TimeDelta();
67 } 65 }
68 66
69 bool DummyDemuxer::IsLocalSource() { 67 bool DummyDemuxer::IsLocalSource() {
70 return local_source_; 68 return local_source_;
71 } 69 }
72 70
73 bool DummyDemuxer::IsSeekable() { 71 bool DummyDemuxer::IsSeekable() {
74 // This is always false because DummyDemuxer is only used by WebRTC and such 72 // This is always false because DummyDemuxer is only used by WebRTC and such
75 // streams are not seekable. 73 // streams are not seekable.
76 return false; 74 return false;
77 } 75 }
78 76
79 } // namespace media 77 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698