WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
237472
Split SourceBufferParserWebM and have platform agnostic WebMParser
https://bugs.webkit.org/show_bug.cgi?id=237472
Summary
Split SourceBufferParserWebM and have platform agnostic WebMParser
Jean-Yves Avenard [:jya]
Reported
2022-03-04 06:23:01 PST
Sub-task of
bug 236754
. Currently, the SourceBufferParserWebM demux a webm and returned CMSampleBuffer, this is okay when used with MSE; however when used with the MediaFormatReader to play plain webm: it means we always read the entire file into memory, put each demuxed sample in a MediaSampleAVFObjC object and return the entire content to the MediaFormatReader. The aim is for the MediaFormatReader to construct a sample table, and for this it only needs to know the offset and length of each sample within the original stream. As such, demuxing the whole lot is less than efficient in both speed and memory usage. By using a more specialised webm demuxer we could build exactly what the MFR needs. In this task, we will also introduce a new type of MediaSample and Track Information that is fully platform agnostic.
Attachments
Patch
(132.53 KB, patch)
2022-03-04 20:05 PST
,
Jean-Yves Avenard [:jya]
no flags
Details
Formatted Diff
Diff
Combined patch for EWS tests
(171.28 KB, patch)
2022-03-04 20:07 PST
,
Jean-Yves Avenard [:jya]
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Combined patch for EWS tests
(171.33 KB, patch)
2022-03-04 20:18 PST
,
Jean-Yves Avenard [:jya]
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Combined patch for EWS tests
(176.72 KB, patch)
2022-03-04 21:39 PST
,
Jean-Yves Avenard [:jya]
no flags
Details
Formatted Diff
Diff
Patch for review
(140.05 KB, patch)
2022-03-05 19:45 PST
,
Jean-Yves Avenard [:jya]
no flags
Details
Formatted Diff
Diff
Combined Patch for EWS
(178.15 KB, patch)
2022-03-05 19:46 PST
,
Jean-Yves Avenard [:jya]
no flags
Details
Formatted Diff
Diff
Patch for review
(140.89 KB, patch)
2022-03-07 02:22 PST
,
Jean-Yves Avenard [:jya]
no flags
Details
Formatted Diff
Diff
Patch for review
(140.63 KB, patch)
2022-03-07 02:30 PST
,
Jean-Yves Avenard [:jya]
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-03-04 06:23:11 PST
<
rdar://problem/89810969
>
Jean-Yves Avenard [:jya]
Comment 2
2022-03-04 20:05:44 PST
Created
attachment 453889
[details]
Patch
Jean-Yves Avenard [:jya]
Comment 3
2022-03-04 20:07:29 PST
Created
attachment 453890
[details]
Combined patch for EWS tests
Jean-Yves Avenard [:jya]
Comment 4
2022-03-04 20:18:35 PST
Created
attachment 453891
[details]
Combined patch for EWS tests fix compilation TV and Watch
Jean-Yves Avenard [:jya]
Comment 5
2022-03-04 21:39:46 PST
Created
attachment 453899
[details]
Combined patch for EWS tests
Jean-Yves Avenard [:jya]
Comment 6
2022-03-05 19:45:25 PST
Created
attachment 453927
[details]
Patch for review
Jean-Yves Avenard [:jya]
Comment 7
2022-03-05 19:46:17 PST
Created
attachment 453928
[details]
Combined Patch for EWS
Eric Carlson
Comment 8
2022-03-06 09:02:08 PST
Comment on
attachment 453927
[details]
Patch for review View in context:
https://bugs.webkit.org/attachment.cgi?id=453927&action=review
> Source/WebCore/platform/graphics/cocoa/CMUtilities.mm:217 > + if (!format) > + return nullptr;
It is probably worth logging an error to help when this, presumably rare, failure happens.
> Source/WebCore/platform/graphics/cocoa/CMUtilities.mm:225 > + if (err != kCMBlockBufferNoErr || !rawBlockBuffer) > + return nullptr;
Ditto
> Source/WebCore/platform/graphics/cocoa/CMUtilities.mm:239 > + if (!blockBuffer) > + return nullptr;
Ditto
> Source/WebCore/platform/graphics/cocoa/CMUtilities.mm:246 > + if (err != kCMBlockBufferNoErr) > + return nullptr;
Ditto
> Source/WebCore/platform/graphics/cocoa/CMUtilities.mm:254 > + if (auto err = PAL::CMSampleBufferCreateReady(kCFAllocatorDefault, completeBlockBuffers.get(), format.get(), packetSizes.size(), packetTimings.size(), packetTimings.data(), packetSizes.size(), packetSizes.data(), &rawSampleBuffer)) > + return nullptr;
Ditto
> Source/WebCore/platform/graphics/cocoa/CMUtilities.mm:258 > + ASSERT(attachmentsArray);
Is this failure more serious than those above? If not, should those assert too?
> Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp:566 > + if (!m_parser) > + return -1;
Yuck. Maybe have this return an ExceptionOr<int> instead?
> Tools/ChangeLog:26 > + * TestWebKitAPI/Tests/WebCore/SampleMap.cpp: Update following base class definition change.
Looks like this is in the wrong place?
Jean-Yves Avenard [:jya]
Comment 9
2022-03-06 21:59:22 PST
Comment on
attachment 453927
[details]
Patch for review View in context:
https://bugs.webkit.org/attachment.cgi?id=453927&action=review
>> Source/WebCore/platform/graphics/cocoa/CMUtilities.mm:217 >> + return nullptr; > > It is probably worth logging an error to help when this, presumably rare, failure happens.
This is a utility method. AFAIK, there’s no logging possible here. The error is logged on return
>> Source/WebCore/platform/graphics/cocoa/CMUtilities.mm:258 >> + ASSERT(attachmentsArray); > > Is this failure more serious than those above? If not, should those assert too?
This is carrying on the old code. It can’t happen unless there’s a change in behaviour in the CM method. We create the CM Sample and give it an array of timings etc. So there will always be an arrray there. The other errors indicates an OOM
>> Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp:566 >> + return -1; > > Yuck. Maybe have this return an ExceptionOr<int> instead?
Could return a new error code. Otherwise , crap in, crap out. This indicates the demuxer was called after being torn down. Which can’t happen currently
Jean-Yves Avenard [:jya]
Comment 10
2022-03-07 02:21:29 PST
Comment on
attachment 453927
[details]
Patch for review View in context:
https://bugs.webkit.org/attachment.cgi?id=453927&action=review
>> Tools/ChangeLog:26 >> + * TestWebKitAPI/Tests/WebCore/SampleMap.cpp: Update following base class definition change. > > Looks like this is in the wrong place?
what do you mean? this method is modified and that template was generated by webkit-patch
Jean-Yves Avenard [:jya]
Comment 11
2022-03-07 02:22:41 PST
Created
attachment 453950
[details]
Patch for review Propage error detail
Jean-Yves Avenard [:jya]
Comment 12
2022-03-07 02:30:42 PST
Created
attachment 453951
[details]
Patch for review
Eric Carlson
Comment 13
2022-03-08 08:31:41 PST
Comment on
attachment 453927
[details]
Patch for review View in context:
https://bugs.webkit.org/attachment.cgi?id=453927&action=review
>>> Tools/ChangeLog:26 >>> + * TestWebKitAPI/Tests/WebCore/SampleMap.cpp: Update following base class definition change. >> >> Looks like this is in the wrong place? > > what do you mean? this method is modified and that template was generated by webkit-patch
I meant it is in the wrong comment block.
EWS
Comment 14
2022-03-08 18:26:37 PST
Committed
r291025
(
248199@main
): <
https://commits.webkit.org/248199@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 453951
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug