Google Widevine CDM?

Jan Beich jbeich at FreeBSD.org
Wed Mar 7 17:15:48 UTC 2018


Johannes Lundberg <johalun0 at gmail.com> writes:

> Hi
>
> How far away is this (if even possible) so that we can enjoy Netflix on
> FreeBSD? :)

Modern browsers use CDM adapter to make it look like a plugin: PPAPI on Chrome,
GMP on Firefox. To use Linux plugins on FreeBSD it'd require patching IPC to
invoke Linux version of plugin process (if linuxulator supports), proxying just
libwidevinecdm.so (portable across Chromium/Firefox/Kodi) or proxying entire
PPAPI (a la nspluginwrapper) to get Adobe Flash as well.

# adapters are open source
https://cs.chromium.org/search/?q=ppapi_cdm_adapter # aka libwidevinecdmadapter.so
https://searchfox.org/mozilla-central/search?q=widevine-adapter
# libwidevinecdm.so API
https://cs.chromium.org/chromium/src/media/cdm/api/

Another option is to ask FreeBSD Foundation to get Google to provide source for
Widevine CDM under NDA, so the Foundation can build FreeBSD binary and then
distribute it to users (a la Diablo JDK). The code has only few dependencies
(glib2, nss) and may not even require porting to FreeBSD.

  # for Chromium with enable_widevine=true, version 1.4.9.1070, built on 2018-03-06
  $ fetch https://dl.google.com/linux/deb/pool/main/g/google-chrome-stable/google-chrome-stable_65.0.3325.146-1_amd64.deb
  $ tar xOf google-chrome-stable_65.0.3325.146-1_amd64.deb --include data.tar.xz |
    tar xvf - --include \*/libwidevinecdm.so --strip-components 4

or

  # for Firefox, built on 2017-08-03
  $ fetch https://dl.google.com/widevine-cdm/1.4.8.1008-linux-x64.zip
  $ tar xvf 1.4.8.1008-linux-x64.zip

  $ readelf -d libwidevinecdm.so | fgrep NEEDED
   0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
   0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
   0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
   0x0000000000000001 (NEEDED)             Shared library: [libdl.so.2]
   0x0000000000000001 (NEEDED)             Shared library: [librt.so.1]
   0x0000000000000001 (NEEDED)             Shared library: [libglib-2.0.so.0]
   0x0000000000000001 (NEEDED)             Shared library: [libnss3.so]
   0x0000000000000001 (NEEDED)             Shared library: [libnssutil3.so]
   0x0000000000000001 (NEEDED)             Shared library: [libnspr4.so]
   0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
   0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
   0x0000000000000001 (NEEDED)             Shared library: [ld-linux-x86-64.so.2]

  $ nm --demangle --defined-only -D libwidevinecdm.so
  000000000008bf40 T CreateCdmInstance
  000000000008bf20 T DeinitializeCdmModule
  000000000008bfd0 T GetCdmVersion
  000000000008bde0 T InitializeCdmModule_4
  0000000000069020 T VerifyCdmHost_0
  0000000000000010 b tcmalloc::ThreadCache::threadlocal_heap_
  00000000001be7bc T _fini
  0000000000014a58 T _init
  00000000000161c0 T calloc
  0000000000016110 T free
  0000000000016130 T malloc
  00000000000163a0 T posix_memalign
  0000000000016260 T realloc


More information about the freebsd-chromium mailing list