[webkit-changes] [WebKit/WebKit] 1e7fe6: Add AudioDecoderCocoa class, a CoreMedia implement...

Jean-Yves Avenard noreply at github.com
Fri Dec 6 05:01:15 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1e7fe684d4e5af6b98e6f15579db75334ed5d019
      https://github.com/WebKit/WebKit/commit/1e7fe684d4e5af6b98e6f15579db75334ed5d019
  Author: Jean-Yves Avenard <jya at apple.com>
  Date:   2024-12-06 (Fri, 06 Dec 2024)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/imported/w3c/web-platform-tests/webcodecs/audio-decoder.https.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/webcodecs/audio-decoder.https.any.worker-expected.txt
    M LayoutTests/platform/glib/TestExpectations
    R LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/audio-decoder.https.any-expected.txt
    R LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/audio-decoder.https.any.worker-expected.txt
    R LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/transfering.https.any-expected.txt
    R LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/transfering.https.any.worker-expected.txt
    M LayoutTests/platform/mac/TestExpectations
    M Source/WebCore/Modules/webcodecs/WebCodecsAudioDecoder.cpp
    M Source/WebCore/PlatformMac.cmake
    M Source/WebCore/SourcesCocoa.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/platform/AudioDecoder.cpp
    A Source/WebCore/platform/audio/cocoa/AudioDecoderCocoa.cpp
    A Source/WebCore/platform/audio/cocoa/AudioDecoderCocoa.h
    M Source/WebCore/platform/audio/cocoa/AudioSampleBufferConverter.h
    M Source/WebCore/platform/mediastream/RealtimeOutgoingAudioSource.h

  Log Message:
  -----------
  Add AudioDecoderCocoa class, a CoreMedia implementation of WebCodec's AudioEncoder
https://bugs.webkit.org/show_bug.cgi?id=283903
rdar://problem/140782290

Reviewed by Youenn Fablet.

We add the CoreMedia version of AudioDecoder which uses AudioSampleBufferConverter to decode any supported formats.
For now, the only thing we do not support are:
- vorbis if no description is provided in the AudioConfig object
- opus greater than 2 channels (this is a CoreMedia restrictions)

Covered by existing tests after updating expectations.

* LayoutTests/TestExpectations: Remove all AudioDecoder's related failure expectations. They all pass now.
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/audio-decoder.https.any-expected.txt: Tests full pass now; update expectations
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/audio-decoder.https.any.worker-expected.txt: Tests full pass now; update expectations
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/audio-decoder.https.any-expected.txt: Removed.
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/audio-decoder.https.any.worker-expected.txt: Removed.
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/transfering.https.any-expected.txt: Removed.
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/transfering.https.any.worker-expected.txt: Removed.
* LayoutTests/platform/mac/TestExpectations: on Ventura, Opus and MP3 decoder creation fails.
* Source/WebCore/Modules/webcodecs/WebCodecsAudioDecoder.cpp:
(WebCore::isValidDecoderConfig):
* Source/WebCore/PlatformMac.cmake:
* Source/WebCore/SourcesCocoa.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/AudioDecoder.cpp:
(WebCore::AudioDecoder::isCodecSupported): Check that sample rate and channel count isn't 0.
(WebCore::AudioDecoder::create):
* Source/WebCore/platform/audio/cocoa/AudioDecoderCocoa.cpp: Added.
(WebCore::queueSingleton):
(WebCore::InternalAudioDecoderCocoa::create):
(WebCore::InternalAudioDecoderCocoa::isConfigured const):
(WebCore::InternalAudioDecoderCocoa::converter):
(WebCore::AudioDecoderCocoa::create):
(WebCore::AudioDecoderCocoa::AudioDecoderCocoa):
(WebCore::AudioDecoderCocoa::isCodecSupported):
(WebCore::AudioDecoderCocoa::decode):
(WebCore::AudioDecoderCocoa::flush):
(WebCore::AudioDecoderCocoa::reset):
(WebCore::AudioDecoderCocoa::close):
(WebCore::InternalAudioDecoderCocoa::decompressedAudioOutputBufferCallback):
(WebCore::InternalAudioDecoderCocoa::processedDecodedOutputs):
(WebCore::InternalAudioDecoderCocoa::InternalAudioDecoderCocoa):
(WebCore::InternalAudioDecoderCocoa::initialize):
(WebCore::InternalAudioDecoderCocoa::stripADTSHeader):
(WebCore::InternalAudioDecoderCocoa::decode):
(WebCore::InternalAudioDecoderCocoa::flush):
(WebCore::InternalAudioDecoderCocoa::close):
* Source/WebCore/platform/audio/cocoa/AudioDecoderCocoa.h: Added.
* Source/WebCore/platform/audio/cocoa/AudioSampleBufferConverter.h: Add default member initialiser so that we don't have to explicitly set them on construction.
* Source/WebCore/platform/mediastream/RealtimeOutgoingAudioSource.h:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list