RESOLVED FIXED Bug 214972
MediaRecorderPrivateWriter::appendEndOfVideoSampleDurationIfNeeded should only call requestMediaDataWhenReadyOnQueue once
https://bugs.webkit.org/show_bug.cgi?id=214972
Summary MediaRecorderPrivateWriter::appendEndOfVideoSampleDurationIfNeeded should onl...
youenn fablet
Reported 2020-07-30 09:10:40 PDT
MediaRecorderPrivateWriter::appendEndOfVideoSampleDurationIfNeeded should only call requestMediaDataWhenReadyOnQueue once
Attachments
Patch (10.17 KB, patch)
2020-07-31 09:06 PDT, youenn fablet
no flags
Patch for landing (10.27 KB, patch)
2020-08-03 00:48 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2020-07-31 09:06:09 PDT
youenn fablet
Comment 2 2020-08-03 00:48:47 PDT
Created attachment 405816 [details] Patch for landing
youenn fablet
Comment 3 2020-08-03 00:49:48 PDT
Thanks for the r+ Eric. I changed it a bit to capture the queue of pending audio and video samples in the block given to requestMediaDataWhenReadyOnQueue. This should ensure we do not grab other incoming samples.
EWS
Comment 4 2020-08-03 03:09:44 PDT
Committed r265192: <https://trac.webkit.org/changeset/265192> All reviewed patches have been landed. Closing bug and clearing flags on attachment 405816 [details].
Eric Carlson
Comment 5 2020-08-03 07:00:59 PDT
Comment on attachment 405816 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=405816&action=review > Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:263 > [m_audioAssetWriterInput.get() appendSampleBuffer:buffer.get()]; Shouldn't we check [m_audioAssetWriterInput isReadyForMoreMediaData] before appending? > Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:294 > + m_lastVideoPresentationTime = CMSampleBufferGetPresentationTimeStamp(buffer); > + m_lastVideoDecodingTime = CMSampleBufferGetDecodeTimeStamp(buffer); > + m_hasEncodedVideoSamples = true; > + > + [m_videoAssetWriterInput.get() appendSampleBuffer:buffer]; Shouldn't this check [m_videoAssetWriterInput isReadyForMoreMediaData] before appending in case, for example, appendCompressedVideoSampleBufferIfPossible filled it with pending samples?
youenn fablet
Comment 6 2020-08-03 07:44:25 PDT
Thanks, will fix that as a follow-up. (In reply to Eric Carlson from comment #5) > Comment on attachment 405816 [details] > Patch for landing > > View in context: > https://bugs.webkit.org/attachment.cgi?id=405816&action=review > > > Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:263 > > [m_audioAssetWriterInput.get() appendSampleBuffer:buffer.get()]; > > Shouldn't we check [m_audioAssetWriterInput isReadyForMoreMediaData] before > appending? > > > Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:294 > > + m_lastVideoPresentationTime = CMSampleBufferGetPresentationTimeStamp(buffer); > > + m_lastVideoDecodingTime = CMSampleBufferGetDecodeTimeStamp(buffer); > > + m_hasEncodedVideoSamples = true; > > + > > + [m_videoAssetWriterInput.get() appendSampleBuffer:buffer]; > > Shouldn't this check [m_videoAssetWriterInput isReadyForMoreMediaData] > before appending in case, for example, > appendCompressedVideoSampleBufferIfPossible filled it with pending samples?
youenn fablet
Comment 7 2020-08-03 07:45:10 PDT
youenn fablet
Comment 8 2020-08-03 07:53:28 PDT
We also need to make sure flushCompressedSampleBuffers is not called by stopRecording while doing work for fetchData.
Radar WebKit Bug Importer
Comment 9 2020-08-03 13:34:28 PDT
Note You need to log in before you can comment on or make changes to this bug.