| OLD | NEW |
| 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 "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "base/string_number_conversions.h" | 6 #include "base/string_number_conversions.h" |
| 7 #include "base/string_split.h" | 7 #include "base/string_split.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "media/filters/adaptive_demuxer.h" | 9 #include "media/filters/adaptive_demuxer.h" |
| 10 | 10 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 // TODO(fischman): propagate to other demuxers if/when they're selected. | 222 // TODO(fischman): propagate to other demuxers if/when they're selected. |
| 223 } | 223 } |
| 224 | 224 |
| 225 void AdaptiveDemuxer::set_host(FilterHost* filter_host) { | 225 void AdaptiveDemuxer::set_host(FilterHost* filter_host) { |
| 226 Demuxer* audio = current_demuxer(DemuxerStream::AUDIO); | 226 Demuxer* audio = current_demuxer(DemuxerStream::AUDIO); |
| 227 Demuxer* video = current_demuxer(DemuxerStream::VIDEO); | 227 Demuxer* video = current_demuxer(DemuxerStream::VIDEO); |
| 228 if (audio) audio->set_host(filter_host); | 228 if (audio) audio->set_host(filter_host); |
| 229 if (video && audio != video) video->set_host(filter_host); | 229 if (video && audio != video) video->set_host(filter_host); |
| 230 } | 230 } |
| 231 | 231 |
| 232 void AdaptiveDemuxer::SetPreload(Preload preload) {} |
| 233 |
| 232 scoped_refptr<DemuxerStream> AdaptiveDemuxer::GetStream( | 234 scoped_refptr<DemuxerStream> AdaptiveDemuxer::GetStream( |
| 233 DemuxerStream::Type type) { | 235 DemuxerStream::Type type) { |
| 234 switch (type) { | 236 switch (type) { |
| 235 case DemuxerStream::AUDIO: | 237 case DemuxerStream::AUDIO: |
| 236 return audio_stream_; | 238 return audio_stream_; |
| 237 case DemuxerStream::VIDEO: | 239 case DemuxerStream::VIDEO: |
| 238 return video_stream_; | 240 return video_stream_; |
| 239 default: | 241 default: |
| 240 LOG(DFATAL) << "Unexpected type " << type; | 242 LOG(DFATAL) << "Unexpected type " << type; |
| 241 return NULL; | 243 return NULL; |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 delete cb; | 390 delete cb; |
| 389 return; | 391 return; |
| 390 } | 392 } |
| 391 DemuxerAccumulator* accumulator = new DemuxerAccumulator( | 393 DemuxerAccumulator* accumulator = new DemuxerAccumulator( |
| 392 audio_index, video_index, urls.size(), cb); | 394 audio_index, video_index, urls.size(), cb); |
| 393 for (size_t i = 0; i < urls.size(); ++i) | 395 for (size_t i = 0; i < urls.size(); ++i) |
| 394 delegate_factory_->Build(urls[i], accumulator->GetNthCallback(i)); | 396 delegate_factory_->Build(urls[i], accumulator->GetNthCallback(i)); |
| 395 } | 397 } |
| 396 | 398 |
| 397 } // namespace media | 399 } // namespace media |
| OLD | NEW |