jni_native_frame.h revision 65953da4636fbf5f0a24b8f5f2b5fa7d76ff13d9
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
23extern "C" {
24#endif
25
26JNIEXPORT jboolean JNICALL
27Java_android_filterfw_core_NativeFrame_nativeAllocate(JNIEnv* env, jobject thiz, jint size);
28
29JNIEXPORT jboolean JNICALL
30Java_android_filterfw_core_NativeFrame_nativeDeallocate(JNIEnv* env, jobject thiz);
31
32JNIEXPORT jint JNICALL
33Java_android_filterfw_core_NativeFrame_nativeIntSize(JNIEnv* env, jclass clazz);
34
35JNIEXPORT jint JNICALL
36Java_android_filterfw_core_NativeFrame_nativeFloatSize(JNIEnv* env, jclass clazz);
37
38JNIEXPORT jboolean JNICALL
39Java_android_filterfw_core_NativeFrame_setNativeInts(JNIEnv* env, jobject thiz, jintArray ints);
40
41JNIEXPORT jintArray JNICALL
42Java_android_filterfw_core_NativeFrame_getNativeInts(JNIEnv* env, jobject thiz, jint size);
43
44JNIEXPORT jboolean JNICALL
45Java_android_filterfw_core_NativeFrame_setNativeFloats(JNIEnv* env, jobject thiz, jfloatArray ints);
46
47JNIEXPORT jfloatArray JNICALL
48Java_android_filterfw_core_NativeFrame_getNativeFloats(JNIEnv* env, jobject thiz, jint size);
49
50JNIEXPORT jboolean JNICALL
51Java_android_filterfw_core_NativeFrame_setNativeData(JNIEnv* env,
52                                                     jobject thiz,
53                                                     jbyteArray data,
54                                                     jint offset,
55                                                     jint length);
56
57JNIEXPORT jbyteArray JNICALL
58Java_android_filterfw_core_NativeFrame_getNativeData(JNIEnv* env, jobject thiz, jint size);
59
60JNIEXPORT jboolean JNICALL
61Java_android_filterfw_core_NativeFrame_getNativeBuffer(JNIEnv* env, jobject thiz, jobject buffer);
62
63JNIEXPORT jboolean JNICALL
64Java_android_filterfw_core_NativeFrame_setNativeBitmap(JNIEnv* env,
65                                                       jobject thiz,
66                                                       jobject bitmap,
67                                                       jint size,
68                                                       jint bytes_per_sample);
69
70JNIEXPORT jboolean JNICALL
71Java_android_filterfw_core_NativeFrame_getNativeBitmap(JNIEnv* env,
72                                                       jobject thiz,
73                                                       jobject bitmap,
74                                                       jint size,
75                                                       jint bytes_per_sample);
76
77JNIEXPORT jint JNICALL
78Java_android_filterfw_core_NativeFrame_getNativeCapacity(JNIEnv* env, jobject thiz);
79
80JNIEXPORT jboolean JNICALL
81Java_android_filterfw_core_NativeFrame_nativeCopyFromNative(JNIEnv* env,
82                                                            jobject thiz,
83                                                            jobject frame);
84
85JNIEXPORT jboolean JNICALL
86Java_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