173f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh/*
273f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh * Copyright (C) 2010 The Android Open Source Project
373f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh *
473f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh * Licensed under the Apache License, Version 2.0 (the "License");
573f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh * you may not use this file except in compliance with the License.
673f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh * You may obtain a copy of the License at
773f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh *
873f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh *      http://www.apache.org/licenses/LICENSE-2.0
973f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh *
1073f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh * Unless required by applicable law or agreed to in writing, software
1173f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh * distributed under the License is distributed on an "AS IS" BASIS,
1273f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1373f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh * See the License for the specific language governing permissions and
1473f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh * limitations under the License.
1573f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh */
1673f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh
1773f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh#include <stdio.h>
1873f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh
1973f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh#include "jni.h"
2073f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh
2173f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yehextern int registerRtpStream(JNIEnv *env);
2273f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yehextern int registerAudioGroup(JNIEnv *env);
2373f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh
2414ef3fc99b6b2f62e93bd5bbc9a240cd59201af0Aurimas Liutikas__attribute__((visibility("default"))) jint JNI_OnLoad(JavaVM *vm, void *)
2573f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh{
2673f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh    JNIEnv *env = NULL;
2773f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh    if (vm->GetEnv((void **)&env, JNI_VERSION_1_4) != JNI_OK ||
2873f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh        registerRtpStream(env) < 0 || registerAudioGroup(env) < 0) {
2973f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh        return -1;
3073f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh    }
3173f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh    return JNI_VERSION_1_4;
3273f6df1f0aac12c243e2110e30337ab01aa71598Chia-chi Yeh}
33