-
Notifications
You must be signed in to change notification settings - Fork 826
Expand file tree
/
Copy pathFFmpegInterface.java
More file actions
73 lines (60 loc) · 2.61 KB
/
FFmpegInterface.java
File metadata and controls
73 lines (60 loc) · 2.61 KB
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
67
68
69
70
71
72
73
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);
/**
* Wait for ffmpeg to get ready asynchronously
* @param onReady code to run when FFmpeg is ready
* @param timeout when to give up in miliseconds
*/
public FFmpegObserver whenFFmpegIsReady(Runnable onReady, int timeout);
}