houxiao
2017-05-04 21b675418bc1c6ff3620483f3cd103fa0234fe26
VisitFace/RtspNativeCodec/app/src/main/java/com/example/nativecodec/NativeCodec.java
@@ -41,6 +41,7 @@
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.widget.Button;
import android.widget.TextView;
import java.nio.ByteBuffer;
@@ -75,7 +76,7 @@
        ThisActivity = this;
        RtspFaceNative.init();
        RtspFaceNative.setLocalIP("192.168.1.10");
        RtspFaceNative.setLocalIP("192.168.1.106");
        mGLView1 = (MyGLSurfaceView) findViewById(R.id.glsurfaceview1);
@@ -292,12 +293,15 @@
                ThisActivity.runOnUiThread(new Runnable() {
                    @Override
                    public void run() {
                        Bitmap bitmap = Bitmap.createBitmap(faceImg.width, faceImg.height, Bitmap.Config.RGB_565);
                        Bitmap bitmap = Bitmap.createBitmap(faceImg.width, faceImg.height, Bitmap.Config.ARGB_8888);
                        ByteBuffer byteBuffer = ByteBuffer.wrap(faceImg.image, 0, faceImg.size);
                        bitmap.copyPixelsFromBuffer(byteBuffer);
                        ImageView image = (ImageView)ThisActivity.findViewById(R.id.addface_image);
                        image.setImageBitmap(bitmap);
                        TextView textView1 = (TextView)ThisActivity.findViewById(R.id.textView1);
                        textView1.setText(RtspFaceNative.dbgGetLog());
                    }
                });
            }