package ai.suanzi.rtmpclient;
import android.graphics.ImageFormat;
+import android.graphics.SurfaceTexture;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
//
mCamera.setPreviewCallback(this);
+
+ /*try{
+ mCamera.setPreviewTexture(st);
+ }catch (IOException e){
+ e.printStackTrace();
+ }*/
+
}
+ SurfaceTexture st = new SurfaceTexture(0);
+
+
@Override
protected void onPause(){
super.onPause();
Log.e(TAG, "OnResume");
}
+ @Override
+ protected void onStop() {
+ super.onStop();
+ Log.e(TAG,"onStop");
+ }
+
+ @Override
+ protected void onStart(){
+ super.onStart();
+ Log.e(TAG,"onStart");
+ }
+
+ @Override
+ protected void onDestroy(){
+ super.onDestroy();
+ Log.e(TAG,"onDestroy");
+ }
+
+ @Override
+ protected void onRestart(){
+ super.onStart();
+ Log.e(TAG,"onRestart");
+ }
+
// class StreamTask AsyncTask
private class StreamTask extends AsyncTask<Void, Void, Void>{
private byte[] data;
//const char* out_path = "/storage/emulated/0/Movies/output.flv";
- const char* out_path = "rtmp://192.168.0.101:1935/myapp/suanzi";
+ const char* out_path = "rtmp://192.168.1.35:1935/myapp/suanzi";
LOGE("Ffmpeg init, width=%d, heigh=%d", width, height);