dkrivoruchko / ScreenStream

ScreenStream Android App
https://screenstream.io
MIT License
1.7k stars 337 forks source link

fixed “unknown format” problem #128

Closed sorachan closed 3 years ago

sorachan commented 3 years ago

Tried to use the app on my Samsung N8010 tablet running LineageOS 14.1 but failed due to the „unknown format“ problem. Did some research and found out that the ImageReader approach will fail when the producer's pixel format is not supported by ImageReader (as is the case for BGRA_8888 / 0x5, which is used by my device). Thankfully, I stumbled upon a solution on StackExchange using OpenGL, making use of some classes from Google's Grafika project which I then successfully built into the BitmapCapture class as a fallback so now the app is working on my tablet and I can use it for streaming my screen to Zoom since normal screen share won't work as their app seems to trip over the pixel format, too. Great app, 5/5! I hope this contribution is of any use to you, Dmitriy.

Before:

After:

sorachan commented 3 years ago

Damn, I just realized that the fallback code crashes when the device is rotated. I'm gonna fix this and push a new commit within the next hours.

sorachan commented 3 years ago

Got it, apparently the crash was due to an EGL_BAD_ACCESS error which could be fixed by makeNothingCurrent().

dkrivoruchko commented 3 years ago

Cool. Thanks!