Fix memory leak, and all work well except startup and jni log
[rtmpclient.git] / app / src / main / java / ai / suanzi / rtmpclient / Ffmpeg.java
index d0556a7..7141810 100644 (file)
@@ -29,7 +29,7 @@ public class Ffmpeg {
     private Ffmpeg(){
         Log.e("Ffmpeg", "init");
         //init();
-        inithaha(640, 480);
+        //inithaha(640, 480);
         //getPerfectDevice();
     }
 
@@ -37,6 +37,8 @@ public class Ffmpeg {
     public native String getVersion();
     public native void init();
     public native int inithaha(int width, int height);
+    public native int initnew (int width, int height, String url);
+    //public native init inithahurl(ini)
     public native int flush();
     public native int close();
     public native int process(byte[] data);
@@ -45,4 +47,5 @@ public class Ffmpeg {
     public native int preview(Object surface);
     public native String getPerfectDevice();
     public native int test(int fd);
+    public native void setRtmpUrl(String url);
 }