Created
December 21, 2016 09:06
-
-
Save lhjnano/017644d5b44d9962a83d13fbde09f7b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JNIEXPORT jint JNICALL Java_com_gluesys_util_NDKAdapter_run_1ffmpeg(JNIEnv *env, jobject obj, jobjectArray cmdLines) | |
{ | |
jstring jstr; | |
jsize len = (*env)->GetArrayLength(env, cmdLines); | |
char **argv = (char **) malloc(len*sizeof(char *)); | |
int i=0; | |
for (i=0 ; i<len; i++) { | |
jstr = (*env)->GetObjectArrayElement(env, cmdLines, i); | |
argv[i] = (char *)(*env)->GetStringUTFChars(env, jstr, 0); | |
} | |
LOGI("call run_ffmpeg"); | |
if( len > 0) | |
run_ffmpeg(len, argv); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment