-
Notifications
You must be signed in to change notification settings - Fork 831
/
Copy pathFFmpegInterface.java
executable file
·66 lines (54 loc) · 2.36 KB
/
FFmpegInterface.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package com.github.hiteshsondhi88.libffmpeg;
import java.util.Map;
import com.github.hiteshsondhi88.libffmpeg.exceptions.FFmpegCommandAlreadyRunningException;
import com.github.hiteshsondhi88.libffmpeg.exceptions.FFmpegNotSupportedException;
@SuppressWarnings("unused")
interface FFmpegInterface {
/**
* Load binary to the device according to archituecture. This also updates FFmpeg binary if the binary on device have old version.
* @param ffmpegLoadBinaryResponseHandler {@link FFmpegLoadBinaryResponseHandler}
* @throws FFmpegNotSupportedException
*/
public void loadBinary(FFmpegLoadBinaryResponseHandler ffmpegLoadBinaryResponseHandler) throws FFmpegNotSupportedException;
/**
* Executes a command
* @param environvenmentVars Environment variables
* @param cmd command to execute
* @param ffmpegExecuteResponseHandler {@link FFmpegExecuteResponseHandler}
* @throws FFmpegCommandAlreadyRunningException
*/
public void execute(Map<String, String> environvenmentVars, String[] cmd, FFmpegExecuteResponseHandler ffmpegExecuteResponseHandler) throws FFmpegCommandAlreadyRunningException;
/**
* Executes a command
* @param cmd command to execute
* @param ffmpegExecuteResponseHandler {@link FFmpegExecuteResponseHandler}
* @throws FFmpegCommandAlreadyRunningException
*/
public void execute(String[] cmd, FFmpegExecuteResponseHandler ffmpegExecuteResponseHandler) throws FFmpegCommandAlreadyRunningException;
/**
* Tells FFmpeg version currently on device
* @return FFmpeg version currently on device
* @throws FFmpegCommandAlreadyRunningException
*/
public String getDeviceFFmpegVersion() throws FFmpegCommandAlreadyRunningException;
/**
* Tells FFmpeg version shipped with current library
* @return FFmpeg version shipped with Library
*/
public String getLibraryFFmpegVersion();
/**
* Checks if FFmpeg command is Currently running
* @return true if FFmpeg command is running
*/
public boolean isFFmpegCommandRunning();
/**
* Kill Running FFmpeg process
* @return true if process is killed successfully
*/
public boolean killRunningProcesses();
/**
* Timeout for FFmpeg process, should be minimum of 10 seconds
* @param timeout in milliseconds
*/
public void setTimeout(long timeout);
}