capture video in background
[rtmpclient.git] / app / src / main / java / ai / suanzi / rtmpclient / Ffmpeg.java
index 83ab06e..da3aed6 100644 (file)
@@ -3,6 +3,8 @@ package ai.suanzi.rtmpclient;
 public class Ffmpeg {
 
     static {
+        System.loadLibrary("x264");
+        System.loadLibrary("postproc");
         System.loadLibrary("avutil");
         System.loadLibrary("swresample");
         System.loadLibrary("swscale");
@@ -14,4 +16,9 @@ public class Ffmpeg {
     }
 
     public native String getVersion();
+    public native int init(int width, int height);
+    public native int flush();
+    public native int close();
+    public native int process(byte[] data);
+    public native int play(Object surface, String fname);
 }