Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bb4974477bf7528d81299d2195f18c451ffe0e13
      
https://github.com/WebKit/WebKit/commit/bb4974477bf7528d81299d2195f18c451ffe0e13
  Author: Jer Noble <[email protected]>
  Date:   2024-09-19 (Thu, 19 Sep 2024)

  Changed paths:
    M Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp
    M Source/WebCore/PAL/pal/cf/VideoToolboxSoftLink.cpp
    M Source/WebCore/PAL/pal/cf/VideoToolboxSoftLink.h
    M Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.h
    M Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.mm
    M 
Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm
    M Source/WebCore/platform/mediarecorder/cocoa/VideoSampleBufferCompressor.h
    M Source/WebCore/platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm

  Log Message:
  -----------
  [Cocoa] Migrate to AVAssetWriter segment-based delegate callbacks
https://bugs.webkit.org/show_bug.cgi?id=279989
rdar://136298814

Reviewed by Eric Carlson.

Migrate to the -assetWriter:didProduceFragmentedHeaderData: delegate callback, 
away from
the deprecated fragment-based delegate callback.

This new callback has a stricter requirement about starting new segments with a 
keyframe.
To achieve this, modify VideoSampleBufferCompressor::flushInternal() to set a 
flag which
will cause the next enqueued sample to be a keyframe.

Drive-by fix: initialize the Options to be passed to MediaRecorderPrivate with 
the current
m_options before overriding the audio and video bitrates.

* Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp:
(WebCore::MediaRecorder::startRecording):
* Source/WebCore/PAL/pal/cf/VideoToolboxSoftLink.cpp:
* Source/WebCore/PAL/pal/cf/VideoToolboxSoftLink.h:
* Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.h:
* Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.mm:
* 
Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
(-[WebAVAssetWriterDelegate assetWriter:didOutputSegmentData:segmentType:]):
(WebCore::MediaRecorderPrivateWriter::initialize):
(WebCore::MediaRecorderPrivateWriter::stopRecording):
(WebCore::MediaRecorderPrivateWriter::fetchData):
(-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedHeaderData:]): 
Deleted.
(-[WebAVAssetWriterDelegate 
assetWriter:didProduceFragmentedMediaData:fragmentedMediaDataReport:]): Deleted.
* Source/WebCore/platform/mediarecorder/cocoa/VideoSampleBufferCompressor.h:
* Source/WebCore/platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm:
(WebCore::VideoSampleBufferCompressor::flushInternal):
(WebCore::forceKeyFrameDictionary):
(WebCore::VideoSampleBufferCompressor::processSampleBuffer):

Canonical link: https://commits.webkit.org/283956@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to