停止/取消执行FFmpeg命令 [英] Stop/cancel execution of FFmpeg command

查看:1552
本文介绍了停止/取消执行FFmpeg命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android有可用的FFmpeg静态(二进制),我们可以在执行某操作时停止/取消某些FFmpeg执行(命令) https://github.com/WritingMinds/ffmpeg-android-java/issues/33

There is FFmpeg Static (binary) available for Android and we can stop/cancel some FFmpeg execution (command) while it's doing something https://github.com/WritingMinds/ffmpeg-android-java/issues/33

但是我想使用FFmpeg共享库和JNI,我发现了下一个库 https://github.com/IljaKosynkin/FFmpeg-Development-Kit (效果很好)

But I want to use FFmpeg shared libraries and JNI, I found next library https://github.com/IljaKosynkin/FFmpeg-Development-Kit (it works ok)

但是没有选择来停止执行FFmpeg命令(或终止进程)

But there is no option to stop execution of FFmpeg command (or killing the process)

我们在此处使用Java本机run方法开始执行一些命令:

We use Java native run method there to start execute some command:

Java: https://github.com/IljaKosynkin/FFmpeg-Development-Kit/blob/master/JNI/app/src/main/java/com/example/ilja/jni/VideoKit.java#L57

然后在C语言中,我们调用FFmpeg的main方法:

and then in C we call FFmpeg's main method:

C: https://github.com. com/IljaKosynkin/FFmpeg-Development-Kit/blob/master/JNI/app/jni/videokit.c#L41

在调用Java run和C main方法后,如何停止/取消某些FFmpeg执行?

How can I stop/cancel some FFmpeg executing after I called Java run and C main methods?

推荐答案

解决方案是编辑ffmmpeg类(添加一些变量以检查它是否应该执行得更多)

the solution is to edit ffmmpeg class (add some variables to check if it should execute farther or not)

这篇关于停止/取消执行FFmpeg命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆