X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fai%2Fsuanzi%2Frtmpclient%2FCameraView.java;fp=app%2Fsrc%2Fmain%2Fjava%2Fai%2Fsuanzi%2Frtmpclient%2FCameraView.java;h=e4bc71c3763610af2ed12604f66c15403fc1aded;hb=3c832ad69b0475ee433b27eaf12f0ae7d7033d65;hp=de88ca1b11d8163f08eeef05a773c095892cbe1b;hpb=e0f23aa956f751fca704c8ccae084641a3e36eda;p=rtmpclient.git diff --git a/app/src/main/java/ai/suanzi/rtmpclient/CameraView.java b/app/src/main/java/ai/suanzi/rtmpclient/CameraView.java index de88ca1..e4bc71c 100644 --- a/app/src/main/java/ai/suanzi/rtmpclient/CameraView.java +++ b/app/src/main/java/ai/suanzi/rtmpclient/CameraView.java @@ -30,7 +30,7 @@ public class CameraView extends SurfaceView implements SurfaceHolder.Callback { public void setLayout(int width, int heitht){ this.height = heitht; this.width = width; - gLogger.error("SurfacedCreated, screen size w: " + SCREEN_WIDTH + ", h:" + SCREEN_HEIGHT + ". preview size, w: " + width + ", h: " + height); + gLogger.error("setLayout, screen size w: " + SCREEN_WIDTH + ", h:" + SCREEN_HEIGHT + ". preview size, w: " + width + ", h: " + height); float ratio = (float) height / width; // 3/4,,, 640x480 1008x1344 FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams)getLayoutParams(); @@ -46,6 +46,7 @@ public class CameraView extends SurfaceView implements SurfaceHolder.Callback { lp.leftMargin = 0; lp.topMargin = (SCREEN_HEIGHT - lp.height) / 2; } + gLogger.error("width=" + lp.width + ", height=" + lp.height + ". leftMargin=" + lp.leftMargin + ", topMargin=" + lp.topMargin); this.setLayoutParams(lp); }