Lines Matching refs:env

361 static sp<ANativeWindow> getNativeWindow(JNIEnv* env, jobject surface) {
364 anw = android_view_Surface_getNativeWindow(env, surface);
365 if (env->ExceptionCheck()) {
369 jniThrowNullPointerException(env, "surface");
373 jniThrowExceptionFmt(env, "java/lang/IllegalArgumentException",
380 static sp<ANativeWindow> getNativeWindowFromTexture(JNIEnv* env, jobject surfaceTexture) {
383 anw = android_SurfaceTexture_getNativeWindow(env, surfaceTexture);
384 if (env->ExceptionCheck()) {
388 jniThrowNullPointerException(env, "surfaceTexture");
392 jniThrowExceptionFmt(env, "java/lang/IllegalArgumentException",
399 static sp<Surface> getSurface(JNIEnv* env, jobject surface) {
402 s = android_view_Surface_getSurface(env, surface);
403 if (env->ExceptionCheck()) {
407 jniThrowNullPointerException(env, "surface");
411 jniThrowExceptionFmt(env, "java/lang/IllegalArgumentException",
420 static jint LegacyCameraDevice_nativeDetectSurfaceType(JNIEnv* env, jobject thiz, jobject surface) {
423 if ((anw = getNativeWindow(env, surface)) == NULL) {
437 static jint LegacyCameraDevice_nativeDetectSurfaceDimens(JNIEnv* env, jobject thiz,
446 if (env->GetArrayLength(dimens) < 2) {
452 if ((anw = getNativeWindow(env, surface)) == NULL) {
469 env->SetIntArrayRegion(dimens, /*start*/0, /*length*/ARRAY_SIZE(dimenBuf), dimenBuf);
473 static jint LegacyCameraDevice_nativeDetectTextureDimens(JNIEnv* env, jobject thiz,
477 if ((anw = getNativeWindowFromTexture(env, surfaceTexture)) == NULL) {
497 env->SetIntArrayRegion(dimens, /*start*/0, /*length*/ARRAY_SIZE(dimenBuf), dimenBuf);
498 if (env->ExceptionCheck()) {
504 static jint LegacyCameraDevice_nativeConfigureSurface(JNIEnv* env, jobject thiz, jobject surface,
508 if ((anw = getNativeWindow(env, surface)) == NULL) {
520 static jint LegacyCameraDevice_nativeProduceFrame(JNIEnv* env, jobject thiz, jobject surface,
525 if ((anw = getNativeWindow(env, surface)) == NULL) {
531 jniThrowNullPointerException(env, "pixelBuffer");
535 int32_t bufSize = static_cast<int32_t>(env->GetArrayLength(pixelBuffer));
536 jbyte* pixels = env->GetByteArrayElements(pixelBuffer, /*is_copy*/NULL);
539 jniThrowNullPointerException(env, "pixels");
545 env->ReleaseByteArrayElements(pixelBuffer, pixels, JNI_ABORT);
554 static jint LegacyCameraDevice_nativeSetSurfaceFormat(JNIEnv* env, jobject thiz, jobject surface,
558 if ((anw = getNativeWindow(env, surface)) == NULL) {
570 static jint LegacyCameraDevice_nativeSetSurfaceDimens(JNIEnv* env, jobject thiz, jobject surface,
574 if ((anw = getNativeWindow(env, surface)) == NULL) {
595 static jlong LegacyCameraDevice_nativeGetSurfaceId(JNIEnv* env, jobject thiz, jobject surface) {
598 if ((s = getSurface(env, surface)) == NULL) {
619 static jint LegacyCameraDevice_nativeSetSurfaceOrientation(JNIEnv* env, jobject thiz,
623 if ((anw = getNativeWindow(env, surface)) == NULL) {
655 static jint LegacyCameraDevice_nativeSetNextTimestamp(JNIEnv* env, jobject thiz, jobject surface,
659 if ((anw = getNativeWindow(env, surface)) == NULL) {
675 static jint LegacyCameraDevice_nativeGetJpegFooterSize(JNIEnv* env, jobject thiz) {
719 int register_android_hardware_camera2_legacy_LegacyCameraDevice(JNIEnv* env)
722 return AndroidRuntime::registerNativeMethods(env,