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

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

Issue 8661002: Fire CanPlayThrough immediately for local and streaming media files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase ToT Created 9 years 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
« no previous file with comments | « media/filters/dummy_demuxer.h ('k') | media/filters/dummy_demuxer_factory.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 14 matching lines...) Expand all
25 25
26 const VideoDecoderConfig& DummyDemuxerStream::video_decoder_config() { 26 const VideoDecoderConfig& DummyDemuxerStream::video_decoder_config() {
27 CHECK_EQ(type_, VIDEO); 27 CHECK_EQ(type_, VIDEO);
28 return video_config_; 28 return video_config_;
29 } 29 }
30 30
31 void DummyDemuxerStream::Read(const ReadCallback& read_callback) {} 31 void DummyDemuxerStream::Read(const ReadCallback& read_callback) {}
32 32
33 void DummyDemuxerStream::EnableBitstreamConverter() {} 33 void DummyDemuxerStream::EnableBitstreamConverter() {}
34 34
35 DummyDemuxer::DummyDemuxer(bool has_video, bool has_audio) 35 DummyDemuxer::DummyDemuxer(bool has_video, bool has_audio, bool local_source)
36 : has_video_(has_video), 36 : has_video_(has_video),
37 has_audio_(has_audio) { 37 has_audio_(has_audio),
38 local_source_(local_source) {
38 streams_.resize(DemuxerStream::NUM_TYPES); 39 streams_.resize(DemuxerStream::NUM_TYPES);
39 if (has_audio) 40 if (has_audio)
40 streams_[DemuxerStream::AUDIO] = 41 streams_[DemuxerStream::AUDIO] =
41 new DummyDemuxerStream(DemuxerStream::AUDIO); 42 new DummyDemuxerStream(DemuxerStream::AUDIO);
42 if (has_video) 43 if (has_video)
43 streams_[DemuxerStream::VIDEO] = 44 streams_[DemuxerStream::VIDEO] =
44 new DummyDemuxerStream(DemuxerStream::VIDEO); 45 new DummyDemuxerStream(DemuxerStream::VIDEO);
45 } 46 }
46 47
47 DummyDemuxer::~DummyDemuxer() {} 48 DummyDemuxer::~DummyDemuxer() {}
48 49
49 void DummyDemuxer::SetPreload(Preload preload) {} 50 void DummyDemuxer::SetPreload(Preload preload) {}
50 51
51 int DummyDemuxer::GetBitrate() { 52 int DummyDemuxer::GetBitrate() {
52 return 0; 53 return 0;
53 } 54 }
54 55
55 scoped_refptr<DemuxerStream> DummyDemuxer::GetStream(DemuxerStream::Type type) { 56 scoped_refptr<DemuxerStream> DummyDemuxer::GetStream(DemuxerStream::Type type) {
56 return streams_[type]; 57 return streams_[type];
57 } 58 }
58 59
59 base::TimeDelta DummyDemuxer::GetStartTime() const { 60 base::TimeDelta DummyDemuxer::GetStartTime() const {
60 return base::TimeDelta(); 61 return base::TimeDelta();
61 } 62 }
62 63
64 bool DummyDemuxer::IsLocalSource() {
65 return local_source_;
66 }
67
68 bool DummyDemuxer::IsSeekable() {
69 return false;
acolwell GONE FROM CHROMIUM 2011/12/01 04:25:00 nit: Might want to add a brief comment here mentio
70 }
71
63 } // namespace media 72 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/dummy_demuxer.h ('k') | media/filters/dummy_demuxer_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698