本文整理汇总了C++中JNICameraContext::isRawImageCallbackBufferAvailable方法的典型用法代码示例。如果您正苦于以下问题:C++ JNICameraContext::isRawImageCallbackBufferAvailable方法的具体用法?C++ JNICameraContext::isRawImageCallbackBufferAvailable怎么用?C++ JNICameraContext::isRawImageCallbackBufferAvailable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JNICameraContext
的用法示例。
在下文中一共展示了JNICameraContext::isRawImageCallbackBufferAvailable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: android_hardware_Camera_takePicture
static void android_hardware_Camera_takePicture(JNIEnv *env, jobject thiz, int msgType)
{
LOGV("takePicture");
JNICameraContext* context;
sp<Camera> camera = get_native_camera(env, thiz, &context);
if (camera == 0) return;
/*
* When CAMERA_MSG_RAW_IMAGE is requested, if the raw image callback
* buffer is available, CAMERA_MSG_RAW_IMAGE is enabled to get the
* notification _and_ the data; otherwise, CAMERA_MSG_RAW_IMAGE_NOTIFY
* is enabled to receive the callback notification but no data.
*
* Note that CAMERA_MSG_RAW_IMAGE_NOTIFY is not exposed to the
* Java application.
*/
if (msgType & CAMERA_MSG_RAW_IMAGE) {
LOGV("Enable raw image callback buffer");
if (!context->isRawImageCallbackBufferAvailable()) {
LOGV("Enable raw image notification, since no callback buffer exists");
msgType &= ~CAMERA_MSG_RAW_IMAGE;
msgType |= CAMERA_MSG_RAW_IMAGE_NOTIFY;
}
}
if (camera->takePicture(msgType) != NO_ERROR) {
jniThrowRuntimeException(env, "takePicture failed");
return;
}
}