Changeset 236258 in webkit
- Timestamp:
- Sep 20, 2018, 7:08:18 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
Modules/mediasource/SourceBuffer.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r236256 r236258 1 2018-09-20 Alicia Boya García <aboya@igalia.com> 2 3 [MSE] Use some tolerance when deciding whether a frame should be appended to the decode queue 4 https://bugs.webkit.org/show_bug.cgi?id=189782 5 6 Reviewed by Xabier Rodriguez-Calvar. 7 8 Ideally, container formats should use exact timestamps and frames 9 should not overlap. Unfortunately, there are lots of files out there 10 where this is not always the case. 11 12 This is particularly a problem in WebM, where timestamps are expressed 13 in a power of 10 timescale, which forces some rounding. 14 15 This patch makes SourceBuffer allow frames with a small overlaps 16 (<=1ms) as those usually found in WebM. 1 ms is chosen because it's 17 the default time scale of WebM files. 18 19 * Modules/mediasource/SourceBuffer.cpp: 20 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): 21 1 22 2018-09-20 Yacine Bandou <yacine.bandou@softathome.com> 2 23 -
trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp
r234995 r236258 1676 1676 trackBuffer.samples.addSample(sample); 1677 1677 1678 if (trackBuffer.lastEnqueuedDecodeEndTime.isInvalid() || decodeTimestamp >= trackBuffer.lastEnqueuedDecodeEndTime) { 1678 // Note: The terminology here is confusing: "enqueuing" means providing a frame to the inner media framework. 1679 // First, frames are inserted in the decode queue; later, at the end of the append all the frames in the decode 1680 // queue are "enqueued" (sent to the inner media framework) in `provideMediaData()`. 1681 // 1682 // In order to check whether a frame should be added to the decode queue we check whether it starts after the 1683 // lastEnqueuedDecodeEndTime or even a bit before that to accomodate files with imprecise timing information. 1684 // 1685 // There are many files out there where the frame times are not perfectly contiguous, therefore a tolerance is needed. 1686 // For instance, most WebM files are muxed rounded to the millisecond (the default TimecodeScale of the format). 1687 const MediaTime contiguousFrameTolerance = MediaTime(1, 1000); 1688 if (trackBuffer.lastEnqueuedDecodeEndTime.isInvalid() || decodeTimestamp >= (trackBuffer.lastEnqueuedDecodeEndTime - contiguousFrameTolerance)) { 1679 1689 DecodeOrderSampleMap::KeyType decodeKey(sample.decodeTime(), sample.presentationTime()); 1680 1690 trackBuffer.decodeQueue.insert(DecodeOrderSampleMap::MapType::value_type(decodeKey, &sample));
Note:
See TracChangeset
for help on using the changeset viewer.