當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。