shaka-project / shaka-player-embedded

Shaka Player in a C++ Framework
Apache License 2.0
238 stars 63 forks source link

Build fails when using EME #115

Closed jgongo closed 4 years ago

jgongo commented 4 years ago

The build fails when using the latest version from master of shaka-player-embedded and prebuilt_cdm with the following error:

[... output removed ...]
.../utah/vendor/prebuilt_cdm/shaka_plugin/cdm_host.h:25:3: error: unknown type name 'NON_COPYABLE_OR_MOVABLE_TYPE'
  NON_COPYABLE_OR_MOVABLE_TYPE(TimerAndClockImpl);
  ^
.../utah/vendor/prebuilt_cdm/shaka_plugin/cdm_host.h:25:31: warning: redundant parentheses surrounding declarator [-Wredundant-parens]
  NON_COPYABLE_OR_MOVABLE_TYPE(TimerAndClockImpl);
                              ^~~~~~~~~~~~~~~~~~~

.../utah/vendor/prebuilt_cdm/shaka_plugin/cdm_host.h:44:3: error: unknown type name 'NON_COPYABLE_OR_MOVABLE_TYPE'
  NON_COPYABLE_OR_MOVABLE_TYPE(StorageImpl);
  ^
.../utah/vendor/prebuilt_cdm/shaka_plugin/cdm_host.h:44:31: warning: redundant parentheses surrounding declarator [-Wredundant-parens]
  NON_COPYABLE_OR_MOVABLE_TYPE(StorageImpl);
                              ^~~~~~~~~~~~~

.../utah/vendor/prebuilt_cdm/shaka_plugin/widevine_implementation_factory.cc:58:10: error: cannot initialize return object of type 'shaka::eme::Implementation *' with an lvalue of type 'shaka::eme::WidevineImplementation *'
  return ret;
         ^~~
[... output removed ...]

I'm using the following commands to build the frameworks:

$ ../../vendor/shaka-player-embedded/configure --ios --release --disable-demo --disable-tests --ccache-if-possible --gn-args "ios_enable_code_signing=false" --eme-impl ../../vendor/prebuilt_cdm/shaka_plugin/release_cdm.json --cpu x86
$ ../../vendor/shaka-player-embedded/build.py

Building the Shaka Player Embedded framework with no EME integration works flawlessly.

TheModMaker commented 4 years ago

I forgot the Widevine plugin used those macros when I changed their names. Should be a quick fix. For the moment, you can just add SHAKA_ to before each of those usages.

TheModMaker commented 4 years ago

It should be fixed if you pull the latest master from the prebuilt_cdm repo (it has the same CDM version).