OLD | NEW |
---|---|
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/chunk_demuxer.h" | 5 #include "media/filters/chunk_demuxer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 22 matching lines...) Expand all Loading... | |
33 typedef StreamParser* (*ParserFactoryFunction)( | 33 typedef StreamParser* (*ParserFactoryFunction)( |
34 const std::vector<std::string>& codecs); | 34 const std::vector<std::string>& codecs); |
35 | 35 |
36 struct SupportedTypeInfo { | 36 struct SupportedTypeInfo { |
37 const char* type; | 37 const char* type; |
38 const ParserFactoryFunction factory_function; | 38 const ParserFactoryFunction factory_function; |
39 const CodecInfo** codecs; | 39 const CodecInfo** codecs; |
40 }; | 40 }; |
41 | 41 |
42 static const CodecInfo kVP8CodecInfo = { "vp8", DemuxerStream::VIDEO }; | 42 static const CodecInfo kVP8CodecInfo = { "vp8", DemuxerStream::VIDEO }; |
43 static const CodecInfo kVP9CodecInfo = { "vp9", DemuxerStream::VIDEO }; | |
43 static const CodecInfo kVorbisCodecInfo = { "vorbis", DemuxerStream::AUDIO }; | 44 static const CodecInfo kVorbisCodecInfo = { "vorbis", DemuxerStream::AUDIO }; |
44 | 45 |
45 static const CodecInfo* kVideoWebMCodecs[] = { | 46 static const CodecInfo* kVideoWebMCodecs[] = { |
46 &kVP8CodecInfo, | 47 &kVP8CodecInfo, |
48 &kVP9CodecInfo, | |
scherkus (not reviewing)
2012/12/18 01:01:56
if vp9 isn't expected to work with media source, t
Tom Finegan
2012/12/18 01:47:42
Forgot to remove this, done.
| |
47 &kVorbisCodecInfo, | 49 &kVorbisCodecInfo, |
48 NULL | 50 NULL |
49 }; | 51 }; |
50 | 52 |
51 static const CodecInfo* kAudioWebMCodecs[] = { | 53 static const CodecInfo* kAudioWebMCodecs[] = { |
52 &kVorbisCodecInfo, | 54 &kVorbisCodecInfo, |
53 NULL | 55 NULL |
54 }; | 56 }; |
55 | 57 |
56 static StreamParser* BuildWebMParser(const std::vector<std::string>& codecs) { | 58 static StreamParser* BuildWebMParser(const std::vector<std::string>& codecs) { |
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1240 | 1242 |
1241 Ranges<TimeDelta> ChunkDemuxer::GetBufferedRanges() const { | 1243 Ranges<TimeDelta> ChunkDemuxer::GetBufferedRanges() const { |
1242 if (audio_ && !video_) | 1244 if (audio_ && !video_) |
1243 return audio_->GetBufferedRanges(duration_); | 1245 return audio_->GetBufferedRanges(duration_); |
1244 else if (!audio_ && video_) | 1246 else if (!audio_ && video_) |
1245 return video_->GetBufferedRanges(duration_); | 1247 return video_->GetBufferedRanges(duration_); |
1246 return ComputeIntersection(); | 1248 return ComputeIntersection(); |
1247 } | 1249 } |
1248 | 1250 |
1249 } // namespace media | 1251 } // namespace media |
OLD | NEW |