shaka-project / shaka-player-embedded

Shaka Player in a C++ Framework
Apache License 2.0
239 stars 62 forks source link

iOs Build and include release and dev lib #178

Closed franciscocarodiaz closed 3 years ago

franciscocarodiaz commented 3 years ago

Two questions:

  1. According to the documentation to build release version: mkdir myBuild cd myBuild ../configure --ios --cpu arm64 This will result in a debug configuration; if you want a release build, add the --release argument.

But, according shakaplayer documentation for widevine, I have to use: ../configure --ios --eme-impl ~/widevine_prebuilt_cdm/shaka_plugin/release_cdm.json

Which one is right?

  1. How can I include both version of shakaplayer: dev and release in my project?
TheModMaker commented 3 years ago

You can't have both versions in the same binary since it would cause duplicate symbols. You can make both builds and use Xcode settings to select which one to use based on build settings. For example, our sample build.sh file makes a specific build based on what we are currently building for.

Note there's a difference between Debug/Release in Shaka Embedded and the dev/release in the CDM. Debug/Release in Embedded refers to whether we build with debug symbols and extra debug checks. Release mode will be faster and smaller. Using dev_cdm.json vs release_cdm.json will select different CDM versions; the "dev" version is for testing and allows using a debugger; the "release" version is what you use when you release your app. The two options are mutually exclusive and you can use any combination.

franciscocarodiaz commented 3 years ago

Do you know which one of this command is used to generated release version: ../configure --ios --cpu arm64 or ../configure --ios --eme-impl ~/widevine_prebuilt_cdm/shaka_plugin/release_cdm.json

TheModMaker commented 3 years ago

Neither, both those build the Debug version since they don't include --release. Here are some examples:

# Release build for arm64
../configure --ios --cpu arm64 --release
# Release build for arm64 with dev CDM (testing only)
../configure --ios --cpu arm64 --release --eme-impl ~/widevine_prebuilt_cdm/shaka_plugin/dev_cdm.json
# Release build for arm64 with release CDM
../configure --ios --cpu arm64 --release --eme-impl ~/widevine_prebuilt_cdm/shaka_plugin/release_cdm.json
TheModMaker commented 3 years ago

Closing due to inactivity. If this is still an issue for you or if you have further questions, you can ask us to reopen.