| | |
| | | package com.example.nativecodec; |
| | | |
| | | import android.app.Activity; |
| | | import android.content.res.AssetManager; |
| | | import android.graphics.SurfaceTexture; |
| | | import android.os.Bundle; |
| | | import android.util.Log; |
| | |
| | | import android.widget.RadioButton; |
| | | import android.widget.Spinner; |
| | | |
| | | import com.bsk.zhangbo.demoforbsk.util.RtspFaceNative; |
| | | |
| | | import java.io.IOException; |
| | | import cn.com.basic.face.util.RtspFaceNative; |
| | | |
| | | public class NativeCodec extends Activity { |
| | | static final String TAG = "NativeCodec"; |
| | |
| | | |
| | | boolean mCreated = false; |
| | | boolean mIsPlaying = false; |
| | | |
| | | |
| | | |
| | | /** Called when the activity is first created. */ |
| | | @Override |
| | |
| | | //mCreated = createStreamingMediaPlayer(getResources().getAssets(), mSourceString); |
| | | //#todo ok |
| | | mCreated = RtspFaceNative.createPlayer(1, "rtsp://admin:admin12345@192.168.1.70:554/h264/ch1/main/av_stream"); |
| | | mCreated = RtspFaceNative.createPlayer(2, "rtsp://admin:admin12345@192.168.1.70:554/h264/ch1/sub/av_stream"); |
| | | //mCreated = RtspFaceNative.createPlayer(2, "rtsp://admin:admin12345@192.168.1.70:554/h264/ch1/main/av_stream"); |
| | | //mCreated = createPlayer(1, "rtsp://192.168.1.56:8554"); |
| | | |
| | | RtspFaceNative.setFaceCallback(1, "cn/com/basic/face/util/RtspFaceNative", "faceCallBack"); |
| | | |
| | | //byte[] arr = new byte[5]; |
| | | //arr[0] = 3; arr[1] = 4; arr[2] = 5; |
| | |
| | | /** Load jni .so on initialization */ |
| | | static { |
| | | System.loadLibrary("rtspface"); |
| | | //System.loadLibrary("opencv_java3"); |
| | | System.loadLibrary("opencv_java3"); |
| | | } |
| | | |
| | | // VideoSink abstracts out the difference between Surface and SurfaceTexture |