| Index: media/filters/ffmpeg_demuxer.cc
|
| diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
|
| index d54db072725801e754db463d2a00b5f299d2cf94..40a8c917c9000e5d3c777a2977d5e762f8af165b 100644
|
| --- a/media/filters/ffmpeg_demuxer.cc
|
| +++ b/media/filters/ffmpeg_demuxer.cc
|
| @@ -394,6 +394,7 @@ FFmpegDemuxer::FFmpegDemuxer(
|
| media_log_(media_log),
|
| bitrate_(0),
|
| start_time_(kNoTimestamp()),
|
| + liveness_(LIVENESS_UNKNOWN),
|
| audio_disabled_(false),
|
| text_enabled_(false),
|
| duration_known_(false),
|
| @@ -506,6 +507,11 @@ base::Time FFmpegDemuxer::GetTimelineOffset() const {
|
| return timeline_offset_;
|
| }
|
|
|
| +Demuxer::Liveness FFmpegDemuxer::GetLiveness() const {
|
| + DCHECK(task_runner_->BelongsToCurrentThread());
|
| + return liveness_;
|
| +}
|
| +
|
| void FFmpegDemuxer::AddTextStreams() {
|
| DCHECK(task_runner_->BelongsToCurrentThread());
|
|
|
| @@ -696,6 +702,14 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
|
|
|
| timeline_offset_ = ExtractTimelineOffset(format_context);
|
|
|
| + if (max_duration == kInfiniteDuration() && !timeline_offset_.is_null()) {
|
| + liveness_ = LIVENESS_LIVE;
|
| + } else if (max_duration != kInfiniteDuration()) {
|
| + liveness_ = LIVENESS_RECORDED;
|
| + } else {
|
| + liveness_ = LIVENESS_UNKNOWN;
|
| + }
|
| +
|
| // Good to go: set the duration and bitrate and notify we're done
|
| // initializing.
|
| host_->SetDuration(max_duration);
|
|
|