Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add support for AVC H264 WebCodecsVideoEncoder
https://bugs.webkit.org/show_bug.cgi?id=246150 rdar://problem/100851081 Reviewed by Eric Carlson. Add support for AVC encoder in libwebrtc. Add support at WebKit layer by passing a boolean to set annexB or not, and a callback to get the description in case of AVC. Add support at WebCore level to provide the metadata in the output callback when needed. * LayoutTests/imported/w3c/web-platform-tests/webcodecs/full-cycle-test.https.any_h264_avc-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webcodecs/reconfiguring-encoder.https.any.worker_h264_avc-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webcodecs/reconfiguring-encoder.https.any_h264_avc-expected.txt: * Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp: * Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp: * Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp: * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitEncoder.h: * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitEncoder.mm: (-[WK_RTCLocalVideoH264H265Encoder setUseAnnexB:]): (-[WK_RTCLocalVideoH264H265Encoder setDescriptionCallback:]): (webrtc::createLocalEncoder): * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/base/RTCVideoEncoder.h: * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.h: * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm: (-[RTCVideoEncoderH264 initWithCodecInfo:]): (-[RTCVideoEncoderH264 setUseAnnexB:]): (-[RTCVideoEncoderH264 setDescriptionCallback:]): (-[RTCVideoEncoderH264 frameWasEncoded🎏 sampleBuffer:codecSpecificInfo:width:height:renderTimeMs:timestamp:rotation:isKeyFrameRequired:]): * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH265.h: * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH265.mm: (-[RTCVideoEncoderH265 initWithCodecInfo:]): (-[RTCVideoEncoderH265 setUseAnnexB:]): (-[RTCVideoEncoderH265 setDescriptionCallback:]): (-[RTCVideoEncoderH265 frameWasEncoded🎏 sampleBuffer:width:height:renderTimeMs:timestamp:rotation:]): * Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp: (WebCore::WebCodecsVideoEncoder::configure): (WebCore::WebCodecsVideoEncoder::createEncodedChunkMetadata): * Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.h: * Source/WebCore/platform/LibWebRTCVPXVideoEncoder.cpp: (WebCore::LibWebRTCVPXVideoEncoder::LibWebRTCVPXVideoEncoder): * Source/WebCore/platform/LibWebRTCVPXVideoEncoder.h: * Source/WebCore/platform/VideoEncoder.cpp: (WebCore::VideoEncoder::create): (WebCore::VideoEncoder::createLocalEncoder): * Source/WebCore/platform/VideoEncoder.h: * Source/WebKit/Configurations/WebKit.xcconfig: * Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.h: * Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.messages.in: * Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm: (WebKit::LibWebRTCCodecsProxy::createEncoder): * Source/WebKit/WebProcess/GPU/media/RemoteVideoCodecFactory.cpp: (WebKit::RemoteVideoEncoderCallbacks::create): (WebKit::RemoteVideoCodecFactory::createEncoder): (WebKit::RemoteVideoDecoder::RemoteVideoDecoder): Deleted. (WebKit::RemoteVideoDecoder::~RemoteVideoDecoder): Deleted. (WebKit::RemoteVideoDecoder::decode): Deleted. (WebKit::RemoteVideoDecoder::flush): Deleted. (WebKit::RemoteVideoDecoder::reset): Deleted. (WebKit::RemoteVideoDecoder::close): Deleted. (WebKit::RemoteVideoDecoderCallbacks::RemoteVideoDecoderCallbacks): Deleted. (WebKit::RemoteVideoDecoderCallbacks::notifyVideoFrame): Deleted. (WebKit::RemoteVideoEncoder::RemoteVideoEncoder): Deleted. (WebKit::RemoteVideoEncoder::~RemoteVideoEncoder): Deleted. (WebKit::RemoteVideoEncoder::encode): Deleted. (WebKit::RemoteVideoEncoder::flush): Deleted. (WebKit::RemoteVideoEncoder::reset): Deleted. (WebKit::RemoteVideoEncoder::close): Deleted. (WebKit::RemoteVideoEncoderCallbacks::RemoteVideoEncoderCallbacks): Deleted. (WebKit::RemoteVideoEncoderCallbacks::notifyEncodedChunk): Deleted. * Source/WebKit/WebProcess/GPU/media/RemoteVideoCodecFactory.h: * Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: (WebKit::LibWebRTCCodecs::createEncoder): (WebKit::LibWebRTCCodecs::createEncoderAndWaitUntilReady): (WebKit::LibWebRTCCodecs::createEncoderInternal): (WebKit::LibWebRTCCodecs::registerEncoderDescriptionCallback): (WebKit::LibWebRTCCodecs::setEncodingDescription): (WebKit::LibWebRTCCodecs::gpuProcessConnectionDidClose): * Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h: * Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.messages.in: Canonical link: https://commits.webkit.org/255430@main
- Loading branch information
Showing
27 changed files
with
253 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
CONSOLE MESSAGE: Error: assert_unreached: H264 AVC format is not yet supported Reached unreachable code | ||
|
||
FAIL Encoding and decoding cycle promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: OffscreenCanvas" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
FAIL Reconfiguring encoder promise_test: Unhandled rejection with value: object "InvalidStateError: VideoEncoder is not configured" | ||
FAIL Reconfiguring encoder promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: OffscreenCanvas" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
CONSOLE MESSAGE: Error: assert_unreached: H264 AVC format is not yet supported Reached unreachable code | ||
|
||
FAIL Reconfiguring encoder promise_test: Unhandled rejection with value: object "InvalidStateError: VideoEncoder is not configured" | ||
FAIL Reconfiguring encoder promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: OffscreenCanvas" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.