shaka-project / shaka-player-embedded

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

Missing SDL2 in custom build #126

Closed Megubit closed 4 years ago

Megubit commented 4 years ago

I didn't build the framework for a while so I'm not much up to date, but I'm having trouble with the SDL2/SDL.h include. Googling I found sources/installs for it, but I'm not sure what exactly I need.

I tried the sample project and it works fine but I don't see where it includes SDL2 (I see it's in the third_party folder). Anyways when I make a custom build with: ../configure --ios --cpu arm64 --disable-demo --disable-tests --eme-impl ../wv_prebuilt_cdm/shaka_plugin/release_cdm.json (I paste the shakaplayer, ffmpeg and widevine cdm frameworks into my project, I assume I need all 3 now, as it's not just 1 file as before)

I get errors for file paths in ShakaPlayerEmbedded (all includes that have ../*), I fix those by just removing ../ as the files are actually in the same directory... I checked the sample build and it works with "../" which confuses me even more. But the one I don't know how to fix is the #include <SDL2/SDL.h> in sdl_frame_drawer.h. Any suggestions on how to fix this, or where to include it?

TheModMaker commented 4 years ago

We should remove that include so users don't need it. Especially on iOS where we may not want to include that file at all. As a workaround, the headers are in $build_dir/gen/sdl2/include. The demo works since it uses Objective-C; if you are using Objective-C++, then we'll include the C++ headers too and that gets included with it. If you use Objective-C/Swift, then only the Objective-C headers will be included and that one won't be.

Megubit commented 4 years ago

Thanks, I'll try it tomorrow in office. Just to make sure, since I use Objective-C++, do I need to wait any update, or both Objective-C and Objective-C++ versions are present?

TheModMaker commented 4 years ago

If you include the headers in that folder, it should work fine. You could also try:

Megubit commented 4 years ago

Managed to get it running by including the headers in my project. After that had to remove a bunch of ../media/ and ../ in includes, but the app launched.