fpzeng / KSYStreamer_Android

金山云Android采集推流SDK(Livestream SDK),支持内置/自定义美颜(Beauty Filter)、美声(Beauty Voice)、软硬编(Software/Hardware Encoder) 、网络自适应(Network Auto Adapt)、混音(Voice Mixer)、混响(Reverb)、画中画(PIP)、连麦(RTC)、动态贴纸(Sticker)、大眼瘦脸(Bigger Eyes and Smaller Faces)
https://github.com/ksvc/KSYStreamer_Android/releases
731 stars 208 forks source link

推流出现黑屏现象 #133

Open simonaaba opened 7 years ago

simonaaba commented 7 years ago

将融合库4.0版本demon添加到App中进行试用,在推流时反复开始和结束,会出现手机整体卡住无响应然后黑屏的问题。手机型号:红米note4 小米平板2 都有此问题。一个很奇怪的现象,如果推流时选择设置为竖屏,则无论开始结束多少次都不会出现无响应问题。另外demo不会此问题

日志如下: D/SettingsInterface: from settings cache , name = sound_effects_enabled , value = 0 I/Timeline: Timeline: Activity_launch_request time:103341565 D/ActivityThread: ACT-AM_ON_PAUSE_CALLED ActivityRecord{751046f token=android.os.BinderProxy@9b2e57c {com.kuanzheng.temple/com.kuanzheng.player.activity.WebCastActivity}} V/ActivityThread: Handling launch of ActivityRecord{a500858 token=android.os.BinderProxy@2ae8db1 {com.kuanzheng.temple/com.kuanzheng.player.activity.MyCameraActivity}} startsNotResumed=false V/ActivityThread: ActivityRecord{a500858 token=android.os.BinderProxy@2ae8db1 {com.kuanzheng.temple/com.kuanzheng.player.activity.MyCameraActivity}}: app=com.kuanzheng.chat.ChatApplication@bfa8f07, appName=com.kuanzheng.temple, pkg=com.kuanzheng.temple, comp={com.kuanzheng.temple/com.kuanzheng.player.activity.MyCameraActivity}, dir=/data/app/com.kuanzheng.temple-1/base.apk D/SurfaceView: checkSurfaceViewlLogProperty get invalid command D/GLSurfaceView: checkGLSurfaceViewlLogProperty get invalid command D/AudioRecord: getMinFrameCount 1024 I/StatsLogReport: mLogClientInitState:2 I/GLSurfaceView: setRenderer(), this = android.opengl.GLSurfaceView{6a7490f V.E...... ......I. 0,0-0,0 #7f0a00a2 app:id/camera_preview} I/GLSurfaceView: setRenderMode = 0, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......I. 0,0-0,0 #7f0a00a2 app:id/camera_preview} W/AudioCapture: now is not recording V/ActivityThread: Performing resume of ActivityRecord{a500858 token=android.os.BinderProxy@2ae8db1 {com.kuanzheng.temple/com.kuanzheng.player.activity.MyCameraActivity}} D/ActivityThread: ACT-AM_ON_RESUME_CALLED ActivityRecord{a500858 token=android.os.BinderProxy@2ae8db1 {com.kuanzheng.temple/com.kuanzheng.player.activity.MyCameraActivity}} V/ActivityThread: Resume ActivityRecord{a500858 token=android.os.BinderProxy@2ae8db1 {com.kuanzheng.temple/com.kuanzheng.player.activity.MyCameraActivity}} started activity: false, hideForNow: false, finished: false V/PhoneWindow: DecorView setVisiblity: visibility = 4 ,Parent =null, this =com.android.internal.policy.PhoneWindow$DecorView{b647296 I.E...... R.....ID 0,0-0,0} D/WindowClient: Add to mViews: com.android.internal.policy.PhoneWindow$DecorView{b647296 I.E...... R.....ID 0,0-0,0}, this = android.view.WindowManagerGlobal@e6194fa D/OpenGLRenderer: CanvasContext() 0x7f71495800 D/ViewRootImpl: hardware acceleration is enabled, this = ViewRoot{bc09639 com.kuanzheng.temple/com.kuanzheng.player.activity.MyCameraActivity,ident = 7} V/ActivityThread: Resuming ActivityRecord{a500858 token=android.os.BinderProxy@2ae8db1 {com.kuanzheng.temple/com.kuanzheng.player.activity.MyCameraActivity}} with isForward=true V/PhoneWindow: DecorView setVisiblity: visibility = 0 ,Parent =ViewRoot{bc09639 com.kuanzheng.temple/com.kuanzheng.player.activity.MyCameraActivity,ident = 7}, this =com.android.internal.policy.PhoneWindow$DecorView{b647296 V.E...... R.....ID 0,0-0,0} V/ActivityThread: Scheduling idle handler for ActivityRecord{a500858 token=android.os.BinderProxy@2ae8db1 {com.kuanzheng.temple/com.kuanzheng.player.activity.MyCameraActivity}} D/ActivityThreadInjector: clearCachedDrawables. I/SurfaceView: updateWindow -- onWindowVisibilityChanged, visibility = 0, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......I. 0,0-0,0 #7f0a00a2 app:id/camera_preview} D/skia: --- SkImageDecoder::Factory returned null D/skia: --- SkImageDecoder::Factory returned null E/ImageLoader: Image can't be decoded [http://60.217.58.171:8090_105x105] D/libc-netbsd: [getaddrinfo]: mtk hostname=60.217.58.171; servname=(null); netid=0; mark=0 D/libc-netbsd: getaddrinfo( app_uid:10314 D/libc-netbsd: getaddrinfo() uid prop: D/libc-netbsd: getaddrinfo() getuid():10314 D/libc-netbsd: [getaddrinfo]: mtk ai_addrlen=0; ai_canonname=(null); ai_flags=4; ai_family=0 I/System.out: [CDS]rx timeout:20000 I/System.out: [CDS]SO_SND_TIMEOUT:0 I/System.out: [OkHttp] sendRequest>> I/System.out: [OkHttp] sendRequest<< D/OpenGLRenderer: CanvasContext() 0x7f71495800 initialize window=0x7f64c27a10, title=com.kuanzheng.temple/com.kuanzheng.player.activity.MyCameraActivity D/Surface: Surface::connect(this=0x7f64c27a00,api=1) W/libEGL: [ANDROID_RECORDABLE] format: 1 I/SurfaceView: updateWindow -- setFrame, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} I/SurfaceView: updateWindow -- OnPreDrawListener, mHaveFrame = true, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} I/SurfaceView: Changes: creating=true format=true size=true visible=true left=true top=true mUpdateWindowNeeded=false mReportDrawNeeded=false redrawNeeded=false forceSizeChanged=true mVisible=false mRequestedVisible=true, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} D/mali_winsys: new_window_surface returns 0x3000 I/SurfaceView: Cur surface: Surface(name=null)/@0xe553a2c, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} I/System.out: tmpLocation I/System.out: [NetworkHttpMonitor] notifyHttpRedirect I/System.out: [OkHttp] sendRequest>> I/System.out: [OkHttp] sendRequest<< V/SurfaceView: this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} got resized: w=1920 h=1080, cur w=-1 h=-1 I/SurfaceView: New surface: Surface(name=null)/@0xc0b5cf5, vis=true, frame=Rect(0, 0 - 1920, 1080), this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} I/SurfaceView: Callback --> surfaceCreated, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} I/SurfaceView: surfaceCreated callback +, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} I/SurfaceView: surfaceCreated callback -, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} I/SurfaceView: surfaceCreated callback +, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} I/SurfaceView: surfaceCreated callback -, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} I/SurfaceView: surfaceChanged -- format=4 w=1920 h=1080, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} I/SurfaceView: surfaceChanged callback +, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} I/SurfaceView: surfaceChanged callback -, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} I/SurfaceView: surfaceChanged callback +, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} I/EglHelper: eglInitialize = 6680, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} I/SurfaceView: surfaceChanged callback -, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} I/EglHelper: chooseConfig = 6680, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} I/SurfaceView: surfaceRedrawNeeded, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} I/SurfaceView: finishedDrawing, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} I/DefaultContextFactory: createContext = 6680, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} D/Surface: Surface::connect(this=0x7f64c26c00,api=1) W/libEGL: [ANDROID_RECORDABLE] format: 2 V/SurfaceView: Layout: x=0 y=0 w=1920 h=1080, frame=Rect(0, 0 - 1920, 1080), this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} D/mali_winsys: new_window_surface returns 0x3000 D/FboManager: init D/CameraCapture: onGLContext ready I/BufferQueue: unnamed-31842-2 BufferQueue core=(31842:com.kuanzheng.temple) I/BufferQueueConsumer: unnamed-31842-2 connect(C): consumer=(31842:com.kuanzheng.temple) controlledByApp=true I/BufferQueueConsumer: unnamed-31842-2 setConsumerName: unnamed-31842-2 I/BufferQueueConsumer: SurfaceTexture-1-31842-2 setConsumerName: SurfaceTexture-1-31842-2 D/CameraCapture: onSizeChanged 1920x1080 V/CameraHolder: open camera 1 I/[MALI][Gralloc]: [+]r_hnd(0x7f6e1061a0), client(45), share_fd(87) D/GraphicBuffer: register, handle(0x7f6e1061a0) (w:1080 h:1920 s:1088 f:0x2 u:0x000b00) D/Surface: Surface::disconnect(this=0x7f64c26c00,api=1) D/GraphicBuffer: unregister, handle(0x7f6e1061a0) (w:1080 h:1920 s:1088 f:0x2 u:0x000b00) I/[MALI][Gralloc]: [-]r_hnd(0x7f6e1061a0), client(45), share_fd(87) D/Surface: Surface::disconnect(this=0x7f64c26c00,api=1) I/DefaultContextFactory: eglDestroyContext = 6680, this = android.opengl.GLSurfaceView{6a7490f V.E...... ......ID 0,0-1920,1080 #7f0a00a2 app:id/camera_preview} D/GLRender: glContext lost, drop event:com.ksyun.media.streamer.capture.ImgTexSrcPin$1@77a98fb D/ActivityThread: ACT-AM_ON_PAUSE_CALLED ActivityRecord{a500858 token=android.os.BinderProxy@2ae8db1 {com.kuanzheng.temple/com.kuanzheng.player.activity.MyCameraActivity}} D/GLRender: glContext lost, drop event:com.ksyun.media.streamer.capture.ImgTexSrcPin$1@a01d371 D/GLRender: glContext lost, drop event:com.ksyun.media.streamer.filter.imgtex.ImgTexFilterBase$1@b99a556 D/GLRender: glContext lost, drop event:com.ksyun.media.streamer.filter.imgtex.ImgTexFilterBase$1@74fc9d7 D/GLRender: glContext lost, drop event:com.ksyun.media.streamer.filter.imgtex.ImgTexFilterBase$1@fc2a2c4 I/BufferQueueConsumer: SurfaceTexture-1-31842-2 disconnect(C) D/Camera-JNI: (tid:32399)[MtkJNICameraContext] this:0x7f8c1cd720 camera->getStrongCount(3) I/CameraFramework: Camera framework getParameters =3dnr-mode=on;3dnr-mode-values=on,off;3dnr-quality-supported=123;afeng-max-focus-step=1023;afeng-min-focus-step=0;antibanding=off;antibanding-values=off,50hz,60hz,auto;auto-exposure-lock-supported=true;auto-whitebalance-lock-supported=true;brightness=middle;brightness-values=low,middle,high;brightness_value=0;burst-num=1;cap-mode=normal;cap-mode-values=normal,mav;capfname=/sdcard/DCIM/cap00;contrast=middle;contrast-values=low,middle,high;cshot-indicator=true;cshot-indicator-supported=true;disp-rot-supported=true;disp-rot-supported-values=true;dualcam-capture-mode=off;dualcam-capture-mode-values=off;dynamic-frame-rate=true;dynamic-frame-rate-supported=true;edge=middle;edge-values=low,middle,high;effect=none;effect-values=none,mono,negative,sepia,aqua,whiteboard,blackboard,posterize,nashville,hefe,valencia,xproll,lofi,sierra,walden;eng-mfll-e=false;eng-mfll-s=true;eng-s-shad-t=0;eng-shad-t=0;exposure-compensation=0;exposure-compensation-step=0.3333;face-beauty=false;face-beauty-supported=true;fb-enlarge-eye=0;fb-enlarge-eye-max=4;fb-enlarge-eye-min=-4;fb-extreme-beauty=true;fb-extreme-beauty-supported=false;fb-face-pos=-2000:-2000;fb-sharp=0;fb-sharp-max=12;fb-sharp-max-values=12;fb-sharp-min=-12;fb-sharp-min-values=-12;fb-skin-color=0;fb-skin-color-default=9;fb-skin-color-max=12;fb-skin-color-max-values=12;fb-skin-color-min=-12;fb-skin-color-min-values=-12;fb-slim-face=0;fb-slim-face-max=12;fb-slim-face-max-values=12;fb-slim-face-min=-12;fb-slim-face-min-values=-12;fb-smooth-level=0;fb-smooth-level-default=3;fb-smooth-level-max=12;fb-smooth-level-max-values=12;fb-smooth-level-min=-12;fb-smooth-level-min-values=-12;fb-touch-pos=-2000:-2000;feature-max-fps=24@VFB+EIS;first-preview-frame-black=0;flash-duty-max=1;flash-duty-min=0;flash-duty-value=-1;flash-mode=off;flash-mode-values=off;flash-step-max=0;flash-step-min=0;focal-length=3.5;focus-distances=0.95,1.9,Infinity;focus-fs-fi=0;focus-fs-fi-max=65535;focus-fs-fi-min=0;focus-mode=fixed;focus-mode-values=fixed;gesture-shot=false;gesture-shot-supported=true;horizontal-view-angle=75;hue=middle;hue-values=low,middle,high;iso-speed=auto;iso-speed-values=auto,100,200,400,800,1600;jpeg-quality=100;jpeg-thumbnail-height=128;jpeg-thumbnail-quality=100;jpeg-thumbnail-size-values=0x0,160x128,192x144,256x144;jpeg-thumbnail-width=160;m-sr-g=0;m-ss=0;max-exposure-compensation=9;max-num-detected-faces-hw=15;max-num-detected-faces-sw=0;max-num-focus-areas=0;max-num-metering-areas=9;max-num-ot=2;max-zoom=57;mi-hdr=false;min-exposure-compensation=-9;mnr-e=0;mnr-s=true;mtk-123-shad-s=true;mtk-awb-s=true;mtk-cam-mode=0;mtk-heartbeat-monitor-supported=true;mtk-shad-s=true;native-pip=false;native-pip-supported=true;night-anti-motion=false;night-shot=false;picture-format=jpeg;picture-format-values=jpeg;picture-size=2560x1920;picture-size-values=320x240,640x480,1024x768,1280x720,1280x768,1280x960,1600x1200,1920x1088,2048x1536,2560x1440,2560x1920;pip-fps-zsd-off=30;pip-fps-zsd-on=30;preferred-preview-size-for-video=1920x1088;preview-format=yuv420sp;preview-format-values=yuv420sp,yuv420p,yuv420i-yyuvyy-3plane;preview-fps-range=5000,30000;preview-fps-range-values=(15000,15000),(20000,20000),(24000,24000),(5000,30000),(30000,30000);preview-frame-rate=30;preview-frame-rate-values=10,20,15,20,24,30,30;preview-size=640x480;preview-size-values=176x144,320x240,352x288,480x320,480x368,640x480,720x480,800x480,800x600,864x480,960x540,1280x720,1440x1080,1920x1080,1920x1088,1866x1120,1728x1296;rotation=0;saturation=middle;saturation-values=low,middle,high;scene-mode=auto;scene-mode-values=auto,portrait,landscape,night,night-portrait,theatre,beach,snow,sunset,steadyphoto,fireworks,sports,party,candlelight,hdr;sen-mode-s=0;sensor-type=252;smooth-zoom-supported=true;snapshot-picture-flip=0;sr-awb-s=true;sr-shad-s=true;stereo-capture-frame-rate=15;stereo-capture-mode=off;stereo-capture-mode-values=off;stereo-denoise-mode=off;stereo-denoise-mode-values=off;stereo-distance-measurement=off;stereo-distance-measurement-values=off;stereo-image-refocus= I/CameraFramework: Camera framework getParameters =3dnr-mode=on;3dnr-mode-values=on,off;3dnr-quality-supported=123;afeng-max-focus-step=1023;afeng-min-focus-step=0;antibanding=off;antibanding-values=off,50hz,60hz,auto;auto-exposure-lock-supported=true;auto-whitebalance-lock-supported=true;brightness=middle;brightness-values=low,middle,high;brightness_value=0;burst-num=1;cap-mode=normal;cap-mode-values=normal,mav;capfname=/sdcard/DCIM/cap00;contrast=middle;contrast-values=low,middle,high;cshot-indicator=true;cshot-indicator-supported=true;disp-rot-supported=true;disp-rot-supported-values=true;dualcam-capture-mode=off;dualcam-capture-mode-values=off;dynamic-frame-rate=true;dynamic-frame-rate-supported=true;edge=middle;edge-values=low,middle,high;effect=none;effect-values=none,mono,negative,sepia,aqua,whiteboard,blackboard,posterize,nashville,hefe,valencia,xproll,lofi,sierra,walden;eng-mfll-e=false;eng-mfll-s=true;eng-s-shad-t=0;eng-shad-t=0;exposure-compensation=0;exposure-compensation-step=0.3333;face-beauty=false;face-beauty-supported=true;fb-enlarge-eye=0;fb-enlarge-eye-max=4;fb-enlarge-eye-min=-4;fb-extreme-beauty=true;fb-extreme-beauty-supported=false;fb-face-pos=-2000:-2000;fb-sharp=0;fb-sharp-max=12;fb-sharp-max-values=12;fb-sharp-min=-12;fb-sharp-min-values=-12;fb-skin-color=0;fb-skin-color-default=9;fb-skin-color-max=12;fb-skin-color-max-values=12;fb-skin-color-min=-12;fb-skin-color-min-values=-12;fb-slim-face=0;fb-slim-face-max=12;fb-slim-face-max-values=12;fb-slim-face-min=-12;fb-slim-face-min-values=-12;fb-smooth-level=0;fb-smooth-level-default=3;fb-smooth-level-max=12;fb-smooth-level-max-values=12;fb-smooth-level-min=-12;fb-smooth-level-min-values=-12;fb-touch-pos=-2000:-2000;feature-max-fps=24@VFB+EIS;first-preview-frame-black=0;flash-duty-max=1;flash-duty-min=0;flash-duty-value=-1;flash-mode=off;flash-mode-values=off;flash-step-max=0;flash-step-min=0;focal-length=3.5;focus-distances=0.95,1.9,Infinity;focus-fs-fi=0;focus-fs-fi-max=65535;focus-fs-fi-min=0;focus-mode=fixed;focus-mode-values=fixed;gesture-shot=false;gesture-shot-supported=true;horizontal-view-angle=75;hue=middle;hue-values=low,middle,high;iso-speed=auto;iso-speed-values=auto,100,200,400,800,1600;jpeg-quality=100;jpeg-thumbnail-height=128;jpeg-thumbnail-quality=100;jpeg-thumbnail-size-values=0x0,160x128,192x144,256x144;jpeg-thumbnail-width=160;m-sr-g=0;m-ss=0;max-exposure-compensation=9;max-num-detected-faces-hw=15;max-num-detected-faces-sw=0;max-num-focus-areas=0;max-num-metering-areas=9;max-num-ot=2;max-zoom=57;mi-hdr=false;min-exposure-compensation=-9;mnr-e=0;mnr-s=true;mtk-123-shad-s=true;mtk-awb-s=true;mtk-cam-mode=0;mtk-heartbeat-monitor-supported=true;mtk-shad-s=true;native-pip=false;native-pip-supported=true;night-anti-motion=false;night-shot=false;picture-format=jpeg;picture-format-values=jpeg;picture-size=2560x1920;picture-size-values=320x240,640x480,1024x768,1280x720,1280x768,1280x960,1600x1200,1920x1088,2048x1536,2560x1440,2560x1920;pip-fps-zsd-off=30;pip-fps-zsd-on=30;preferred-preview-size-for-video=1920x1088;preview-format=yuv420sp;preview-format-values=yuv420sp,yuv420p,yuv420i-yyuvyy-3plane;preview-fps-range=5000,30000;preview-fps-range-values=(15000,15000),(20000,20000),(24000,24000),(5000,30000),(30000,30000);preview-frame-rate=30;preview-frame-rate-values=10,20,15,20,24,30,30;preview-size=640x480;preview-size-values=176x144,320x240,352x288,480x320,480x368,640x480,720x480,800x480,800x600,864x480,960x540,1280x720,1440x1080,1920x1080,1920x1088,1866x1120,1728x1296;rotation=0;saturation=middle;saturation-values=low,middle,high;scene-mode=auto;scene-mode-values=auto,portrait,landscape,night,night-portrait,theatre,beach,snow,sunset,steadyphoto,fireworks,sports,party,candlelight,hdr;sen-mode-s=0;sensor-type=252;smooth-zoom-supported=true;snapshot-picture-flip=0;sr-awb-s=true;sr-shad-s=true;stereo-capture-frame-rate=15;stereo-capture-mode=off;stereo-capture-mode-values=off;stereo-denoise-mode=off;stereo-denoise-mode-values=off;stereo-distance-measurement=off;stereo-distance-measurement-values=off;stereo-image-refocus= D/CameraUtil: ==== Camera Support: 176x144 D/CameraUtil: ==== Camera Support: 320x240 D/CameraUtil: ==== Camera Support: 352x288 D/CameraUtil: ==== Camera Support: 480x320 D/CameraUtil: ==== Camera Support: 480x368 D/CameraUtil: ==== Camera Support: 640x480 D/CameraUtil: ==== Camera Support: 720x480 D/CameraUtil: ==== Camera Support: 800x480 D/CameraUtil: ==== Camera Support: 800x600 D/CameraUtil: ==== Camera Support: 864x480 D/CameraUtil: ==== Camera Support: 960x540 D/CameraUtil: ==== Camera Support: 1280x720 D/CameraUtil: ==== Camera Support: 1440x1080 D/CameraUtil: ==== Camera Support: 1920x1080 D/CameraUtil: ==== Camera Support: 1920x1088 D/CameraUtil: ==== Camera Support: 1866x1120 D/CameraUtil: ==== Camera Support: 1728x1296 V/CameraFramework: set Key = preview-size, value = 640x480 D/CameraUtil: 15000-15000 D/CameraUtil: 20000-20000 D/CameraUtil: 24000-24000 D/CameraUtil: 5000-30000 D/CameraUtil: 30000-30000 V/CameraFramework: set Key = preview-fps-range, value = 15000,15000 D/CameraCapture: try to preview with: 640x480 15.0fps V/CameraFramework: set Key = focus-mode, value = fixed V/CameraFramework: set Key = video-stabilization, value = true V/CameraFramework: set Key = antibanding, value = auto D/CameraCapture: Preview with: 640x480 15.0-15.0fps FocusMode: fixed VideoStabilization: true Antibanding: auto D/skia: --- SkImageDecoder::Factory returned null D/skia: --- SkImageDecoder::Factory returned null E/ImageLoader: Image can't be decoded [http://60.217.58.171:8090_105x105]

chriszeng87 commented 7 years ago

用Demo能复现么?

zanxiaofei commented 7 years ago

手机不是无响应了嘛,你上面的log 都没有看到异常,把trace log拿出来,看看栈信息,anr发生在什么地方了

simonaaba commented 7 years ago

@chriszeng87 Demo不会出现这个问题

simonaaba commented 7 years ago

@zanxiaofei 您好,这个trace log在手机上没有找到呢

simonaaba commented 7 years ago

发现在选择横屏推流的时候会在MyCameraActivity里会创建两次KSYStreamer实例,但是如果选择竖屏则只会在MyCameraActivity里会创建一次KSYStreamer实例,为什么横屏要执行两次创建实例呢?

zanxiaofei commented 7 years ago

你确认一下你创建KSYStreamer的地方,是什么函数被执行了两次

simonaaba commented 7 years ago

@zanxiaofei activity的初始化方法被执行了两次。protected void onCreate(Bundle savedInstanceState)

zanxiaofei commented 7 years ago

你横屏和竖屏都是怎么设置的,仿照一下demo吧,正常不会被执行两次的,你得自己确认它为啥被执行了两次

simonaaba commented 7 years ago

@zanxiaofei 嗯,好的,非常感谢!我再找一下问题吧,基本都是按照demo来的,除了布局稍作了下修改