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 static const CodecInfo kOpusCodecInfo = { "opus", DemuxerStream::AUDIO }; | 45 static const CodecInfo kOpusCodecInfo = { "opus", DemuxerStream::AUDIO }; |
45 | 46 |
46 static const CodecInfo* kVideoWebMCodecs[] = { | 47 static const CodecInfo* kVideoWebMCodecs[] = { |
47 &kVP8CodecInfo, | 48 &kVP8CodecInfo, |
| 49 &kVP9CodecInfo, |
48 &kVorbisCodecInfo, | 50 &kVorbisCodecInfo, |
49 &kOpusCodecInfo, | 51 &kOpusCodecInfo, |
50 NULL | 52 NULL |
51 }; | 53 }; |
52 | 54 |
53 static const CodecInfo* kAudioWebMCodecs[] = { | 55 static const CodecInfo* kAudioWebMCodecs[] = { |
54 &kVorbisCodecInfo, | 56 &kVorbisCodecInfo, |
55 &kOpusCodecInfo, | 57 &kOpusCodecInfo, |
56 NULL | 58 NULL |
57 }; | 59 }; |
(...skipping 1182 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 |