RESOLVED FIXED 214973
Add support for MediaRecorder bitrate options
https://bugs.webkit.org/show_bug.cgi?id=214973
Summary Add support for MediaRecorder bitrate options
youenn fablet
Reported 2020-07-30 09:11:01 PDT
Add support for MediaRecorder bitrate options
Attachments
Patch (66.84 KB, patch)
2020-08-03 07:37 PDT, youenn fablet
no flags
Patch (52.47 KB, patch)
2020-08-03 10:09 PDT, youenn fablet
no flags
Patch (52.51 KB, patch)
2020-08-04 05:34 PDT, youenn fablet
no flags
Patch for landing (52.80 KB, patch)
2020-08-06 02:23 PDT, youenn fablet
no flags
Fixing nullptr crashes (53.01 KB, patch)
2020-08-24 07:35 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2020-08-03 07:37:32 PDT
youenn fablet
Comment 2 2020-08-03 10:09:39 PDT
Eric Carlson
Comment 3 2020-08-03 11:59:34 PDT
Comment on attachment 405847 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=405847&action=review > Source/WebCore/platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm:70 > + m_outputBitRate = bitRate; Shouldn't we limit this to the bitrates we support, or at least log an error if passed open we don't support? > Source/WebCore/platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm:196 > + converterCleanup.release(); Is this manual release necessary? > Source/WebCore/platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm:452 > + // FIXME: Maybe we should error the media recorder if we are not able to get a correct converter. We should at least log and error, to the JS console if possible.
youenn fablet
Comment 4 2020-08-04 05:33:28 PDT
(In reply to Eric Carlson from comment #3) > Comment on attachment 405847 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=405847&action=review > > > Source/WebCore/platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm:70 > > + m_outputBitRate = bitRate; > > Shouldn't we limit this to the bitrates we support, or at least log an error > if passed open we don't support? I added clamping and release logging. I think we should add JS logs as well but this might be best done when adding the options getters. > > > Source/WebCore/platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm:196 > > + converterCleanup.release(); > > Is this manual release necessary? Yes, I'll rename converterCleanup to make it clearer. > > Source/WebCore/platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm:452 > > + // FIXME: Maybe we should error the media recorder if we are not able to get a correct converter. > > We should at least log and error, to the JS console if possible. Difficult as is, as this is platform code but will do when implementing getters.
youenn fablet
Comment 5 2020-08-04 05:34:21 PDT
youenn fablet
Comment 6 2020-08-04 08:55:50 PDT
win test failure unrelated.
youenn fablet
Comment 7 2020-08-05 13:57:42 PDT
ping review
Eric Carlson
Comment 8 2020-08-05 14:13:27 PDT
Comment on attachment 405915 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=405915&action=review > Source/WebCore/platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm:102 > + m_outputBitRate = bitRate; It seems like we should log here if we don't support bitrate as well as in outputBitRate(), since this is called directly with the value in the options dictionary.
youenn fablet
Comment 9 2020-08-06 02:23:52 PDT
Created attachment 406079 [details] Patch for landing
EWS
Comment 10 2020-08-06 08:25:44 PDT
Committed r265328: <https://trac.webkit.org/changeset/265328> All reviewed patches have been landed. Closing bug and clearing flags on attachment 406079 [details].
Radar WebKit Bug Importer
Comment 11 2020-08-06 08:26:17 PDT
Truitt Savell
Comment 12 2020-08-06 10:32:24 PDT
Reverted r265328 for reason: Broke 17 MediaRecorder tests. Committed r265335: <https://trac.webkit.org/changeset/265335>
youenn fablet
Comment 13 2020-08-24 07:35:18 PDT
Created attachment 407102 [details] Fixing nullptr crashes
EWS
Comment 14 2020-08-24 11:40:34 PDT
commit-queue failed to commit attachment 407102 [details] to WebKit repository.
EWS
Comment 15 2020-08-25 08:48:35 PDT
Committed r266116: <https://trac.webkit.org/changeset/266116> All reviewed patches have been landed. Closing bug and clearing flags on attachment 407102 [details].
Note You need to log in before you can comment on or make changes to this bug.