Consistently use base::TimeDelta for media duration |
||||
Issue descriptionCurrently WMPI::Duration() and ChunkDemuxer::GetDuration() return doubles for the media duration, while PipelineController::GetMediaDuration() returns base::TimeDelta for the media duration. It makes sense to use base::TimeDelta() for media duration anywhere if possible.
,
Mar 24 2018
I tried to fix this issue, but found this comment:
double WebMediaPlayerImpl::Duration() const {
// Use duration from ChunkDemuxer when present. MSE allows users to specify
// duration as a double. This propagates to the rest of the pipeline as a
// TimeDelta with potentially reduced precision (limited to Microseconds).
// ChunkDemuxer returns the full-precision user-specified double. This ensures
// users can "get" the exact duration they "set".
if (chunk_demuxer_)
return chunk_demuxer_->GetDuration();
it seems the full-precision of user-specified duration is necessary,
so I think maybe keep ChunkDemuxer returns double is better.
And HTMLMediaElement and MediaSource must return double according to IDL,
so WMPI must return double too, then the "fix" will look like just moving
conversion between TimeDelta and double from ChunkDemuxer to WMPI.
,
Aug 1
,
Sep 5
,
Sep 5
|
||||
►
Sign in to add a comment |
||||
Comment 1 by dalecur...@chromium.org
, Oct 12 2017