From 433a8ce898d10ea950986c953f53058136397a30 Mon Sep 17 00:00:00 2001 From: Dmitriy Krivoruchko Date: Sat, 23 Jul 2016 08:46:04 +0300 Subject: [PATCH] Bug fix for: The producer output buffer format 0x1 doesn't match the ImageReader's configured buffer format 0x2 --- app/build.gradle | 4 ++-- app/src/main/java/info/dvkr/screenstream/ImageGenerator.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 8def24db..52a04088 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,8 +11,8 @@ android { applicationId "info.dvkr.screenstream" minSdkVersion 21 targetSdkVersion 24 - versionCode 2 - versionName "1.0.1" + versionCode 3 + versionName "1.0.2" resConfigs "en", "ru" } diff --git a/app/src/main/java/info/dvkr/screenstream/ImageGenerator.java b/app/src/main/java/info/dvkr/screenstream/ImageGenerator.java index 3d5ff279..4b1d8353 100644 --- a/app/src/main/java/info/dvkr/screenstream/ImageGenerator.java +++ b/app/src/main/java/info/dvkr/screenstream/ImageGenerator.java @@ -91,7 +91,7 @@ void start() { imageThread = new HandlerThread("Image capture thread", Process.THREAD_PRIORITY_MORE_FAVORABLE); imageThread.start(); - imageReader = ImageReader.newInstance(ApplicationContext.getScreenSize().x, ApplicationContext.getScreenSize().y, PixelFormat.RGBX_8888, 2); + imageReader = ImageReader.newInstance(ApplicationContext.getScreenSize().x, ApplicationContext.getScreenSize().y, PixelFormat.RGBA_8888, 2); imageHandler = new Handler(imageThread.getLooper()); jpegOutputStream = new ByteArrayOutputStream(); imageReader.setOnImageAvailableListener(new ImageAvailableListener(), imageHandler);