-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[Cocoa] Add support for per-media-element soundStageSize #41406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Cocoa] Add support for per-media-element soundStageSize #41406
Conversation
|
EWS run on previous version of this PR (hash d698656) Details |
d698656 to
f342eb5
Compare
|
EWS run on previous version of this PR (hash f342eb5) Details |
f342eb5 to
e508c79
Compare
|
EWS run on previous version of this PR (hash e508c79) Details |
e508c79 to
48b7c72
Compare
|
EWS run on current version of this PR (hash 48b7c72) Details |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be a little safer to write this as a switch statement that RELEASE_ASSERT_NOT_REACHED()s in the default case. Right now this implementation asserts that the known enum values numerically match, but will still allow you to cast an unknown value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll address this in a follow up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| SoundStageSize mediaPlayerSoundStageSize() const final { return m_soundStageSize; } | |
| SoundStageSize mediaPlayerSoundStageSize() const final { return m_soundStageSize; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change still needed since you added a using above?
rdar://145660143 https://bugs.webkit.org/show_bug.cgi?id=288601 Reviewed by Andy Estes. Previously, when web content entered fullscreen modes, the increased soundStageSize would propagate down to the AVAudioSession, where that size was applied to all audio generated by every web page. With CASpatialAudioExperience, the soundStageSize can be applied granularly per audio-generating object. Drive-by fix: address a review comment made against 291033@main and set NS_ASSUME_NONNULL in AudioToolboxCoreSPI.h. * Source/WebCore/PAL/pal/spi/cocoa/AudioToolboxCoreSPI.h: * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setSoundStageSize): * Source/WebCore/html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::soundStageSize const): * Source/WebCore/platform/audio/cocoa/SpatialAudioExperienceHelper.h: * Source/WebCore/platform/audio/cocoa/SpatialAudioExperienceHelper.mm: (WebCore::toCASoundStageSize): (WebCore::createSpatialAudioExperienceWithOptions): (WebCore::createExperienceWithOptions): Deleted. * Source/WebCore/platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::soundStageSize const): (WebCore::MediaPlayer::soundStageSizeDidChange): * Source/WebCore/platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerSoundStageSize const): * Source/WebCore/platform/graphics/MediaPlayerEnums.h: * Source/WebCore/platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::soundStageSizeDidChange): * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::updateSpatialTrackingLabel): * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateSpatialTrackingLabel): * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm: (WebCore::MediaPlayerPrivateWebM::updateSpatialTrackingLabel): * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerSoundStageSize const): (WebKit::RemoteMediaPlayerProxy::setSoundStageSize): * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h: * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * Source/WebKit/GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm: (WebKit::RemoteMediaPlayerProxy::mediaPlayerRenderingModeChanged): (WebKit::RemoteMediaPlayerProxy::mediaPlayerOnNewVideoFrameMetadata): (WebKit::RemoteMediaPlayerProxy::nativeImageForCurrentTime): (WebKit::RemoteMediaPlayerProxy::colorSpace): * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::soundStageSizeDidChange): * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h: Canonical link: https://commits.webkit.org/291268@main
48b7c72 to
d5fefcb
Compare
|
Committed 291268@main (d5fefcb): https://commits.webkit.org/291268@main Reviewed commits have been landed. Closing PR #41406 and removing active labels. |
d5fefcb
48b7c72