"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "android/src/com/google/zxing/client/android/camera/PreviewCallback.java" between
zxing-zxing-3.4.0.tar.gz and zxing-zxing-3.4.1.tar.gz

About: ZXing ("zebra crossing") is a multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages.

PreviewCallback.java  (zxing-zxing-3.4.0):PreviewCallback.java  (zxing-zxing-3.4.1)
skipping to change at line 23 skipping to change at line 23
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.zxing.client.android.camera; package com.google.zxing.client.android.camera;
import android.graphics.Point; import android.graphics.Point;
import android.hardware.Camera; import android.hardware.Camera;
import android.os.Handler; import android.os.Handler;
import android.os.Message; import android.os.Message;
import android.util.Log;
@SuppressWarnings("deprecation") // camera APIs @SuppressWarnings("deprecation") // camera APIs
final class PreviewCallback implements Camera.PreviewCallback { final class PreviewCallback implements Camera.PreviewCallback {
private static final String TAG = PreviewCallback.class.getSimpleName();
private final CameraConfigurationManager configManager; private final CameraConfigurationManager configManager;
private Handler previewHandler; private Handler previewHandler;
private int previewMessage; private int previewMessage;
PreviewCallback(CameraConfigurationManager configManager) { PreviewCallback(CameraConfigurationManager configManager) {
this.configManager = configManager; this.configManager = configManager;
} }
void setHandler(Handler previewHandler, int previewMessage) { void setHandler(Handler previewHandler, int previewMessage) {
this.previewHandler = previewHandler; this.previewHandler = previewHandler;
skipping to change at line 52 skipping to change at line 49
@Override @Override
public void onPreviewFrame(byte[] data, Camera camera) { public void onPreviewFrame(byte[] data, Camera camera) {
Point cameraResolution = configManager.getCameraResolution(); Point cameraResolution = configManager.getCameraResolution();
Handler thePreviewHandler = previewHandler; Handler thePreviewHandler = previewHandler;
if (cameraResolution != null && thePreviewHandler != null) { if (cameraResolution != null && thePreviewHandler != null) {
Message message = thePreviewHandler.obtainMessage(previewMessage, cameraRe solution.x, Message message = thePreviewHandler.obtainMessage(previewMessage, cameraRe solution.x,
cameraResolution.y, data); cameraResolution.y, data);
message.sendToTarget(); message.sendToTarget();
previewHandler = null; previewHandler = null;
} else {
Log.d(TAG, "Got preview callback, but no handler or resolution available")
;
} }
} }
} }
 End of changes. 3 change blocks. 
6 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)