Skip to content
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

Support Widevine in Arm64 Brave on Windows #18695

Merged
merged 41 commits into from
Aug 21, 2023
Merged

Conversation

mherrmann
Copy link
Collaborator

@mherrmann mherrmann commented May 31, 2023

Resolves brave/brave-browser#28318.

Notes to reviewers

The design of the implementation is described in the newly-added file brave/browser/widevine/README.md, under section Widevine in Arm64 Brave on Windows: WIDEVINE_ARM64_DLL_FIX. The easiest way to review the code is to read the explanations there, reviewing the mentioned files as you go along.

Submitter Checklist:

  • I have requested a privacy review.
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run lint, npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

Please test that Arm64 Brave on (Arm64) Windows can successfully install the Widevine component and play DRM-protected content at the highest quality.

To check for regressions, please test that Widevine can still be installed and DRM-protected content can still be streamed at the highest quality on Windows and macOS. See for example brave/brave-browser#29469 (comment) for some good tests for checking the video quality.

All tests should be performed with a clean profile. On Windows for example, this means deleting (or temporarily renaming) the %LOCALAPPDATA%\BraveSoftware\Brave-Browser-<channel>\User Data directory. The reason why the profile should be clean is that an existing profile might have already installed the Widevine module.

@mherrmann mherrmann self-assigned this May 31, 2023
@mherrmann mherrmann added the CI/run-network-audit Run network-audit label Jun 6, 2023
@mherrmann mherrmann force-pushed the widevine-on-arm64-windows branch from 944d814 to 109c1c3 Compare June 6, 2023 08:04
@mherrmann mherrmann force-pushed the widevine-on-arm64-windows branch from edf6e1d to e316186 Compare June 7, 2023 13:50
@mherrmann mherrmann marked this pull request as ready for review June 7, 2023 14:01
@mherrmann mherrmann requested review from simonhong, iefremov and a team as code owners June 7, 2023 14:01
@mherrmann mherrmann requested a review from fmarier June 7, 2023 14:04
Copy link
Member

@fmarier fmarier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not do a thorough line-by-line review, but the only security-relevant change I asked for after looking through the code has been fixed.

Copy link
Contributor

@iefremov iefremov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unlocking browser/net/*, patches and chromium_src need some more work as discussed

@mherrmann mherrmann force-pushed the widevine-on-arm64-windows branch from 960a129 to 497793c Compare July 27, 2023 16:55
@mherrmann
Copy link
Collaborator Author

For my own reference: There's now version 4.10.2662.3 in https://dl.google.com/widevine-cdm/versions.txt. This PR may need to be updated.

@mherrmann mherrmann force-pushed the widevine-on-arm64-windows branch from 64e41bc to 3189bb7 Compare August 11, 2023 10:28
@ilina-linaro
Copy link

Thank you for your patch @mherrmann. We @ Linaro are actively watching the progress on this support and this patch.

@ilina-linaro
Copy link

Thank you all for the progress. Is there a binary I can try? I tried building, but ran into compilation issues after many hours of build on my Windows on Arm box.. Haven't gotten around to fixing that, but an installer would be great.

@mherrmann mherrmann enabled auto-merge (squash) August 21, 2023 16:03
@mherrmann
Copy link
Collaborator Author

mherrmann commented Aug 21, 2023

@ilina-linaro once this PR is merged, you should be able to get binaries from Brave's next Nightly release on the GitHub releases page. I normally use BraveBrowserStandaloneNightlySetupArm64.exe.

@mherrmann mherrmann merged commit 38e8f96 into master Aug 21, 2023
@mherrmann mherrmann deleted the widevine-on-arm64-windows branch August 21, 2023 17:23
@github-actions github-actions bot added the potential-layer-violation-fixes This PR touches a BUILD.gn file with check_includes=false label Aug 21, 2023
@github-actions github-actions bot added this to the 1.59.x - Nightly milestone Aug 21, 2023
return true;
}

void RegisterWidevineCdmComponent(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did we add a second copy of this method instead of using buildflags around the params? It's very confusing, especially because the two methods are not even together in the file. This one also has a VLOG that the other one doesn't

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The motivation was to split this source file into two clean halves: One with BUILDFLAG(WIDEVINE_ARM64_DLL_FIX) and the other one without. It felt easier / clearer when implementing this PR. But I can see now that for example when searching for the definition of the function, it is less clear to see which definition will get used. Do you want me to file a follow-up PR that refactors this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/run-network-audit Run network-audit needs-security-review potential-layer-violation-fixes This PR touches a BUILD.gn file with check_includes=false
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Widevine support in Arm64 Windows
8 participants