FD- / RPiPlay

An open-source AirPlay mirroring server for the Raspberry Pi. Supports iOS 9 and up.
GNU General Public License v3.0
4.93k stars 353 forks source link

Refactor renderers to take a struct parameter, misc cleanups #157

Closed dougg3 closed 3 years ago

dougg3 commented 4 years ago

After @pallas's suggestion in his review of #154, I went ahead and implemented config structs. I'm still a bit undecided on whether the entire config should just be a single struct instead of separate audio and video config structs. Suggestions would be appreciated! If the consensus is that it should be a single struct I would be glad to update this.

I also noticed that in my previous merged pull request, I screwed up the brace style on my switch statements and forgot to document the new flip option in README.md. I also fixed an existing small style issue with tabs versus spaces.

Finally, I made the CMakeLists.txt file in the renderers compatible with cross-compiling by using CMAKE_SYSROOT when searching /opt/vc. It doesn't harm native builds on the Raspberry Pi, but it helps cross-compilers look in their rootfs rather than the build system's rootfs for the OpenMAX stuff. I got cross-compiling working for this which makes things a lot faster to test on the Pi.

I promise I'll stop bombarding the project with pull requests for a while after this one! 😄

FD- commented 3 years ago

IMHO, separate structs is the way to go here. Thank you very much for your contributions! Keep them coming! Even if it takes me a few days to accept them, I highly appreciate all PRs this project gets!