I am following the documentation for FFmpeg here and I am wondering what I should put as the context?
My function
public static void conversion(String[] cmd) {
FFmpeg ffmpeg = FFmpeg.getInstance(context); //what should I put as the context here?
try {
// to execute "ffmpeg -version" command you just need to pass "-version"
ffmpeg.execute(cmd, new ExecuteBinaryResponseHandler() {
@Override
public void onStart() {
}
@Override
public void onProgress(String message) {
}
@Override
public void onFailure(String message) {
}
@Override
public void onSuccess(String message) {
}
@Override
public void onFinish() {
}
});
} catch (FFmpegCommandAlreadyRunningException e) {
// Handle if FFmpeg is already running
e.printStackTrace();
}
}
And then I call my function like this (from the same class):
public void alert(String message) {
String[] cmd = {"-i"
, message
, "Image.gif"};
conversion(cmd);
}