Bug 205802 - Implement MediaRecorder backend in GPUProcess
Summary: Implement MediaRecorder backend in GPUProcess
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on: 205868
Blocks:
  Show dependency treegraph
 
Reported: 2020-01-06 08:13 PST by youenn fablet
Modified: 2020-01-08 04:45 PST (History)
19 users (show)

See Also:


Attachments
Patch (89.22 KB, patch)
2020-01-06 08:16 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (89.27 KB, patch)
2020-01-06 08:33 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (89.37 KB, patch)
2020-01-06 08:55 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (89.37 KB, patch)
2020-01-06 09:16 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (89.69 KB, patch)
2020-01-06 23:16 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (90.30 KB, patch)
2020-01-06 23:55 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (90.34 KB, patch)
2020-01-07 00:22 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (92.20 KB, patch)
2020-01-07 03:13 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (101.81 KB, patch)
2020-01-07 05:00 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (101.91 KB, patch)
2020-01-07 06:37 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (104.39 KB, patch)
2020-01-07 07:11 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (103.80 KB, patch)
2020-01-07 07:30 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Build fixes (99.08 KB, patch)
2020-01-08 03:06 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2020-01-06 08:13:03 PST
Implement MediaRecorder backend in GPUProcess
Comment 1 youenn fablet 2020-01-06 08:16:29 PST
Created attachment 386846 [details]
Patch
Comment 2 youenn fablet 2020-01-06 08:33:59 PST
Created attachment 386848 [details]
Patch
Comment 3 youenn fablet 2020-01-06 08:55:06 PST
Created attachment 386851 [details]
Patch
Comment 4 youenn fablet 2020-01-06 09:16:17 PST
Created attachment 386853 [details]
Patch
Comment 5 youenn fablet 2020-01-06 23:16:32 PST
Created attachment 386936 [details]
Patch
Comment 6 youenn fablet 2020-01-06 23:55:47 PST
Created attachment 386942 [details]
Patch
Comment 7 youenn fablet 2020-01-07 00:22:23 PST
Created attachment 386946 [details]
Patch
Comment 8 youenn fablet 2020-01-07 03:13:21 PST
Created attachment 386957 [details]
Patch
Comment 9 youenn fablet 2020-01-07 05:00:28 PST
Created attachment 386961 [details]
Patch
Comment 10 Eric Carlson 2020-01-07 06:04:00 PST
Comment on attachment 386961 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=386961&action=review

> Source/WebCore/testing/Internals.cpp:555
> +    page.mediaRecorderProvider().setUseGPUProcess(true);

Is this the correct default?

> Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp:153
> +#if PLATFORM(COCOA) && USE(LIBWEBRTC)

Should this be "#if PLATFORM(COCOA) && ENABLE(MEDIA_STREAM"?

> Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp:181
> +    if (decoder.messageReceiverName() == Messages::RemoteMediaRecorders::messageReceiverName()) {
> +        mediaRecorders().didReceiveMessageFromWebProcess(connection, decoder);
> +        return;
> +    }
> +    if (decoder.messageReceiverName() == Messages::RemoteMediaRecorder::messageReceiverName()) {

"RemoteMediaRecorders" is a bit subtle and easy to confuse with "RemoteMediaRecorder". Maybe something like "RemoteMediaRecorderManager" instead?

> Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:52
> +    // FIXME: We would better to throw an exception to JavaScript if writer creation fails.

s/We would better to throw an exception/We should throw an exception/
Comment 11 youenn fablet 2020-01-07 06:10:15 PST
(In reply to Eric Carlson from comment #10)
> Comment on attachment 386961 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=386961&action=review
> 
> > Source/WebCore/testing/Internals.cpp:555
> > +    page.mediaRecorderProvider().setUseGPUProcess(true);
> 
> Is this the correct default?

I think so, I am not sure we will enable MediaRecorder by default without GPUProcess.

> 
> > Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp:153
> > +#if PLATFORM(COCOA) && USE(LIBWEBRTC)
> 
> Should this be "#if PLATFORM(COCOA) && ENABLE(MEDIA_STREAM"?

Right.

> > Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp:181
> > +    if (decoder.messageReceiverName() == Messages::RemoteMediaRecorders::messageReceiverName()) {
> > +        mediaRecorders().didReceiveMessageFromWebProcess(connection, decoder);
> > +        return;
> > +    }
> > +    if (decoder.messageReceiverName() == Messages::RemoteMediaRecorder::messageReceiverName()) {
> 
> "RemoteMediaRecorders" is a bit subtle and easy to confuse with
> "RemoteMediaRecorder". Maybe something like "RemoteMediaRecorderManager"
> instead?

OK, will go with manager.

> > Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:52
> > +    // FIXME: We would better to throw an exception to JavaScript if writer creation fails.
> 
> s/We would better to throw an exception/We should throw an exception/

OK
Comment 12 youenn fablet 2020-01-07 06:15:53 PST
Comment on attachment 386961 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=386961&action=review

>>> Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:52
>>> +    // FIXME: We would better to throw an exception to JavaScript if writer creation fails.
>> 
>> s/We would better to throw an exception/We should throw an exception/
> 
> OK

Actually, I implemented it now using m_errorCallback, will remove this FIXME.
Comment 13 youenn fablet 2020-01-07 06:37:07 PST
Created attachment 386965 [details]
Patch for landing
Comment 14 youenn fablet 2020-01-07 07:11:50 PST
Created attachment 386966 [details]
Patch for landing
Comment 15 youenn fablet 2020-01-07 07:30:42 PST
Created attachment 386968 [details]
Patch for landing
Comment 16 WebKit Commit Bot 2020-01-07 09:08:11 PST
Comment on attachment 386968 [details]
Patch for landing

Clearing flags on attachment: 386968

Committed r254132: <https://trac.webkit.org/changeset/254132>
Comment 17 WebKit Commit Bot 2020-01-07 09:08:13 PST
All reviewed patches have been landed.  Closing bug.
Comment 18 Radar WebKit Bug Importer 2020-01-07 09:09:19 PST
<rdar://problem/58376117>
Comment 19 Ross Kirsling 2020-01-07 10:12:11 PST
This broke WinCairo, as indicated by EWS.
Comment 20 youenn fablet 2020-01-07 10:13:38 PST
(In reply to Ross Kirsling from comment #19)
> This broke WinCairo, as indicated by EWS.

I did not see it :(
Will fix it.
Comment 21 Ross Kirsling 2020-01-07 10:15:11 PST
(In reply to youenn fablet from comment #20)
> (In reply to Ross Kirsling from comment #19)
> > This broke WinCairo, as indicated by EWS.
> 
> I did not see it :(
> Will fix it.

No worries -- thanks Youenn!
Comment 22 WebKit Commit Bot 2020-01-07 10:29:36 PST
Re-opened since this is blocked by bug 205868
Comment 23 youenn fablet 2020-01-08 03:06:59 PST
Created attachment 387091 [details]
Build fixes
Comment 24 WebKit Commit Bot 2020-01-08 04:45:12 PST
Comment on attachment 387091 [details]
Build fixes

Clearing flags on attachment: 387091

Committed r254194: <https://trac.webkit.org/changeset/254194>
Comment 25 WebKit Commit Bot 2020-01-08 04:45:14 PST
All reviewed patches have been landed.  Closing bug.