Bug 184835 - Mandate H264 hardware encoder for Mac in libwebrtc
Summary: Mandate H264 hardware encoder for Mac in libwebrtc
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on: 184855
Blocks:
  Show dependency treegraph
 
Reported: 2018-04-20 13:36 PDT by youenn fablet
Modified: 2018-04-30 13:28 PDT (History)
5 users (show)

See Also:


Attachments
Patch (12.60 KB, patch)
2018-04-20 13:49 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (13.02 KB, patch)
2018-04-20 14:16 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (13.01 KB, patch)
2018-04-20 15:28 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (13.01 KB, patch)
2018-04-20 15:29 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (16.93 KB, patch)
2018-04-30 11:27 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2018-04-20 13:36:31 PDT
Mandate H264 hardware encoder for Mac in libwebrtc
Comment 1 youenn fablet 2018-04-20 13:49:18 PDT
Created attachment 338458 [details]
Patch
Comment 2 youenn fablet 2018-04-20 14:16:31 PDT
Created attachment 338459 [details]
Patch
Comment 3 Eric Carlson 2018-04-20 15:11:44 PDT
Comment on attachment 338459 [details]
Patch

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

> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm:615
> +  CFTypeRef sessionValues[] = { webrtc::isH264HardwareEncoderAllowed() ? kCFBooleanTrue : kCFBooleanFalse, webrtc::isH264HardwareEncoderAllowed() ? kCFBooleanTrue : kCFBooleanFalse, kCFBooleanTrue };

Nit: it seems slightly wasteful to call webrtc::isH264HardwareEncoderAllowed() twice here.
Comment 4 youenn fablet 2018-04-20 15:28:54 PDT
Created attachment 338468 [details]
Patch for landing
Comment 5 youenn fablet 2018-04-20 15:29:39 PDT
Created attachment 338469 [details]
Patch for landing
Comment 6 youenn fablet 2018-04-20 15:30:46 PDT
(In reply to Eric Carlson from comment #3)
> Comment on attachment 338459 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=338459&action=review
> 
> > Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm:615
> > +  CFTypeRef sessionValues[] = { webrtc::isH264HardwareEncoderAllowed() ? kCFBooleanTrue : kCFBooleanFalse, webrtc::isH264HardwareEncoderAllowed() ? kCFBooleanTrue : kCFBooleanFalse, kCFBooleanTrue };
> 
> Nit: it seems slightly wasteful to call
> webrtc::isH264HardwareEncoderAllowed() twice here.

Thanks for the review.
I updated the patch accordingly.
Comment 7 WebKit Commit Bot 2018-04-20 15:57:59 PDT
Comment on attachment 338469 [details]
Patch for landing

Clearing flags on attachment: 338469

Committed r230862: <https://trac.webkit.org/changeset/230862>
Comment 8 WebKit Commit Bot 2018-04-20 15:58:01 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2018-04-20 15:58:18 PDT
<rdar://problem/39612500>
Comment 10 WebKit Commit Bot 2018-04-20 18:23:15 PDT
Re-opened since this is blocked by bug 184855
Comment 11 youenn fablet 2018-04-30 11:27:28 PDT
Created attachment 339131 [details]
Patch
Comment 12 youenn fablet 2018-04-30 13:00:35 PDT
Timeouts were due to too many hw encoders allocated and returning too early to use sw encoders
Comment 13 WebKit Commit Bot 2018-04-30 13:28:27 PDT
Comment on attachment 339131 [details]
Patch

Clearing flags on attachment: 339131

Committed r231167: <https://trac.webkit.org/changeset/231167>
Comment 14 WebKit Commit Bot 2018-04-30 13:28:29 PDT
All reviewed patches have been landed.  Closing bug.