Bug 214830

Summary: Disable low latency code path for H264 constrained baseline
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, jer.noble, philipj, sergio, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description youenn fablet 2020-07-27 08:49:55 PDT
Disable low latency code path for H264 constrained baseline
Comment 1 youenn fablet 2020-07-27 08:50:28 PDT
low latency code path is not yet ready to handle CBP, except potentially on MacOS, software code path.
Comment 2 youenn fablet 2020-07-27 08:56:15 PDT
Created attachment 405281 [details]
Patch
Comment 3 Eric Carlson 2020-07-27 10:46:19 PDT
Comment on attachment 405281 [details]
Patch

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

> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm:757
> +    CFBooleanRef hwaccl_enabled = nullptr;
> +    if (status == noErr) {
> +      status = VTSessionCopyProperty(_vtCompressionSession,
> +                               kVTCompressionPropertyKey_UsingHardwareAcceleratedVideoEncoder,
> +                               nullptr,
> +                               &hwaccl_enabled);
> +    }

I see that this is copied from RTCVideoEncoderH264 and RTCVideoEncoderH265 so it isn't new, but doesn't this leak the CFBooleanRef?
Comment 4 youenn fablet 2020-07-28 00:56:58 PDT
(In reply to Eric Carlson from comment #3)
> Comment on attachment 405281 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=405281&action=review
> 
> > Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm:757
> > +    CFBooleanRef hwaccl_enabled = nullptr;
> > +    if (status == noErr) {
> > +      status = VTSessionCopyProperty(_vtCompressionSession,
> > +                               kVTCompressionPropertyKey_UsingHardwareAcceleratedVideoEncoder,
> > +                               nullptr,
> > +                               &hwaccl_enabled);
> > +    }
> 
> I see that this is copied from RTCVideoEncoderH264 and RTCVideoEncoderH265
> so it isn't new, but doesn't this leak the CFBooleanRef?

You are probably right, will handle it as a follow-up
Comment 5 EWS 2020-07-28 01:01:24 PDT
Committed r264966: <https://trac.webkit.org/changeset/264966>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 405281 [details].
Comment 6 Radar WebKit Bug Importer 2020-07-28 01:02:17 PDT
<rdar://problem/66205228>
Comment 7 youenn fablet 2020-07-31 04:04:25 PDT
> > I see that this is copied from RTCVideoEncoderH264 and RTCVideoEncoderH265
> > so it isn't new, but doesn't this leak the CFBooleanRef?
> 
> You are probably right, will handle it as a follow-up

I monitored this and this does not leak apparently.
Most probably CFBooleanRef is by value so CFRelease(CFBooleanRef) is a no-op.