Skip to content

Commit

Permalink
better libs loading
Browse files Browse the repository at this point in the history
  • Loading branch information
havlenapetr committed Jul 15, 2010
1 parent 0daa968 commit 4c82385
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/com/media/ffmpeg/FFMpeg.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

public class FFMpeg {

public static final String LIB_NAME = "ffmpeg_jni";
public static final String[] LIBS = new String[] {"jniaudio", "ffmpeg_jni"};
public static final String[] EXTENSIONS = new String[] {".mp4", ".flv", ".avi", ".wmv"};

private Thread mThread;
Expand All @@ -22,17 +22,19 @@ public class FFMpeg {
private FFMpegFile mOutputFile;
private boolean mConverting;

static {
System.loadLibrary("jniaudio");
System.loadLibrary(LIB_NAME);
}

public FFMpeg() {
loadLibs();
native_avcodec_register_all();
native_av_register_all();
mConverting = false;
}

private void loadLibs() {
for(int i=0;i<LIBS.length;i++) {
System.loadLibrary(LIBS[i]);
}
}

public FFMpegUtils getUtils() {
return new FFMpegUtils();
}
Expand Down

0 comments on commit 4c82385

Please sign in to comment.