|
|
@ -105,5 +105,69 @@ JNIEXPORT jstring JNICALL |
|
|
|
Java_com_github_xch168_ffmpeg_invoker_FFmpegInvoker_getConfigInfo(JNIEnv *env, jclass clazz) { |
|
|
|
Java_com_github_xch168_ffmpeg_invoker_FFmpegInvoker_getConfigInfo(JNIEnv *env, jclass clazz) { |
|
|
|
char info[10000] = {0}; |
|
|
|
char info[10000] = {0}; |
|
|
|
sprintf(info, "%s\n", avcodec_configuration()); |
|
|
|
sprintf(info, "%s\n", avcodec_configuration()); |
|
|
|
|
|
|
|
return (*env)->NewStringUTF(env, info); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JNIEXPORT jstring JNICALL |
|
|
|
|
|
|
|
Java_com_github_xch168_ffmpeg_invoker_FFmpegInvoker_getAVCodecInfo(JNIEnv *env, jclass clazz) { |
|
|
|
|
|
|
|
char info[40000] = { 0 }; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AVCodec *c_temp = av_codec_next(NULL); |
|
|
|
|
|
|
|
while (c_temp != NULL) { |
|
|
|
|
|
|
|
if (c_temp->decode != NULL) { |
|
|
|
|
|
|
|
sprintf(info, "%s[Dec]", info); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
|
|
|
|
sprintf(info, "%s[Enc]", info); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
switch (c_temp->type) { |
|
|
|
|
|
|
|
case AVMEDIA_TYPE_VIDEO: |
|
|
|
|
|
|
|
sprintf(info, "%s[Video]", info); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case AVMEDIA_TYPE_AUDIO: |
|
|
|
|
|
|
|
sprintf(info, "%s[Audio]", info); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
sprintf(info, "%s[Other]", info); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
sprintf(info, "%s[%10s]\n", info, c_temp->name); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
c_temp=c_temp->next; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (*env)->NewStringUTF(env, info); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JNIEXPORT jstring JNICALL |
|
|
|
|
|
|
|
Java_com_github_xch168_ffmpeg_invoker_FFmpegInvoker_getAVFormatInfo(JNIEnv *env, jclass clazz) { |
|
|
|
|
|
|
|
char info[40000] = { 0 }; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AVInputFormat *if_temp = av_iformat_next(NULL); |
|
|
|
|
|
|
|
AVOutputFormat *of_temp = av_oformat_next(NULL); |
|
|
|
|
|
|
|
//Input
|
|
|
|
|
|
|
|
while (if_temp != NULL) { |
|
|
|
|
|
|
|
sprintf(info, "%s[In ][%10s]\n", info, if_temp->name); |
|
|
|
|
|
|
|
if_temp = if_temp->next; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//Output
|
|
|
|
|
|
|
|
while (of_temp != NULL) { |
|
|
|
|
|
|
|
sprintf(info, "%s[Out][%10s]\n", info, of_temp->name); |
|
|
|
|
|
|
|
of_temp = of_temp->next; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (*env)->NewStringUTF(env, info); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JNIEXPORT jstring JNICALL |
|
|
|
|
|
|
|
Java_com_github_xch168_ffmpeg_invoker_FFmpegInvoker_getAVFilterInfo(JNIEnv *env, jclass clazz) { |
|
|
|
|
|
|
|
char info[40000] = { 0 }; |
|
|
|
|
|
|
|
AVFilter *f_temp = (AVFilter *)avfilter_next(NULL); |
|
|
|
|
|
|
|
while (f_temp != NULL) { |
|
|
|
|
|
|
|
sprintf(info, "%s[%10s]\n", info, f_temp->name); |
|
|
|
|
|
|
|
f_temp = f_temp->next; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return (*env)->NewStringUTF(env, info); |
|
|
|
return (*env)->NewStringUTF(env, info); |
|
|
|
} |
|
|
|
} |