Bug 219503 - [Cocoa] Adopt AVOutputDevice.allowsHeadTrackedSpatialAudio
Summary: [Cocoa] Adopt AVOutputDevice.allowsHeadTrackedSpatialAudio
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-12-03 12:24 PST by Jer Noble
Modified: 2020-12-04 14:59 PST (History)
7 users (show)

See Also:


Attachments
Patch (8.79 KB, patch)
2020-12-03 12:33 PST, Jer Noble
eric.carlson: review+
Details | Formatted Diff | Diff
Patch for landing (8.73 KB, patch)
2020-12-04 12:38 PST, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2020-12-03 12:24:42 PST
[Cocoa] Adopt AVOutputDevice.allowsHeadTrackedSpatialAudio
Comment 1 Jer Noble 2020-12-03 12:33:21 PST
Created attachment 415324 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2020-12-03 12:35:17 PST
<rdar://problem/71948199>
Comment 3 Peng Liu 2020-12-04 10:37:57 PST
Comment on attachment 415324 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=415324&action=review

> Source/WebCore/PAL/ChangeLog:9
> +        sharedSystemAudioContextânot the sharedAudioPresentationOutputContextâto do so. This context

Nit. sharedSystemAudioContextânot and sharedAudioPresentationOutputContextâto.

> Source/WebCore/PAL/pal/avfoundation/OutputContext.mm:53
> +        AVOutputContext* context = [getAVOutputContextClass() sharedSystemAudioContext];

Can this one use auto as well?

> Source/WebCore/platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp:139
> +            if (devices.isEmpty() || !WTF::allOf(devices, [] (auto& device) {

Nit. The space between square brackets and parentheses of the lambda function can be removed.
Comment 4 Eric Carlson 2020-12-04 10:56:58 PST
Comment on attachment 415324 [details]
Patch

r=me with Peng's nit's addressed
Comment 5 Jer Noble 2020-12-04 11:31:33 PST
(In reply to Peng Liu from comment #3)
> Comment on attachment 415324 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=415324&action=review
> 
> > Source/WebCore/PAL/ChangeLog:9
> > +        sharedSystemAudioContextânot the sharedAudioPresentationOutputContextâto do so. This context
> 
> Nit. sharedSystemAudioContextânot and
> sharedAudioPresentationOutputContextâto.

Ooh, fun UTF character there.

> > Source/WebCore/PAL/pal/avfoundation/OutputContext.mm:53
> > +        AVOutputContext* context = [getAVOutputContextClass() sharedSystemAudioContext];
> 
> Can this one use auto as well?

No; the compiler complains that the deducted type is "id".

> > Source/WebCore/platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp:139
> > +            if (devices.isEmpty() || !WTF::allOf(devices, [] (auto& device) {
> 
> Nit. The space between square brackets and parentheses of the lambda
> function can be removed.

Ok.
Comment 6 Jer Noble 2020-12-04 12:38:58 PST
Created attachment 415447 [details]
Patch for landing
Comment 7 EWS 2020-12-04 14:59:02 PST
Committed r270463: <https://trac.webkit.org/changeset/270463>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 415447 [details].