Avoid additional buffer copy in userspace

Directly send the data from MediaCodec buffers to the LocalSocket,
without an intermediate copy in userspace.
This commit is contained in:
Romain Vimont 2018-09-09 15:01:55 +02:00
parent a60aef5aaf
commit 66def38b73
4 changed files with 44 additions and 22 deletions

View file

@ -21,7 +21,7 @@ public final class Server {
try {
// synchronous
screenEncoder.streamScreen(device, connection.getOutputStream());
screenEncoder.streamScreen(device, connection.getFd());
} catch (IOException e) {
// this is expected on close
Ln.d("Screen streaming stopped");