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/base64.h" | 10 #include "base/base64.h" |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 | 499 |
500 base::TimeDelta FFmpegDemuxer::GetStartTime() const { | 500 base::TimeDelta FFmpegDemuxer::GetStartTime() const { |
501 DCHECK(task_runner_->BelongsToCurrentThread()); | 501 DCHECK(task_runner_->BelongsToCurrentThread()); |
502 return start_time_; | 502 return start_time_; |
503 } | 503 } |
504 | 504 |
505 base::Time FFmpegDemuxer::GetTimelineOffset() const { | 505 base::Time FFmpegDemuxer::GetTimelineOffset() const { |
506 return timeline_offset_; | 506 return timeline_offset_; |
507 } | 507 } |
508 | 508 |
| 509 bool FFmpegDemuxer::IsLiveMode() const { |
| 510 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 511 return false; |
| 512 } |
| 513 |
509 void FFmpegDemuxer::AddTextStreams() { | 514 void FFmpegDemuxer::AddTextStreams() { |
510 DCHECK(task_runner_->BelongsToCurrentThread()); | 515 DCHECK(task_runner_->BelongsToCurrentThread()); |
511 | 516 |
512 for (StreamVector::size_type idx = 0; idx < streams_.size(); ++idx) { | 517 for (StreamVector::size_type idx = 0; idx < streams_.size(); ++idx) { |
513 FFmpegDemuxerStream* stream = streams_[idx]; | 518 FFmpegDemuxerStream* stream = streams_[idx]; |
514 if (stream == NULL || stream->type() != DemuxerStream::TEXT) | 519 if (stream == NULL || stream->type() != DemuxerStream::TEXT) |
515 continue; | 520 continue; |
516 | 521 |
517 TextKind kind = stream->GetTextKind(); | 522 TextKind kind = stream->GetTextKind(); |
518 std::string title = stream->GetMetadata("title"); | 523 std::string title = stream->GetMetadata("title"); |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 } | 1007 } |
1003 for (size_t i = 0; i < buffered.size(); ++i) | 1008 for (size_t i = 0; i < buffered.size(); ++i) |
1004 host_->AddBufferedTimeRange(buffered.start(i), buffered.end(i)); | 1009 host_->AddBufferedTimeRange(buffered.start(i), buffered.end(i)); |
1005 } | 1010 } |
1006 | 1011 |
1007 void FFmpegDemuxer::OnDataSourceError() { | 1012 void FFmpegDemuxer::OnDataSourceError() { |
1008 host_->OnDemuxerError(PIPELINE_ERROR_READ); | 1013 host_->OnDemuxerError(PIPELINE_ERROR_READ); |
1009 } | 1014 } |
1010 | 1015 |
1011 } // namespace media | 1016 } // namespace media |
OLD | NEW |