当前位置: 首页>>代码示例>>Java>>正文


Java Camera.setOneShotPreviewCallback方法代码示例

本文整理汇总了Java中android.hardware.Camera.setOneShotPreviewCallback方法的典型用法代码示例。如果您正苦于以下问题:Java Camera.setOneShotPreviewCallback方法的具体用法?Java Camera.setOneShotPreviewCallback怎么用?Java Camera.setOneShotPreviewCallback使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.hardware.Camera的用法示例。


在下文中一共展示了Camera.setOneShotPreviewCallback方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: requestPreviewFrame

import android.hardware.Camera; //导入方法依赖的package包/类
/**
 * A single preview frame will be returned to the handler supplied. The data
 * will arrive as byte[] in the message.obj field, with width and height
 * encoded as message.arg1 and message.arg2, respectively.
 * 
 * @param handler
 *            The handler to send the message to.
 * @param message
 *            The what field of the message to be sent.
 */
public synchronized void requestPreviewFrame(Handler handler, int message) {
	Camera theCamera = camera;
	if (theCamera != null && previewing) {
		previewCallback.setHandler(handler, message);
		theCamera.setOneShotPreviewCallback(previewCallback);
	}
}
 
开发者ID:TonnyL,项目名称:Espresso,代码行数:18,代码来源:CameraManager.java

示例2: requestPreviewFrame

import android.hardware.Camera; //导入方法依赖的package包/类
/**
 * A single preview frame will be returned to the handler supplied. The data will arrive as byte[]
 * in the message.obj field, with width and height encoded as message.arg1 and message.arg2,
 * respectively.
 *
 * @param handler The handler to send the message to.
 * @param message The what field of the message to be sent.
 */
public synchronized void requestPreviewFrame(Handler handler, int message) {
  Camera theCamera = camera;
  if (theCamera != null && previewing) {
    previewCallback.setHandler(handler, message);
    theCamera.setOneShotPreviewCallback(previewCallback);
  }
}
 
开发者ID:PhilippC,项目名称:keepass2android,代码行数:16,代码来源:CameraManager.java

示例3: requestPreviewFrame

import android.hardware.Camera; //导入方法依赖的package包/类
/**
 * A single preview frame will be returned to the handler supplied. The data
 * will arrive as byte[] in the message.obj field, with width and height
 * encoded as message.arg1 and message.arg2, respectively.
 *
 * @param handler The handler to send the message to.
 * @param message The what field of the message to be sent.
 */
public synchronized void requestPreviewFrame(Handler handler, int message) {
    Camera theCamera = camera;
    if (theCamera != null && previewing) {
        previewCallback.setHandler(handler, message);
        theCamera.setOneShotPreviewCallback(previewCallback);
    }
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:16,代码来源:CameraManager.java

示例4: requestPreviewFrame

import android.hardware.Camera; //导入方法依赖的package包/类
/**
 * A single preview frame will be returned to the supplied callback.
 *
 * The thread on which this called is undefined, so a Handler should be used to post the result
 * to the correct thread.
 *
 * @param callback The callback to receive the preview.
 */
public void requestPreviewFrame(PreviewCallback callback) {
    Camera theCamera = camera;
    if (theCamera != null && previewing) {
        cameraPreviewCallback.setCallback(callback);
        theCamera.setOneShotPreviewCallback(cameraPreviewCallback);
    }
}
 
开发者ID:yinhaojun,项目名称:ZxingForAndroid,代码行数:16,代码来源:CameraManager.java

示例5: requestPreviewFrame

import android.hardware.Camera; //导入方法依赖的package包/类
/**
 * A single preview frame will be returned to the handler supplied. The data will arrive as byte[]
 * in the message.obj field, with width and height encoded as message.arg1 and message.arg2,
 * respectively.
 *
 * @param handler The handler to send the message to.
 * @param message The what field of the message to be sent.
 */
public synchronized void requestPreviewFrame(Handler handler, int message) {
    Camera theCamera = camera;
    if (theCamera != null && previewing) {
        previewCallback.setHandler(handler, message);
        theCamera.setOneShotPreviewCallback(previewCallback);
    }
}
 
开发者ID:snice,项目名称:androidscan,代码行数:16,代码来源:CameraManager.java

示例6: requestPreviewFrame

import android.hardware.Camera; //导入方法依赖的package包/类
/**
 * A single preview frame will be returned to the handler supplied. The data
 * will arrive as byte[] in the message.obj field, with width and height
 * encoded as message.arg1 and message.arg2, respectively. <br/>
 *
 * 两个绑定操作:<br/>
 * 1:将handler与回调函数绑定;<br/>
 * 2:将相机与回调函数绑定<br/>
 * 综上,该函数的作用是当相机的预览界面准备就绪后就会调用hander向其发送传入的message
 * 
 * @param handler
 *            The handler to send the message to.
 * @param message
 *            The what field of the message to be sent.
 */
public synchronized void requestPreviewFrame(Handler handler, int message) {
	Camera theCamera = camera;
	if (theCamera != null && previewing) {
		previewCallback.setHandler(handler, message);

		// 绑定相机回调函数,当预览界面准备就绪后会回调Camera.PreviewCallback.onPreviewFrame
		theCamera.setOneShotPreviewCallback(previewCallback);
	}
}
 
开发者ID:dufangyu1990,项目名称:LeCatApp,代码行数:25,代码来源:CameraManager.java


注:本文中的android.hardware.Camera.setOneShotPreviewCallback方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。