WebKit Bugzilla
Attachment 350185 Details for
Bug 189782
: [MSE] Use some tolerance when deciding whether a frame should be appended to the decode queue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189782-20180920130250.patch (text/plain), 3.24 KB, created by
Alicia Boya García
on 2018-09-20 04:02:51 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alicia Boya García
Created:
2018-09-20 04:02:51 PDT
Size:
3.24 KB
patch
obsolete
>Subversion Revision: 236166 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 9fcb657142ed7fe2503cc27f7bdae634efdf21e4..15fca902338c922f08885019697f572daba74404 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,24 @@ >+2018-09-20 Alicia Boya GarcÃa <aboya@igalia.com> >+ >+ [MSE] Use some tolerance when deciding whether a frame should be appended to the decode queue >+ https://bugs.webkit.org/show_bug.cgi?id=189782 >+ >+ Ideally, container formats should use exact timestamps and frames >+ should not overlap. Unfortunately, there are lots of muxes out there >+ where this is not always the case. >+ >+ This is particularly a problem in WebM, where timestamps are expressed >+ in a power of 10 timescale, which forces some rounding. >+ >+ This patch makes SourceBuffer allow frames with a small overlaps >+ (<=1ms) as those usually found in WebM. 1 ms is chosen because it's >+ the default time scale of WebM files. >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Modules/mediasource/SourceBuffer.cpp: >+ (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): >+ > 2018-09-19 Philippe Normand <pnormand@igalia.com> > > [GStreamer] Add support for AV1 decoding >diff --git a/Source/WebCore/Modules/mediasource/SourceBuffer.cpp b/Source/WebCore/Modules/mediasource/SourceBuffer.cpp >index 20aa84b3d0bf4626b828b1bbf45af2fbc62afb4c..270aa2e501d4e50579f93df759d698b7b6ff3a66 100644 >--- a/Source/WebCore/Modules/mediasource/SourceBuffer.cpp >+++ b/Source/WebCore/Modules/mediasource/SourceBuffer.cpp >@@ -1688,7 +1688,17 @@ void SourceBuffer::sourceBufferPrivateDidReceiveSample(MediaSample& sample) > // Add the coded frame with the presentation timestamp, decode timestamp, and frame duration to the track buffer. > trackBuffer.samples.addSample(sample); > >- if (trackBuffer.lastEnqueuedDecodeEndTime.isInvalid() || decodeTimestamp >= trackBuffer.lastEnqueuedDecodeEndTime) { >+ // Note: The terminology here is confusing: "enqueuing" means providing a frame to the inner media framework. >+ // First, frames are inserted in the decode queue; later, at the end of the append all the frames in the decode >+ // queue are "enqueued" (sent to the inner media framework) in `provideMediaData()`. >+ // >+ // In order to check whether a frame should be added to the decode queue we check whether it starts after the >+ // lastEnqueuedDecodeEndTime or even a bit before that to accomodate muxes with imprecise timing information. >+ // >+ // There are many muxes out there where the frame times are not perfectly contiguous, therefore a tolerance is needed. >+ // For instance, most WebM files are muxed rounded to the millisecond (the default TimecodeScale of the format). >+ const MediaTime contiguousFrameTolerance = MediaTime(1, 1000); >+ if (trackBuffer.lastEnqueuedDecodeEndTime.isInvalid() || decodeTimestamp >= (trackBuffer.lastEnqueuedDecodeEndTime - contiguousFrameTolerance)) { > DecodeOrderSampleMap::KeyType decodeKey(sample.decodeTime(), sample.presentationTime()); > trackBuffer.decodeQueue.insert(DecodeOrderSampleMap::MapType::value_type(decodeKey, &sample)); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189782
:
350185
|
350190
|
350192