-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathMediaFFM.java
More file actions
253 lines (192 loc) · 21.1 KB
/
Copy pathMediaFFM.java
File metadata and controls
253 lines (192 loc) · 21.1 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
package javaforce.ffm;
import java.lang.foreign.*;
import java.lang.invoke.*;
import static java.lang.foreign.ValueLayout.*;
import javaforce.*;
import javaforce.ffm.*;
import javaforce.api.*;
import javaforce.media.*;
/** MediaAPI FFM implementation.
*
* Generated by GenFFM - DO NOT EDIT
*/
public class MediaFFM implements MediaAPI {
private FFM ffm;
private static MediaFFM instance;
public static synchronized MediaFFM getInstance() {
if (instance == null) {
instance = new MediaFFM();
if (!instance.ffm_init()) {
JFLog.log("MediaFFM init failed!");
instance = null;
}
}
return instance;
}
private MethodHandle audioDecoderChange;
public boolean audioDecoderChange(long a1,int a2,int a3) { try { boolean _ret_value_ = (boolean)audioDecoderChange.invokeExact(a1,a2,a3);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return false;} }
private MethodHandle getPacketKeyFrame;
public boolean getPacketKeyFrame(long a1) { try { boolean _ret_value_ = (boolean)getPacketKeyFrame.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return false;} }
private MethodHandle inputClose;
public boolean inputClose(long a1,javaforce.media.MediaIO a2) { try { FFM.setMediaIO(a2);boolean _ret_value_ = (boolean)inputClose.invokeExact(a1,FFM.upcall_MediaIO);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return false;} }
private MethodHandle inputOpenAudio;
public boolean inputOpenAudio(long a1,javaforce.media.MediaIO a2,int a3,int a4) { try { FFM.setMediaIO(a2);boolean _ret_value_ = (boolean)inputOpenAudio.invokeExact(a1,FFM.upcall_MediaIO,a3,a4);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return false;} }
private MethodHandle inputOpenVideo;
public boolean inputOpenVideo(long a1,javaforce.media.MediaIO a2,int a3,int a4) { try { FFM.setMediaIO(a2);boolean _ret_value_ = (boolean)inputOpenVideo.invokeExact(a1,FFM.upcall_MediaIO,a3,a4);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return false;} }
private MethodHandle inputSeek;
public boolean inputSeek(long a1,javaforce.media.MediaIO a2,long a3) { try { FFM.setMediaIO(a2);boolean _ret_value_ = (boolean)inputSeek.invokeExact(a1,FFM.upcall_MediaIO,a3);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return false;} }
private MethodHandle outputClose;
public boolean outputClose(long a1,javaforce.media.MediaIO a2) { try { FFM.setMediaIO(a2);boolean _ret_value_ = (boolean)outputClose.invokeExact(a1,FFM.upcall_MediaIO);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return false;} }
private MethodHandle videoDecoderChange;
public boolean videoDecoderChange(long a1,int a2,int a3) { try { boolean _ret_value_ = (boolean)videoDecoderChange.invokeExact(a1,a2,a3);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return false;} }
private MethodHandle writeHeader;
public boolean writeHeader(long a1,javaforce.media.MediaIO a2) { try { FFM.setMediaIO(a2);boolean _ret_value_ = (boolean)writeHeader.invokeExact(a1,FFM.upcall_MediaIO);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return false;} }
private MethodHandle writePacket;
public boolean writePacket(long a1,javaforce.media.MediaIO a2,int a3,byte[] a4,int a5,int a6,boolean a7) { try { Arena arena = Arena.ofAuto(); MemorySegment _array_a4 = FFM.toMemory(arena, a4);FFM.setMediaIO(a2);boolean _ret_value_ = (boolean)writePacket.invokeExact(a1,FFM.upcall_MediaIO,a3,_array_a4,a5,a6,a7);FFM.copyBack(_array_a4,a4);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return false;} }
private MethodHandle audioEncoderEncode;
public byte[] audioEncoderEncode(long a1,short[] a2,int a3,int a4) { try { Arena arena = Arena.ofAuto(); MemorySegment _array_a2 = FFM.toMemory(arena, a2);FFM.createFFMArray();audioEncoderEncode.invokeExact(a1,_array_a2,a3,a4);FFM.copyBack(_array_a2,a2);return (byte[])FFM.getArray(); } catch (Throwable t) { JFLog.log(t); return null;} }
private MethodHandle videoEncoderEncode;
public byte[] videoEncoderEncode(long a1,int[] a2,int a3,int a4) { try { Arena arena = Arena.ofAuto(); MemorySegment _array_a2 = FFM.toMemory(arena, a2);FFM.createFFMArray();videoEncoderEncode.invokeExact(a1,_array_a2,a3,a4);FFM.copyBack(_array_a2,a2);return (byte[])FFM.getArray(); } catch (Throwable t) { JFLog.log(t); return null;} }
private MethodHandle compareFrames;
public float compareFrames(int[] a1,int[] a2,int a3,int a4) { try { Arena arena = Arena.ofAuto(); MemorySegment _array_a1 = FFM.toMemory(arena, a1);MemorySegment _array_a2 = FFM.toMemory(arena, a2);float _ret_value_ = (float)compareFrames.invokeExact(_array_a1,_array_a2,a3,a4);FFM.copyBack(_array_a1,a1);FFM.copyBack(_array_a2,a2);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle getVideoFrameRate;
public float getVideoFrameRate(long a1) { try { float _ret_value_ = (float)getVideoFrameRate.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle videoDecoderGetFrameRate;
public float videoDecoderGetFrameRate(long a1) { try { float _ret_value_ = (float)videoDecoderGetFrameRate.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle addAudioStream;
public int addAudioStream(long a1,javaforce.media.MediaIO a2,int a3,int a4,int a5,int a6) { try { FFM.setMediaIO(a2);int _ret_value_ = (int)addAudioStream.invokeExact(a1,FFM.upcall_MediaIO,a3,a4,a5,a6);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle addVideoStream;
public int addVideoStream(long a1,javaforce.media.MediaIO a2,int a3,int a4,int a5,int a6,float a7,int a8) { try { FFM.setMediaIO(a2);int _ret_value_ = (int)addVideoStream.invokeExact(a1,FFM.upcall_MediaIO,a3,a4,a5,a6,a7,a8);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle audioDecoderGetChannels;
public int audioDecoderGetChannels(long a1) { try { int _ret_value_ = (int)audioDecoderGetChannels.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle audioDecoderGetSampleRate;
public int audioDecoderGetSampleRate(long a1) { try { int _ret_value_ = (int)audioDecoderGetSampleRate.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle audioEncoderGetAudioFramesize;
public int audioEncoderGetAudioFramesize(long a1) { try { int _ret_value_ = (int)audioEncoderGetAudioFramesize.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle getAudioBitRate;
public int getAudioBitRate(long a1) { try { int _ret_value_ = (int)getAudioBitRate.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle getAudioChannels;
public int getAudioChannels(long a1) { try { int _ret_value_ = (int)getAudioChannels.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle getAudioCodecID;
public int getAudioCodecID(long a1) { try { int _ret_value_ = (int)getAudioCodecID.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle getAudioSampleRate;
public int getAudioSampleRate(long a1) { try { int _ret_value_ = (int)getAudioSampleRate.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle getAudioStream;
public int getAudioStream(long a1) { try { int _ret_value_ = (int)getAudioStream.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle getPacketData;
public int getPacketData(long a1,byte[] a2,int a3,int a4) { try { Arena arena = Arena.ofAuto(); MemorySegment _array_a2 = FFM.toMemory(arena, a2);int _ret_value_ = (int)getPacketData.invokeExact(a1,_array_a2,a3,a4);FFM.copyBack(_array_a2,a2);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle getVideoBitRate;
public int getVideoBitRate(long a1) { try { int _ret_value_ = (int)getVideoBitRate.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle getVideoCodecID;
public int getVideoCodecID(long a1) { try { int _ret_value_ = (int)getVideoCodecID.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle getVideoHeight;
public int getVideoHeight(long a1) { try { int _ret_value_ = (int)getVideoHeight.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle getVideoKeyFrameInterval;
public int getVideoKeyFrameInterval(long a1) { try { int _ret_value_ = (int)getVideoKeyFrameInterval.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle getVideoStream;
public int getVideoStream(long a1) { try { int _ret_value_ = (int)getVideoStream.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle getVideoWidth;
public int getVideoWidth(long a1) { try { int _ret_value_ = (int)getVideoWidth.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle inputRead;
public int inputRead(long a1,javaforce.media.MediaIO a2) { try { FFM.setMediaIO(a2);int _ret_value_ = (int)inputRead.invokeExact(a1,FFM.upcall_MediaIO);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle videoDecoderGetHeight;
public int videoDecoderGetHeight(long a1) { try { int _ret_value_ = (int)videoDecoderGetHeight.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle videoDecoderGetWidth;
public int videoDecoderGetWidth(long a1) { try { int _ret_value_ = (int)videoDecoderGetWidth.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle videoDecoderDecode;
public int[] videoDecoderDecode(long a1,byte[] a2,int a3,int a4) { try { Arena arena = Arena.ofAuto(); MemorySegment _array_a2 = FFM.toMemory(arena, a2);FFM.createFFMArray();videoDecoderDecode.invokeExact(a1,_array_a2,a3,a4);FFM.copyBack(_array_a2,a2);return (int[])FFM.getArray(); } catch (Throwable t) { JFLog.log(t); return null;} }
private MethodHandle audioDecoderStart;
public long audioDecoderStart(int a1,int a2,int a3) { try { long _ret_value_ = (long)audioDecoderStart.invokeExact(a1,a2,a3);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle audioEncoderStart;
public long audioEncoderStart(int a1,int a2,int a3,int a4) { try { long _ret_value_ = (long)audioEncoderStart.invokeExact(a1,a2,a3,a4);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle getDuration;
public long getDuration(long a1) { try { long _ret_value_ = (long)getDuration.invokeExact(a1);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle inputOpenFile;
public long inputOpenFile(java.lang.String a1,java.lang.String a2) { try { Arena arena = Arena.ofAuto(); long _ret_value_ = (long)inputOpenFile.invokeExact((MemorySegment)(a1 == null ? MemorySegment.NULL : arena.allocateFrom(a1)),(MemorySegment)(a2 == null ? MemorySegment.NULL : arena.allocateFrom(a2)));return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle inputOpenIO;
public long inputOpenIO(javaforce.media.MediaIO a1) { try { FFM.setMediaIO(a1);long _ret_value_ = (long)inputOpenIO.invokeExact(FFM.upcall_MediaIO);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle outputCreateFile;
public long outputCreateFile(java.lang.String a1,java.lang.String a2) { try { Arena arena = Arena.ofAuto(); long _ret_value_ = (long)outputCreateFile.invokeExact((MemorySegment)(a1 == null ? MemorySegment.NULL : arena.allocateFrom(a1)),(MemorySegment)(a2 == null ? MemorySegment.NULL : arena.allocateFrom(a2)));return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle outputCreateIO;
public long outputCreateIO(javaforce.media.MediaIO a1,java.lang.String a2) { try { Arena arena = Arena.ofAuto(); FFM.setMediaIO(a1);long _ret_value_ = (long)outputCreateIO.invokeExact(FFM.upcall_MediaIO,(MemorySegment)(a2 == null ? MemorySegment.NULL : arena.allocateFrom(a2)));return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle videoDecoderStart;
public long videoDecoderStart(int a1,int a2,int a3) { try { long _ret_value_ = (long)videoDecoderStart.invokeExact(a1,a2,a3);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle videoEncoderStart;
public long videoEncoderStart(int a1,int a2,int a3,int a4,float a5,int a6) { try { long _ret_value_ = (long)videoEncoderStart.invokeExact(a1,a2,a3,a4,a5,a6);return _ret_value_; } catch (Throwable t) { JFLog.log(t); return -1;} }
private MethodHandle audioDecoderDecode;
public short[] audioDecoderDecode(long a1,byte[] a2,int a3,int a4) { try { Arena arena = Arena.ofAuto(); MemorySegment _array_a2 = FFM.toMemory(arena, a2);FFM.createFFMArray();audioDecoderDecode.invokeExact(a1,_array_a2,a3,a4);FFM.copyBack(_array_a2,a2);return (short[])FFM.getArray(); } catch (Throwable t) { JFLog.log(t); return null;} }
private MethodHandle audioDecoderStop;
public void audioDecoderStop(long a1) { try { audioDecoderStop.invokeExact(a1); } catch (Throwable t) { JFLog.log(t); } }
private MethodHandle audioEncoderStop;
public void audioEncoderStop(long a1) { try { audioEncoderStop.invokeExact(a1); } catch (Throwable t) { JFLog.log(t); } }
private MethodHandle mediaSetLogging;
public void mediaSetLogging(boolean a1) { try { mediaSetLogging.invokeExact(a1); } catch (Throwable t) { JFLog.log(t); } }
private MethodHandle videoDecoderStop;
public void videoDecoderStop(long a1) { try { videoDecoderStop.invokeExact(a1); } catch (Throwable t) { JFLog.log(t); } }
private MethodHandle videoEncoderStop;
public void videoEncoderStop(long a1) { try { videoEncoderStop.invokeExact(a1); } catch (Throwable t) { JFLog.log(t); } }
private boolean ffm_init() {
if (FFM.debug) JFLog.log("MediaFFM init started");
MethodHandle init;
ffm = FFM.getInstance();
Library[] libs = new Library[] {new Library("avcodec"),new Library("avdevice"),new Library("avfilter"),new Library("avformat"),new Library("avutil"),new Library("swscale"),new Library("swresample")};
Library.findLibraries(null, libs);
Arena arena = Arena.ofAuto();
init = ffm.getFunction("MediaAPIinit", ffm.getFunctionDesciptor(ValueLayout.JAVA_BOOLEAN,ADDRESS,ADDRESS,ADDRESS,ADDRESS,ADDRESS,ADDRESS,ADDRESS));
if (init == null) return false;
try {if (!(boolean)init.invokeExact(libs[0].getPath(arena),libs[1].getPath(arena),libs[2].getPath(arena),libs[3].getPath(arena),libs[4].getPath(arena),libs[5].getPath(arena),libs[6].getPath(arena))) return false;} catch (Throwable t) {JFLog.log(t); return false;}
audioDecoderChange = ffm.getFunctionPtr("_audioDecoderChange", ffm.getFunctionDesciptor(JAVA_BOOLEAN,JAVA_LONG,JAVA_INT,JAVA_INT));
getPacketKeyFrame = ffm.getFunctionPtr("_getPacketKeyFrame", ffm.getFunctionDesciptor(JAVA_BOOLEAN,JAVA_LONG));
inputClose = ffm.getFunctionPtr("_inputClose", ffm.getFunctionDesciptor(JAVA_BOOLEAN,JAVA_LONG,ADDRESS));
inputOpenAudio = ffm.getFunctionPtr("_inputOpenAudio", ffm.getFunctionDesciptor(JAVA_BOOLEAN,JAVA_LONG,ADDRESS,JAVA_INT,JAVA_INT));
inputOpenVideo = ffm.getFunctionPtr("_inputOpenVideo", ffm.getFunctionDesciptor(JAVA_BOOLEAN,JAVA_LONG,ADDRESS,JAVA_INT,JAVA_INT));
inputSeek = ffm.getFunctionPtr("_inputSeek", ffm.getFunctionDesciptor(JAVA_BOOLEAN,JAVA_LONG,ADDRESS,JAVA_LONG));
outputClose = ffm.getFunctionPtr("_outputClose", ffm.getFunctionDesciptor(JAVA_BOOLEAN,JAVA_LONG,ADDRESS));
videoDecoderChange = ffm.getFunctionPtr("_videoDecoderChange", ffm.getFunctionDesciptor(JAVA_BOOLEAN,JAVA_LONG,JAVA_INT,JAVA_INT));
writeHeader = ffm.getFunctionPtr("_writeHeader", ffm.getFunctionDesciptor(JAVA_BOOLEAN,JAVA_LONG,ADDRESS));
writePacket = ffm.getFunctionPtr("_writePacket", ffm.getFunctionDesciptor(JAVA_BOOLEAN,JAVA_LONG,ADDRESS,JAVA_INT,ADDRESS,JAVA_INT,JAVA_INT,JAVA_BOOLEAN));
audioEncoderEncode = ffm.getFunctionPtr("_audioEncoderEncode", ffm.getFunctionDesciptorVoid(JAVA_LONG,ADDRESS,JAVA_INT,JAVA_INT));
videoEncoderEncode = ffm.getFunctionPtr("_videoEncoderEncode", ffm.getFunctionDesciptorVoid(JAVA_LONG,ADDRESS,JAVA_INT,JAVA_INT));
compareFrames = ffm.getFunctionPtr("_compareFrames", ffm.getFunctionDesciptor(JAVA_FLOAT,ADDRESS,ADDRESS,JAVA_INT,JAVA_INT));
getVideoFrameRate = ffm.getFunctionPtr("_getVideoFrameRate", ffm.getFunctionDesciptor(JAVA_FLOAT,JAVA_LONG));
videoDecoderGetFrameRate = ffm.getFunctionPtr("_videoDecoderGetFrameRate", ffm.getFunctionDesciptor(JAVA_FLOAT,JAVA_LONG));
addAudioStream = ffm.getFunctionPtr("_addAudioStream", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG,ADDRESS,JAVA_INT,JAVA_INT,JAVA_INT,JAVA_INT));
addVideoStream = ffm.getFunctionPtr("_addVideoStream", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG,ADDRESS,JAVA_INT,JAVA_INT,JAVA_INT,JAVA_INT,JAVA_FLOAT,JAVA_INT));
audioDecoderGetChannels = ffm.getFunctionPtr("_audioDecoderGetChannels", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG));
audioDecoderGetSampleRate = ffm.getFunctionPtr("_audioDecoderGetSampleRate", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG));
audioEncoderGetAudioFramesize = ffm.getFunctionPtr("_audioEncoderGetAudioFramesize", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG));
getAudioBitRate = ffm.getFunctionPtr("_getAudioBitRate", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG));
getAudioChannels = ffm.getFunctionPtr("_getAudioChannels", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG));
getAudioCodecID = ffm.getFunctionPtr("_getAudioCodecID", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG));
getAudioSampleRate = ffm.getFunctionPtr("_getAudioSampleRate", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG));
getAudioStream = ffm.getFunctionPtr("_getAudioStream", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG));
getPacketData = ffm.getFunctionPtr("_getPacketData", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG,ADDRESS,JAVA_INT,JAVA_INT));
getVideoBitRate = ffm.getFunctionPtr("_getVideoBitRate", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG));
getVideoCodecID = ffm.getFunctionPtr("_getVideoCodecID", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG));
getVideoHeight = ffm.getFunctionPtr("_getVideoHeight", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG));
getVideoKeyFrameInterval = ffm.getFunctionPtr("_getVideoKeyFrameInterval", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG));
getVideoStream = ffm.getFunctionPtr("_getVideoStream", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG));
getVideoWidth = ffm.getFunctionPtr("_getVideoWidth", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG));
inputRead = ffm.getFunctionPtr("_inputRead", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG,ADDRESS));
videoDecoderGetHeight = ffm.getFunctionPtr("_videoDecoderGetHeight", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG));
videoDecoderGetWidth = ffm.getFunctionPtr("_videoDecoderGetWidth", ffm.getFunctionDesciptor(JAVA_INT,JAVA_LONG));
videoDecoderDecode = ffm.getFunctionPtr("_videoDecoderDecode", ffm.getFunctionDesciptorVoid(JAVA_LONG,ADDRESS,JAVA_INT,JAVA_INT));
audioDecoderStart = ffm.getFunctionPtr("_audioDecoderStart", ffm.getFunctionDesciptor(JAVA_LONG,JAVA_INT,JAVA_INT,JAVA_INT));
audioEncoderStart = ffm.getFunctionPtr("_audioEncoderStart", ffm.getFunctionDesciptor(JAVA_LONG,JAVA_INT,JAVA_INT,JAVA_INT,JAVA_INT));
getDuration = ffm.getFunctionPtr("_getDuration", ffm.getFunctionDesciptor(JAVA_LONG,JAVA_LONG));
inputOpenFile = ffm.getFunctionPtr("_inputOpenFile", ffm.getFunctionDesciptor(JAVA_LONG,ADDRESS,ADDRESS));
inputOpenIO = ffm.getFunctionPtr("_inputOpenIO", ffm.getFunctionDesciptor(JAVA_LONG,ADDRESS));
outputCreateFile = ffm.getFunctionPtr("_outputCreateFile", ffm.getFunctionDesciptor(JAVA_LONG,ADDRESS,ADDRESS));
outputCreateIO = ffm.getFunctionPtr("_outputCreateIO", ffm.getFunctionDesciptor(JAVA_LONG,ADDRESS,ADDRESS));
videoDecoderStart = ffm.getFunctionPtr("_videoDecoderStart", ffm.getFunctionDesciptor(JAVA_LONG,JAVA_INT,JAVA_INT,JAVA_INT));
videoEncoderStart = ffm.getFunctionPtr("_videoEncoderStart", ffm.getFunctionDesciptor(JAVA_LONG,JAVA_INT,JAVA_INT,JAVA_INT,JAVA_INT,JAVA_FLOAT,JAVA_INT));
audioDecoderDecode = ffm.getFunctionPtr("_audioDecoderDecode", ffm.getFunctionDesciptorVoid(JAVA_LONG,ADDRESS,JAVA_INT,JAVA_INT));
audioDecoderStop = ffm.getFunctionPtr("_audioDecoderStop", ffm.getFunctionDesciptorVoid(JAVA_LONG));
audioEncoderStop = ffm.getFunctionPtr("_audioEncoderStop", ffm.getFunctionDesciptorVoid(JAVA_LONG));
mediaSetLogging = ffm.getFunctionPtr("_mediaSetLogging", ffm.getFunctionDesciptorVoid(JAVA_BOOLEAN));
videoDecoderStop = ffm.getFunctionPtr("_videoDecoderStop", ffm.getFunctionDesciptorVoid(JAVA_LONG));
videoEncoderStop = ffm.getFunctionPtr("_videoEncoderStop", ffm.getFunctionDesciptorVoid(JAVA_LONG));
if (FFM.debug) JFLog.log("MediaFFM init complete");
return true;
}
}