Initialize media timeline correctly for positive start times.
commitb9ec078cf3b5355a1a19c55a75ebb6ab101b4483
authordalecurtis <dalecurtis@chromium.org>
Tue, 16 Sep 2014 22:23:21 +0000 (16 15:23 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 16 Sep 2014 22:23:38 +0000 (16 22:23 +0000)
tree2891394dc3f2b9c6d57635f6a9a81df1a3a1bf05
parent8de1135ae475d17cef2cd6e77ad93750420535fb
Initialize media timeline correctly for positive start times.

The previous fix for positive start times http://crrev.com/93c37f1b is
incomplete. It fixed seeking, but did not fix rendering. As such, the
media timeline will start playback from 0 and advance in real time to
any positive start time... even if the actual start is hours away.

When testing I used a test clip with a short positive start time so
did not notice the issue.  In attempting to write a layout test, I
retested with a larger start time which revealed the deficiency in my
first solution.

This change reverts the removal of Demuxer::StartTime() with the added
restriction that it must always be positive.  Pipeline uses this time
like it did before, during initialization and as a minimum bound for
seeking.

BUG=413292
TEST=four new tests! layout test forthcoming.

Review URL: https://codereview.chromium.org/575643002

Cr-Commit-Position: refs/heads/master@{#295159}
media/base/demuxer.h
media/base/mock_filters.h
media/base/pipeline.cc
media/base/pipeline_unittest.cc
media/filters/chunk_demuxer.cc
media/filters/chunk_demuxer.h
media/filters/ffmpeg_demuxer.cc
media/filters/ffmpeg_demuxer.h
media/filters/ffmpeg_demuxer_unittest.cc
media/filters/pipeline_integration_test.cc