Closed gsus24 closed 2 years ago
Hey @gsus24, do you get the same results using both grabber versions? If it is only grabbing a portion of the screen, I would wager so... If you are going to try and scale the image while grabbing the screen at the native resolution, you may have more success trying the openGL grabber variant. You would obviously want to capture at the non-scaled resolution, and then you could perform the scaling using openGL (which I would imagine would be more efficient at the task, but some of this stuff is mysterious to me).
I have some code in the early commits that has a scaling function: https://github.com/abrenoch/hyperion-android-grabber/blob/e36619d89db7dc31d9bb040251f970c1545cea58/mobile/src/main/java/com/abrenoch/hyperiongrabber/HyperionScreenEncoder.java on line 460. You will also want to make note of exactly where that function is called, since there is some type of context switching for ogl. In that same file you will find a 'saveImage' function too that I found really helpful when testing, which will output the frames to your device rather than sending them, so you can get a better idea of exactly what is being sent. To make that work you would need to edit the manifest and grant write permissions to the app, but let me know f you have any trouble and I'm sure I can help!
I'm starting to feel like I'm the only person the app actually work well for :laughing:
@abrenoch Testing on Samsung i9195 phone running 7.1 it works like a charm ;) If i find time i will give a try. I'll get in touch again.
Hi
running on 5.1.1 its only captures the pixels from upper left corner. Tried with out scaling, but as expected extremly slow...
My idea is capture with full resolution and scale after
Image img = reader.acquireLatestImage();
before 'savePixels(ing)' I am a PLC Programmer no Android. Any suggestions on doing this or why it is only captures a small part?