WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
216534
Add internal flag to enable/disable H264 hardware encoder
https://bugs.webkit.org/show_bug.cgi?id=216534
Summary
Add internal flag to enable/disable H264 hardware encoder
youenn fablet
Reported
2020-09-15 03:37:14 PDT
Add internal flag to enable/disable H264 hardware encoder
Attachments
Patch
(5.42 KB, patch)
2020-09-15 03:39 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(7.67 KB, patch)
2020-09-17 05:06 PDT
,
youenn fablet
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(7.74 KB, patch)
2020-09-17 06:19 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2020-09-15 03:39:41 PDT
Created
attachment 408812
[details]
Patch
Sam Weinig
Comment 2
2020-09-15 09:04:34 PDT
Comment on
attachment 408812
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=408812&action=review
> Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:53 > +LibWebRTCProviderCocoa::LibWebRTCProviderCocoa() > +{ > + setH264HardwareEncoderAllowed(RuntimeEnabledFeatures::sharedFeatures().webRTCH264HardwareEncoderEnabled()); > +} > +
This is a layering violation. Code in platform/ should not know about/call code in page/. While people have recently not been observing this rule, platform code is meant to wrap a platform concept, so should not be directly modifiable by WebKit level preferences like this. Instead, the model that works is have the non-platform part of the code that uses this set this setting.
youenn fablet
Comment 3
2020-09-15 10:01:16 PDT
OK, will think about it more.
youenn fablet
Comment 4
2020-09-17 05:06:51 PDT
Created
attachment 409023
[details]
Patch
youenn fablet
Comment 5
2020-09-17 06:19:39 PDT
Created
attachment 409028
[details]
Patch
Sam Weinig
Comment 6
2020-09-18 08:11:22 PDT
While this is no longer a layering violation, this still maintains the issue of not being really working with the page-based model of WebKit preferences. Is the H264 hardware encoder something that has to be enabled/disable on a process wide basis? Could we always enable it but not filter our uses when disabled for a page?
youenn fablet
Comment 7
2020-09-18 08:17:05 PDT
(In reply to Sam Weinig from
comment #6
)
> While this is no longer a layering violation, this still maintains the issue > of not being really working with the page-based model of WebKit preferences. > > Is the H264 hardware encoder something that has to be enabled/disable on a > process wide basis? Could we always enable it but not filter our uses when > disabled for a page?
We could change the implementation to do like we do for VP9 and HEVC (have an encoder parameter). Slightly more complex but doable. Given this is for testing only though, the process wide parameter seems good enough.
EWS
Comment 8
2020-09-18 10:26:29 PDT
Committed
r267249
: <
https://trac.webkit.org/changeset/267249
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 409028
[details]
.
Radar WebKit Bug Importer
Comment 9
2020-09-18 10:27:21 PDT
<
rdar://problem/69160129
>
Sam Weinig
Comment 10
2020-09-18 10:34:40 PDT
(In reply to youenn fablet from
comment #7
)
> (In reply to Sam Weinig from
comment #6
) > > While this is no longer a layering violation, this still maintains the issue > > of not being really working with the page-based model of WebKit preferences. > > > > Is the H264 hardware encoder something that has to be enabled/disable on a > > process wide basis? Could we always enable it but not filter our uses when > > disabled for a page? > > We could change the implementation to do like we do for VP9 and HEVC (have > an encoder parameter). Slightly more complex but doable. > Given this is for testing only though, the process wide parameter seems good > enough.
This is very discouraging. I have been working to remove process wide state like this, and adding more against my objection only adds to my work.
youenn fablet
Comment 11
2020-09-18 10:43:26 PDT
> This is very discouraging. I have been working to remove process wide state > like this, and adding more against my objection only adds to my work.
I understand the desire for purity. I do not really see the impact of how this is slowing down your work. Strictly speaking, this patch is not introducing any new process wide state, the process wide state was there before this patch. I can remove the pre-existing process wide state as a follow-up but would like to understand the benefit in this particular case. FYI, the purpose of the flag is to help a team reproing an ongoing issue more easily.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug