Home | History | Annotate | Download | only in jni
      1 /*
      2  * Copyright (C) 2011 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #ifndef ANDROID_FILTERFW_JNI_NATIVE_FRAME_H
     18 #define ANDROID_FILTERFW_JNI_NATIVE_FRAME_H
     19 
     20 #include <jni.h>
     21 
     22 #ifdef __cplusplus
     23 extern "C" {
     24 #endif
     25 
     26 JNIEXPORT jboolean JNICALL
     27 Java_android_filterfw_core_NativeFrame_nativeAllocate(JNIEnv* env, jobject thiz, jint size);
     28 
     29 JNIEXPORT jboolean JNICALL
     30 Java_android_filterfw_core_NativeFrame_nativeDeallocate(JNIEnv* env, jobject thiz);
     31 
     32 JNIEXPORT jint JNICALL
     33 Java_android_filterfw_core_NativeFrame_nativeIntSize(JNIEnv* env, jclass clazz);
     34 
     35 JNIEXPORT jint JNICALL
     36 Java_android_filterfw_core_NativeFrame_nativeFloatSize(JNIEnv* env, jclass clazz);
     37 
     38 JNIEXPORT jboolean JNICALL
     39 Java_android_filterfw_core_NativeFrame_setNativeInts(JNIEnv* env, jobject thiz, jintArray ints);
     40 
     41 JNIEXPORT jintArray JNICALL
     42 Java_android_filterfw_core_NativeFrame_getNativeInts(JNIEnv* env, jobject thiz, jint size);
     43 
     44 JNIEXPORT jboolean JNICALL
     45 Java_android_filterfw_core_NativeFrame_setNativeFloats(JNIEnv* env, jobject thiz, jfloatArray ints);
     46 
     47 JNIEXPORT jfloatArray JNICALL
     48 Java_android_filterfw_core_NativeFrame_getNativeFloats(JNIEnv* env, jobject thiz, jint size);
     49 
     50 JNIEXPORT jboolean JNICALL
     51 Java_android_filterfw_core_NativeFrame_setNativeData(JNIEnv* env,
     52                                                      jobject thiz,
     53                                                      jbyteArray data,
     54                                                      jint offset,
     55                                                      jint length);
     56 
     57 JNIEXPORT jbyteArray JNICALL
     58 Java_android_filterfw_core_NativeFrame_getNativeData(JNIEnv* env, jobject thiz, jint size);
     59 
     60 JNIEXPORT jboolean JNICALL
     61 Java_android_filterfw_core_NativeFrame_getNativeBuffer(JNIEnv* env, jobject thiz, jobject buffer);
     62 
     63 JNIEXPORT jboolean JNICALL
     64 Java_android_filterfw_core_NativeFrame_setNativeBitmap(JNIEnv* env,
     65                                                        jobject thiz,
     66                                                        jobject bitmap,
     67                                                        jint size,
     68                                                        jint bytes_per_sample);
     69 
     70 JNIEXPORT jboolean JNICALL
     71 Java_android_filterfw_core_NativeFrame_getNativeBitmap(JNIEnv* env,
     72                                                        jobject thiz,
     73                                                        jobject bitmap,
     74                                                        jint size,
     75                                                        jint bytes_per_sample);
     76 
     77 JNIEXPORT jint JNICALL
     78 Java_android_filterfw_core_NativeFrame_getNativeCapacity(JNIEnv* env, jobject thiz);
     79 
     80 JNIEXPORT jboolean JNICALL
     81 Java_android_filterfw_core_NativeFrame_nativeCopyFromNative(JNIEnv* env,
     82                                                             jobject thiz,
     83                                                             jobject frame);
     84 
     85 JNIEXPORT jboolean JNICALL
     86 Java_android_filterfw_core_NativeFrame_nativeCopyFromGL(JNIEnv* env,
     87                                                         jobject thiz,
     88                                                         jobject frame);
     89 
     90 #ifdef __cplusplus
     91 }
     92 #endif
     93 
     94 #endif // ANDROID_FILTERFW_JNI_NATIVE_FRAME_H
     95