running in background
[rtmpclient.git] / app / src / main / java / ai / suanzi / rtmpclient / Ffmpeg.java
index da3aed6..e4eb05c 100644 (file)
@@ -3,9 +3,14 @@ package ai.suanzi.rtmpclient;
 public class Ffmpeg {
 
     static {
-        System.loadLibrary("x264");
-        System.loadLibrary("postproc");
+        String arch = System.getProperty("os.arch");
+        if (arch.equals("i686")){
+            System.loadLibrary("x264");
+        }
         System.loadLibrary("avutil");
+
+        System.loadLibrary("postproc");
+
         System.loadLibrary("swresample");
         System.loadLibrary("swscale");
         System.loadLibrary("avcodec");
@@ -21,4 +26,6 @@ public class Ffmpeg {
     public native int close();
     public native int process(byte[] data);
     public native int play(Object surface, String fname);
+    public native int push(Object surface);
+    public native int preview(Object surface);
 }