Open Bug 1248306 Opened 4 years ago Updated 3 years ago
Seekable should return the seekable range
At the time of writing, MediaDataDemuxer can be queried as to if media is seekable, returning a boolean value. Discussion from bug 657791 comment 62 suggests that it would be preferable to instead return the seekable range from demuxers. The current suggested fix to bug 657791 would introduce a further method that could be replaced via implementing returning of seekable ranges. Doing this would simplify the interface and remove the need for methods to track different kinds of seekability -- all demuxers can be queried for their seekable range.
I would suggest a name like MediaDecoder::GetSeekable().
(In reply to JW Wang [:jwwang] from comment #1) > I would suggest a name like MediaDecoder::GetSeekable(). You mean MediaDataDemuxer::GetSeekable() right? MediaDecoder::GetSeekable() already exists (and would indirectly use the MediaDataDemuxer API (via mirroring from MediaFormatReader) I think we'll still need a IsSeekable returning a boolean to distinguish the case between unable to seek (which is permanent) and a temporary inability to seek because the buffered range is empty)
I am just curious about the naming. It is strange to me for MediaDataDemuxer::IsSeekable() to return a non-boolean type.
I agree, I should have been more clear in original ticket: if the change is made the name should also change to reflect the new functionality clearly.
(In reply to JW Wang [:jwwang] from comment #3) > I am just curious about the naming. It is strange to me for > MediaDataDemuxer::IsSeekable() to return a non-boolean type. I think this ticket implied it. Though as I mentioned earlier, would still have an IsSeekable()
So currently it looks like: - We maintain IsSeekable - We implement a GetSeekableRanges to return the seekable ranges. Discussion: In MediaDecoder if the media is seekable we use the duration to build the Intervals over which we seek. This duration can be set based on the metadata in the media, but it can also be set by other sources, such as the observed duration as the file is played. How should the new ability to retrieve the seekable duration from the demuxer interact with this? E.g. if IsSeekable is true should we use the greater of the duration or seekable intervals, otherwise use only the seekable intervals?
4 years ago
Priority: -- → P2
Mass change P2 -> P3
Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.