| 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/ffmpeg_demuxer.h" | 5 #include "media/filters/ffmpeg_demuxer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 const AudioDecoderConfig& FFmpegDemuxerStream::audio_decoder_config() { | 222 const AudioDecoderConfig& FFmpegDemuxerStream::audio_decoder_config() { |
| 223 CHECK_EQ(type_, AUDIO); | 223 CHECK_EQ(type_, AUDIO); |
| 224 return audio_config_; | 224 return audio_config_; |
| 225 } | 225 } |
| 226 | 226 |
| 227 const VideoDecoderConfig& FFmpegDemuxerStream::video_decoder_config() { | 227 const VideoDecoderConfig& FFmpegDemuxerStream::video_decoder_config() { |
| 228 CHECK_EQ(type_, VIDEO); | 228 CHECK_EQ(type_, VIDEO); |
| 229 return video_config_; | 229 return video_config_; |
| 230 } | 230 } |
| 231 | 231 |
| 232 bool FFmpegDemuxerStream::is_encrypted() { |
| 233 return false; |
| 234 } |
| 235 |
| 232 FFmpegDemuxerStream::~FFmpegDemuxerStream() { | 236 FFmpegDemuxerStream::~FFmpegDemuxerStream() { |
| 233 base::AutoLock auto_lock(lock_); | 237 base::AutoLock auto_lock(lock_); |
| 234 DCHECK(stopped_); | 238 DCHECK(stopped_); |
| 235 DCHECK(read_queue_.empty()); | 239 DCHECK(read_queue_.empty()); |
| 236 DCHECK(buffer_queue_.empty()); | 240 DCHECK(buffer_queue_.empty()); |
| 237 } | 241 } |
| 238 | 242 |
| 239 base::TimeDelta FFmpegDemuxerStream::GetElapsedTime() const { | 243 base::TimeDelta FFmpegDemuxerStream::GetElapsedTime() const { |
| 240 return ConvertStreamTimestamp(stream_->time_base, stream_->cur_dts); | 244 return ConvertStreamTimestamp(stream_->time_base, stream_->cur_dts); |
| 241 } | 245 } |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 } else if (audio) { | 733 } else if (audio) { |
| 730 buffered = audio->GetBufferedRanges(); | 734 buffered = audio->GetBufferedRanges(); |
| 731 } else if (video) { | 735 } else if (video) { |
| 732 buffered = video->GetBufferedRanges(); | 736 buffered = video->GetBufferedRanges(); |
| 733 } | 737 } |
| 734 for (size_t i = 0; i < buffered.size(); ++i) | 738 for (size_t i = 0; i < buffered.size(); ++i) |
| 735 host_->AddBufferedTimeRange(buffered.start(i), buffered.end(i)); | 739 host_->AddBufferedTimeRange(buffered.start(i), buffered.end(i)); |
| 736 } | 740 } |
| 737 | 741 |
| 738 } // namespace media | 742 } // namespace media |
| OLD | NEW |