Add support for vr goggle phone holders (Split display rendering of video)
Addresses https://github.com/fpvout/DigiView-Android/issues/9
This adds a "VR" mode to support vr goggle phone holders, like Google Cardboard etc. For testing, I used this one: https://www.amazon.com/dp/B08SBM1HMW?psc=1&ref=ppx_yo2_dt_b_product_details
It makes use of code from Google's "Grafika" project (see https://github.com/google/grafika) in order to do OpenGL ES operations and render the video twice with good performance. This code is in the "gles" folder.
A preferences setting was added for "Enable VR Goggle Mode"
I'm not sure how you are translating strings for this project, so my strings are currently in English only. Let me know if there is something I should do to translate them, I could use google translate or something.

https://user-images.githubusercontent.com/19310623/122628141-456f5600-d069-11eb-89e6-45ec569a55f0.mov
Hi @0TheRain0 ! Thanks for your contribution !
Just a few questions on this :
- Why do you import the grafika lib in code ? couldn't this be imported by gradle ? I'd like to keep external dependencies outside of this repo if possible. (checking out at the lib it says it's not stable, do you think there are some other alternatives, that we could trust ?)
- Do you think it's possible to move most of the logic ot a separate class ? I don't want to overcomplicate the videoReaderExoPlayer class. this class may be replaced in the future and will be refactored, so keeping it simple in there would make it easier to maintain :) Maybe abstracting the surface rendering type is a good idea ?
don't worry about translations yet, we will do a translation round before next release :)
Thanks a lot !
Hey @0TheRain0 Amazing work here! We'd like to get this out with the next release if possible, quite a few people are asking for this awesome feature!
I can't seem to locate you in our Discord server, any chance you could reply with your username (or @ me in the server @d3vl_jack), please, we can discuss more in dev-chat!
Thanks!
@Jack-Rogers @jlucidar I'm not on the discord - i'll try to get on there later today! @jlucidar with regards to your requests - on the topic of including grafika as a dependency instead of putting parts of it's code in the code base - unfortunately it's not a library and can't be used that way. Also, it's not a code base that is being actively developed, so it won't be getting updates. The license and source is cited in the files though, and it's ok to include the sources in your own project from what I know. As far as separating out this code from the videoReaderExoPlayer class, I can look into that. Also I need to make a fix for the aspect of the two images. Will try to get that done soon.
@jlucidar @Jack-Rogers I moved most of the VR code into a new custom view class "VrView" and it along with the gles code to a subpackage "vr". So now most of this is consolidated to that package. I also put in a fix for the aspect - when I had tested this while my buddy was flying it made me feel kind of queezy before and the image looked a little off... but with this fix it looks much better in the goggles.
I don't know if you noticed but I made some formatting and indentation corrections in videoReaderExoPlayer as well.. but if you'd like and if that makes this confusing to read, I can undo that portion of my changes.

Neat! it looks way better! thanks for your efforts. I will check your branch out today, and do some testing to see if everything is ok, And will merge it if it works. I saw that some dependencies might be cleaned up but I can deal with that :)
Will this be added to the app in an update? This feature will be amazing!!