pedroSG94 / RootEncoder

RootEncoder for Android (rtmp-rtsp-stream-client-java) is a stream encoder to push video/audio to media servers using protocols RTMP, RTSP, SRT and UDP with all code written in Java/Kotlin
Apache License 2.0
2.53k stars 772 forks source link

Landscape issue #227

Closed mmaschenko closed 5 years ago

mmaschenko commented 5 years ago

When previewing or streaming i have issue with landscape right mode. For some reason if i rotate device for example in preview from portrait to landscapeLeft it works ok, if i rotate to landscapeRight - preview is rotated for 180 degrees. It seems that that lib finds that device is in landscape and compensate image for that mode, but it's always landscapeLeft. Using:

pedroSG94 commented 5 years ago

With landscape right, do you mean?

android:screenOrientation="reverseLandscape"

Only preview is rotated or streaming result too?

mmaschenko commented 5 years ago

Yes, streaming is also affected. android:screenOrientation="fullSensor" It seems that on when device is in reverseLandscape mode, it still autorotates to regular landscape 2018-09-28 14 59 19 2018-09-28 14 59 14

pedroSG94 commented 5 years ago

I'm working on it. For now, camera1 is fixed I need fix camera2 too.

pedroSG94 commented 5 years ago

fixed: https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/commit/f371aa42fe4fd24a2bbd9f73fb262e509fc05599 https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/commit/1d46fb2c80a2306b9daa2e7f18c3bc1b2b9f1c86

mmaschenko commented 5 years ago

It seems that preview is fixed, but streaming still has this issue. And more thing after i downloaded library to my project and downloaded last version of lib (1.4.1) streaming doesnt work anymore, If i downgrade to 1.3.8 it streams as it was previously. I will try to apply this two commits to 1.3.8 version or some other version that's not 1.4.1 and check if it helps

pedroSG94 commented 5 years ago

Are you using OpenGlView and last library commit? (Orientation work for me) Please test with my app. Clone my project, go to manifest, change orientation and test it.

About update gradle version. I tested with gradle and work. Can you share me code error or something? (Anyway I will update version in few days)

mmaschenko commented 5 years ago

To be honest i am using your library in react native project. Previously i was using SurfaceView with 1.3.8 version of your library and it worked ok public class RTMPSurfaceView extends SurfaceView {...} Now i use it like this with all new latest commits and it seems that preview is fixes, but stream is broken and while streaming view that shows camera doesn't rotate, need to investigate further import com.pedro.rtplibrary.view.OpenGlView; public class RTMPSurfaceView extends OpenGlView {...} I have noticed that after i upgraded to 1.3.9 it stopped streaming. From commits i see that OpenGLView was implemented.

I keep getting SrsFlvMuxer: frame discarded error with new OpenGlView 10-03 20:11:41.007 16929 17317 D ViewRootImpl@779fb09[Toast]: dispatchAttachedToWindow 10-03 20:11:41.012 2954 3070 V WindowManager: Relayout Window{be3ae4ad0 u0 Toast}: viewVisibility=0 req=576x116 WM.LayoutParams{(0,168)(wrapxwrap) gr=#51 sim=#20 ty=2005 fl=#1040088 fmt=-3 wanim=0x1030004 naviIconColor=0} 10-03 20:11:41.012 16929 16929 D SurfaceView: Relayout returned: oldFrame=[0,0][1920,949] newFrame=[0,0][1920,1080] result=0x21 surface={Surface(name=null)/@0xdb26963 isValid=true -447361024} 10-03 20:11:41.013 16929 16929 I OpenGlViewBase: size: 1920x1080 10-03 20:11:41.013 2411 2411 I SurfaceFlinger: id=3605 createSurf (1x1),1 flag=4, Toast 10-03 20:11:41.015 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.028 2489 28367 I ExynosCamera: [CAM_ID(0)][]-INFO(m_doZoomPrviewWithCSC[2757]):HW Preview size is changed. Update size(1280 x 720) 10-03 20:11:41.028 2489 28367 D ExynosCameraSec: (m_checkEntranceLux[4755]): need skip frame for ae/awb stable(4). 10-03 20:11:41.028 2489 28367 D ExynosCameraSec: [CAM_ID(0)][]-INFO(m_handlePreviewFrame[7951]):Skip frame for frameSkipCount(2) buffer.index(0) 10-03 20:11:41.028 16929 17317 D ViewRootImpl@779fb09[Toast]: Relayout returned: oldFrame=[0,0][0,0] newFrame=[672,796][1248,912] result=0x27 surface={isValid=true -1068005376} surfaceGenerationChanged=true 10-03 20:11:41.029 16929 17317 D ViewRootImpl@779fb09[Toast]: mHardwareRenderer.initialize() mSurface={isValid=true -1068005376} hwInitialized=true 10-03 20:11:41.030 16929 17078 D mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000, [576x116]-format:1 10-03 20:11:41.033 16929 17317 D ViewRootImpl@779fb09[Toast]: MSG_RESIZED_REPORT: frame=Rect(672, 796 - 1248, 912) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=2 10-03 20:11:41.035 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.036 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.058 2489 28367 D ExynosCameraSec: [CAM_ID(0)][]-INFO(m_handlePreviewFrame[7951]):Skip frame for frameSkipCount(1) buffer.index(1) 10-03 20:11:41.058 2954 3657 D WindowManager: finishDrawingWindow: Window{be3ae4ad0 u0 Toast} mDrawState=DRAW_PENDING 10-03 20:11:41.074 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.088 2954 3553 E Watchdog: !@Sync 5173 [2018-10-03 20:11:41.087] 10-03 20:11:41.089 2489 28371 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(2), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(2) 10-03 20:11:41.089 2489 28371 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd39be000), in_address_2(0xe100f000) 10-03 20:11:41.089 2489 28371 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd39be000), out_address_2(0xe100f000) 10-03 20:11:41.100 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.103 2489 28371 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 14 msec) 10-03 20:11:41.104 2489 28366 D ExynosCameraSec: [CAM_ID(0)][]-DEBUG(m_previewThreadFunc[8781]):m_firstPreviewTimer stop 10-03 20:11:41.104 2489 28366 D ExynosCameraSec: [CAM_ID(0)][]-DEBUG(m_printExynosCameraInfo[8783]):============= First Preview time ================== 10-03 20:11:41.104 2489 28366 D ExynosCameraSec: [CAM_ID(0)][]-DEBUG(m_printExynosCameraInfo[8784]):= startPreview ~ first frame : 509 msec 10-03 20:11:41.104 2489 28366 D ExynosCameraSec: [CAM_ID(0)][]-DEBUG(m_printExynosCameraInfo[8785]):=================================================== 10-03 20:11:41.104 2489 28366 D ExynosCameraActivityAutofocus: (CMGEFL):================================================== 10-03 20:11:41.104 2489 28366 D ExynosCameraActivityAutofocus: (CMGEFL):0x1103 10-03 20:11:41.104 2489 28366 D ExynosCameraActivityAutofocus: (CMGEFL):0x2016 10-03 20:11:41.104 2489 28366 D ExynosCameraActivityAutofocus: (CMGEFL):0x5c30 10-03 20:11:41.104 2489 28366 D ExynosCameraActivityAutofocus: (CMGEFL):0x0 10-03 20:11:41.104 2489 28366 D ExynosCameraActivityAutofocus: (CMGEFL):0x0 10-03 20:11:41.104 2489 28366 D ExynosCameraActivityAutofocus: (CMGEFL):0x0 10-03 20:11:41.104 2489 28366 D ExynosCameraActivityAutofocus: (CMGEFL):0x0 10-03 20:11:41.104 2489 28366 D ExynosCameraActivityAutofocus: (CMGEFL):0x0 10-03 20:11:41.104 2489 28366 D ExynosCameraActivityAutofocus: (CMGEFL):0x1 10-03 20:11:41.104 2489 28366 D ExynosCameraActivityAutofocus: (CMGEFL):0xef 10-03 20:11:41.104 2489 28366 D ExynosCameraActivityAutofocus: (CMGEFL):================================================== 10-03 20:11:41.111 2411 2411 D SurfaceFlinger: Display[0] configurations (* current): 10-03 20:11:41.111 2411 2411 D SurfaceFlinger: * 0: 1080x1920, xdpi=403.411011, ydpi=403.040985, refresh=16949152 10-03 20:11:41.111 2411 2411 D SurfaceFlinger: numHwLayers=5, flags=00000000 10-03 20:11:41.111 2411 2411 D SurfaceFlinger: type | handle | hint | flag | tr | blnd | format | source crop (l,t,r,b) | frame | name 10-03 20:11:41.111 2411 2411 D SurfaceFlinger: -----------+----------+------+------+----+------+-------------+--------------------------------+------------------------+------ 10-03 20:11:41.111 2411 2411 D SurfaceFlinger: GLES | 00000000 | 0000 | 0220 | 04 | 0105 | ? ffffffff | 0.0, 0.0, -1.0, -1.0 | 0, 0, 1080, 1920 | SurfaceView - com.picartotv/com.picartotv.MainActivity 10-03 20:11:41.111 2411 2411 D SurfaceFlinger: GLES | e8c0c1e0 | 0000 | 0020 | 00 | 0100 | RGBx_8888 | 0.0, 0.0, 949.0, 1920.0 | 131, 0, 1080, 1920 | SurfaceView - com.picartotv/com.picartotv.MainActivity 10-03 20:11:41.111 2411 2411 D SurfaceFlinger: GLES | e8c0c780 | 0000 | 0000 | 00 | 0105 | RGBA_8888 | 0.0, 0.0, 1080.0, 1920.0 | 0, 0, 1080, 1920 | com.picartotv/com.picartotv.MainActivity 10-03 20:11:41.111 2411 2411 D SurfaceFlinger: GLES | e8c0c8c0 | 0000 | 0000 | 00 | 0105 | RGBA_8888 | 0.0, 0.0, 116.0, 576.0 | 168, 67 10-03 20:11:41.111 2411 2411 D SurfaceFlinger: 2, 284, 1248 | Toast 10-03 20:11:41.111 2411 2411 D SurfaceFlinger: FB TARGET | e8984500 | 0000 | 0000 | 00 | 0105 | RGBA_8888 | 0.0, 0.0, 1080.0, 1920.0 | 0, 0, 1080, 1920 | HWC_FRAMEBUFFER_TARGET 10-03 20:11:41.119 2489 28373 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(3), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(3) 10-03 20:11:41.119 2489 28373 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xdeb1e000), in_address_2(0xe0a8f000) 10-03 20:11:41.119 2489 28373 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xdeb1e000), out_address_2(0xe0a8f000) 10-03 20:11:41.134 2489 28373 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 15 msec) 10-03 20:11:41.137 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.138 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.141 16929 28291 D RtmpConnection: handleRxPacketLoop(): Setting acknowledgement window size: 2500000 10-03 20:11:41.141 16929 28291 D RtmpConnection: handleRxPacketLoop(): Send acknowledgement window size: 2500000 10-03 20:11:41.141 16929 28291 D RtmpConnection: wrote packet: RTMP Window Acknowledgment Size, size: 4 10-03 20:11:41.144 16929 28291 I RtmpConnection: handleRxInvoke: Got result for invoked method: connect 10-03 20:11:41.144 16929 28228 D RtmpConnection: createStream(): Sending releaseStream command... 10-03 20:11:41.146 16929 28228 D RtmpConnection: wrote packet: RTMP Command (command: releaseStream, transaction ID: 2), size: 52 10-03 20:11:41.146 16929 28228 D RtmpConnection: createStream(): Sending FCPublish command... 10-03 20:11:41.148 16929 28228 D RtmpConnection: wrote packet: RTMP Command (command: FCPublish, transaction ID: 3), size: 48 10-03 20:11:41.149 16929 28228 D RtmpConnection: createStream(): Sending createStream command... 10-03 20:11:41.149 16929 28228 D RtmpConnection: wrote packet: RTMP Command (command: createStream, transaction ID: 4), size: 25 10-03 20:11:41.153 2489 28375 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(4), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(4) 10-03 20:11:41.153 2489 28375 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd37dd000), in_address_2(0xe098f000) 10-03 20:11:41.153 2489 28375 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd37dd000), out_address_2(0xe098f000) 10-03 20:11:41.153 2489 28360 D ExynosCameraActivityAutofocusSec: DEBUG(t_func3ABefore[139]):AF-Mode(HAL/FW)=(64/5(0)) AF-Region(x1,y1,x2,y2,weight)=(0, 0, 0, 0, 1000) 10-03 20:11:41.160 2954 3080 D wifi : onLinkStatsResults: radio_stat.on_time = 116 10-03 20:11:41.160 2954 3080 D wifi : onLinkStatsResults: radio_stat.tx_time = 0 10-03 20:11:41.160 2954 3080 D wifi : onLinkStatsResults: radio_stat.rx_time = 0 10-03 20:11:41.161 2954 3080 D wifi : android_net_wifi_getLinkLayerStats: radio_stat.on_time = 116 10-03 20:11:41.161 2954 3080 D wifi : android_net_wifi_getLinkLayerStats: radio_stat.tx_time = 0 10-03 20:11:41.161 2954 3080 D wifi : android_net_wifi_getLinkLayerStats: radio_stat.rx_time = 0 10-03 20:11:41.165 2489 28375 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 12 msec) 10-03 20:11:41.170 2954 3080 D WifiStateMachine: Current network is: "unify5GHz" , ID is: 0 10-03 20:11:41.170 2954 3080 D WifiStateMachine: Current network is still qualified due to heavy traffic, txSuccessRate=35.16226686356828 rxSuccessRate=33.63107802398741 10-03 20:11:41.170 2954 3080 D WifiStateMachine: Current network is 5GHz, bail out... 10-03 20:11:41.176 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.185 2489 28369 I ExynosCameraSec: [CAM_ID(0)][]-INFO(m_monitorThreadFunc[3155]): @FIMC_IS_SYNC 1159 10-03 20:11:41.185 2489 28369 D ExynosCameraMCPipe: [CAM_ID(0)][PIPE_3AA]-DEBUG(syncLog[1291]) 10-03 20:11:41.185 2489 28377 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(5), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(5) 10-03 20:11:41.186 2489 28377 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd2d05000), in_address_2(0xe078f000) 10-03 20:11:41.186 2489 28377 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd2d05000), out_address_2(0xe078f000) 10-03 20:11:41.197 2489 28377 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 10 msec) 10-03 20:11:41.200 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.201 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.219 2489 28379 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(6), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(6) 10-03 20:11:41.220 2489 28379 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd2a25000), in_address_2(0xdf88f000) 10-03 20:11:41.220 2489 28379 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd2a25000), out_address_2(0xdf88f000) 10-03 20:11:41.235 2489 28379 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 16 msec) 10-03 20:11:41.237 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.239 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.254 2489 28381 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(7), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(7) 10-03 20:11:41.255 2489 28381 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd2943000), in_address_2(0xdf50f000) 10-03 20:11:41.255 2489 28381 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd2943000), out_address_2(0xdf50f000) 10-03 20:11:41.269 2489 28381 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 15 msec) 10-03 20:11:41.287 2489 28383 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(8), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(8) 10-03 20:11:41.287 2489 28383 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd2861000), in_address_2(0xdee8f000) 10-03 20:11:41.287 2489 28383 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd2861000), out_address_2(0xdee8f000) 10-03 20:11:41.298 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.302 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.307 2489 28383 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 20 msec) 10-03 20:11:41.319 2489 28385 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(9), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(9) 10-03 20:11:41.319 2489 28385 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd277f000), in_address_2(0xdeaad000) 10-03 20:11:41.320 2489 28385 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd277f000), out_address_2(0xdeaad000) 10-03 20:11:41.339 2489 28385 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 19 msec) 10-03 20:11:41.342 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.346 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.352 2489 28387 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(10), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(10) 10-03 20:11:41.353 2489 28387 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd269d000), in_address_2(0xde211000) 10-03 20:11:41.353 2489 28387 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd269d000), out_address_2(0xde211000) 10-03 20:11:41.354 2502 2937 D EnterpriseController: netId is 0 10-03 20:11:41.354 2502 2937 D Netd : getNetworkForDns: using netid 559 for uid 10357 10-03 20:11:41.354 2502 2937 D DnsProxyListener: DNSDBG::dns addrinfo af 2 10-03 20:11:41.356 2954 2969 D SensorService: [SO] 2.795 0.050 9.608 10-03 20:11:41.363 16929 28291 W RtmpConnection: handleRxPacketLoop(): Not handling unimplemented/unknown packet of type: ACKNOWLEDGEMENT 10-03 20:11:41.371 2489 28387 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 19 msec) 10-03 20:11:41.377 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.378 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.386 2489 28390 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(11), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(11) 10-03 20:11:41.386 2489 28390 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd25bb000), in_address_2(0xda511000) 10-03 20:11:41.386 2489 28390 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd25bb000), out_address_2(0xda511000) 10-03 20:11:41.405 2489 28390 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 19 msec) 10-03 20:11:41.419 2489 28392 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(12), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(0) 10-03 20:11:41.419 2489 28392 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xe8e39000), in_address_2(0xe9373000) 10-03 20:11:41.419 2489 28392 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xe8e39000), out_address_2(0xe9373000) 10-03 20:11:41.436 2489 28392 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 16 msec) 10-03 20:11:41.436 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.453 2489 28394 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(13), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(1) 10-03 20:11:41.453 2489 28394 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd3c9e000), in_address_2(0xe926c000) 10-03 20:11:41.453 2489 28394 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd3c9e000), out_address_2(0xe926c000) 10-03 20:11:41.468 2489 28394 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 15 msec) 10-03 20:11:41.476 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.478 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.485 2489 28396 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(14), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(2) 10-03 20:11:41.485 2489 28396 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd39be000), in_address_2(0xe100f000) 10-03 20:11:41.485 2489 28396 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd39be000), out_address_2(0xe100f000) 10-03 20:11:41.504 2489 28396 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 18 msec) 10-03 20:11:41.517 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.519 2489 28398 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(15), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(3) 10-03 20:11:41.519 2489 28398 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xdeb1e000), in_address_2(0xe0a8f000) 10-03 20:11:41.519 2489 28398 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xdeb1e000), out_address_2(0xe0a8f000) 10-03 20:11:41.539 2489 28398 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 20 msec) 10-03 20:11:41.541 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.553 2489 28400 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(16), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(4) 10-03 20:11:41.553 2489 28400 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd37dd000), in_address_2(0xe098f000) 10-03 20:11:41.553 2489 28400 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd37dd000), out_address_2(0xe098f000) 10-03 20:11:41.555 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.561 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.571 2489 28400 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 18 msec) 10-03 20:11:41.587 2489 28402 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(17), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(5) 10-03 20:11:41.587 2489 28402 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd2d05000), in_address_2(0xe078f000) 10-03 20:11:41.587 2489 28402 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd2d05000), out_address_2(0xe078f000) 10-03 20:11:41.596 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.601 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.608 2954 22754 I EDMNativeHelperService: isCameraEnabled 10-03 20:11:41.609 2489 28402 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 22 msec) 10-03 20:11:41.619 2489 28404 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(18), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(6) 10-03 20:11:41.619 2489 28404 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd2a25000), in_address_2(0xdf88f000) 10-03 20:11:41.620 2489 28404 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd2a25000), out_address_2(0xdf88f000) 10-03 20:11:41.637 2489 28404 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 17 msec) 10-03 20:11:41.653 2489 28406 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(19), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(7) 10-03 20:11:41.653 2489 28406 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd2943000), in_address_2(0xdf50f000) 10-03 20:11:41.653 2489 28406 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd2943000), out_address_2(0xdf50f000) 10-03 20:11:41.659 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.666 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.670 2489 28406 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 17 msec) 10-03 20:11:41.687 2489 28408 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(20), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(8) 10-03 20:11:41.687 2489 28408 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd2861000), in_address_2(0xdee8f000) 10-03 20:11:41.687 2489 28408 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd2861000), out_address_2(0xdee8f000) 10-03 20:11:41.703 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.703 2489 28408 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 16 msec) 10-03 20:11:41.705 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.719 2489 28410 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(21), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(9) 10-03 20:11:41.719 2489 28410 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd277f000), in_address_2(0xdeaad000) 10-03 20:11:41.719 2489 28410 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd277f000), out_address_2(0xdeaad000) 10-03 20:11:41.731 2489 28410 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 12 msec) 10-03 20:11:41.737 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.739 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.752 2489 28412 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(22), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(10) 10-03 20:11:41.752 2489 28412 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd269d000), in_address_2(0xde211000) 10-03 20:11:41.752 2489 28412 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd269d000), out_address_2(0xde211000) 10-03 20:11:41.765 2489 28412 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 12 msec) 10-03 20:11:41.785 2489 28414 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(23), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(11) 10-03 20:11:41.785 2489 28414 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd25bb000), in_address_2(0xda511000) 10-03 20:11:41.785 2489 28414 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd25bb000), out_address_2(0xda511000) 10-03 20:11:41.797 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.797 2489 28414 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 12 msec) 10-03 20:11:41.815 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.818 2489 28416 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(24), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(0) 10-03 20:11:41.819 2489 28416 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xe8e39000), in_address_2(0xe9373000) 10-03 20:11:41.819 2489 28416 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xe8e39000), out_address_2(0xe9373000) 10-03 20:11:41.831 2489 28416 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 13 msec) 10-03 20:11:41.831 16929 17317 D ViewRootImpl@779fb09[Toast]: mHardwareRenderer.destroy()#4 10-03 20:11:41.833 16929 17317 D ViewRootImpl@779fb09[Toast]: dispatchDetachedFromWindow 10-03 20:11:41.834 2954 29719 D WindowManager: disposeInputChannel mInputChannel: be3ae4a Toast (server) 10-03 20:11:41.835 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.839 2954 29719 D InputTransport: Input channel destroyed: fd=318 10-03 20:11:41.840 16929 17317 D InputTransport: Input channel destroyed: fd=201 10-03 20:11:41.852 2489 28418 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(25), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(1) 10-03 20:11:41.852 2489 28418 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd3c9e000), in_address_2(0xe926c000) 10-03 20:11:41.852 2489 28418 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd3c9e000), out_address_2(0xe926c000) 10-03 20:11:41.856 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.863 2489 28418 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 11 msec) 10-03 20:11:41.876 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.884 2489 28420 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(26), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(2) 10-03 20:11:41.885 2489 28420 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd39be000), in_address_2(0xe100f000) 10-03 20:11:41.885 2489 28420 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd39be000), out_address_2(0xe100f000) 10-03 20:11:41.896 2489 28420 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 11 msec) 10-03 20:11:41.902 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.903 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.917 2489 28422 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(27), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(3) 10-03 20:11:41.918 2489 28422 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xdeb1e000), in_address_2(0xe0a8f000) 10-03 20:11:41.918 2489 28422 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xdeb1e000), out_address_2(0xe0a8f000) 10-03 20:11:41.932 2489 28422 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 14 msec) 10-03 20:11:41.952 2489 28424 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(28), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(4) 10-03 20:11:41.952 2489 28424 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd37dd000), in_address_2(0xe098f000) 10-03 20:11:41.952 2489 28424 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd37dd000), out_address_2(0xe098f000) 10-03 20:11:41.961 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.970 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:41.971 2489 28424 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 19 msec) 10-03 20:11:41.985 2489 28426 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(29), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(5) 10-03 20:11:41.985 2489 28426 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd2d05000), in_address_2(0xe078f000) 10-03 20:11:41.985 2489 28426 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd2d05000), out_address_2(0xe078f000) 10-03 20:11:41.996 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.000 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.009 2489 28426 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 24 msec) 10-03 20:11:42.017 2489 28428 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(30), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(6) 10-03 20:11:42.018 2489 28428 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd2a25000), in_address_2(0xdf88f000) 10-03 20:11:42.018 2489 28428 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd2a25000), out_address_2(0xdf88f000) 10-03 20:11:42.033 2489 28428 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 16 msec) 10-03 20:11:42.035 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.048 2502 2937 D EnterpriseController: netId is 0 10-03 20:11:42.048 2502 2937 D Netd : getNetworkForDns: using netid 559 for uid 10357 10-03 20:11:42.048 2502 2937 D DnsProxyListener: DNSDBG::dns addrinfo af 2 10-03 20:11:42.052 2489 28431 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(31), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(7) 10-03 20:11:42.053 2489 28431 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd2943000), in_address_2(0xdf50f000) 10-03 20:11:42.053 2489 28431 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd2943000), out_address_2(0xdf50f000) 10-03 20:11:42.059 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.068 2489 28431 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 16 msec) 10-03 20:11:42.069 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.069 6494 6509 I Finsky : [16109] com.google.android.finsky.bo.ac.run(5): Stats for Executor: BlockingExecutor com.google.android.finsky.bo.ad@d613287[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 3] 10-03 20:11:42.070 6494 6509 I Finsky : [16109] com.google.android.finsky.bo.ac.run(5): Stats for Executor: LightweightExecutor com.google.android.finsky.bo.ad@b31d5b4[Running, pool size = 4, active threads = 0, queued tasks = 0, completed tasks = 10] 10-03 20:11:42.085 2489 28433 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(32), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(8) 10-03 20:11:42.085 2489 28433 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd2861000), in_address_2(0xdee8f000) 10-03 20:11:42.085 2489 28433 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd2861000), out_address_2(0xdee8f000) 10-03 20:11:42.092 16929 28291 D RtmpConnection: handleRxInvoke(): 'onFCPublish' 10-03 20:11:42.107 2489 28433 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 22 msec) 10-03 20:11:42.116 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.118 2489 28435 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(33), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(9) 10-03 20:11:42.118 2489 28435 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd277f000), in_address_2(0xdeaad000) 10-03 20:11:42.118 2489 28435 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd277f000), out_address_2(0xdeaad000) 10-03 20:11:42.124 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.145 2489 28435 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 27 msec) 10-03 20:11:42.145 6494 6509 I Finsky : [16109] com.google.android.finsky.bo.ac.run(5): Stats for Executor: bgExecutor com.google.android.finsky.bo.ad@8d05dd[Running, pool size = 1, active threads = 0, queued tasks = 0, completed tasks = 1] 10-03 20:11:42.151 2489 28437 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(34), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(10) 10-03 20:11:42.151 2489 28437 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd269d000), in_address_2(0xde211000) 10-03 20:11:42.151 2489 28437 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd269d000), out_address_2(0xde211000) 10-03 20:11:42.159 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.168 2489 28437 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 17 msec) 10-03 20:11:42.180 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.182 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.186 2489 28439 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(35), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(11) 10-03 20:11:42.186 2489 28439 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd25bb000), in_address_2(0xda511000) 10-03 20:11:42.186 2489 28439 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd25bb000), out_address_2(0xda511000) 10-03 20:11:42.204 2489 28439 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 18 msec) 10-03 20:11:42.216 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.217 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.219 2489 28441 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(36), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(0) 10-03 20:11:42.219 2489 28441 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xe8e39000), in_address_2(0xe9373000) 10-03 20:11:42.219 2489 28441 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xe8e39000), out_address_2(0xe9373000) 10-03 20:11:42.235 2489 28441 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 16 msec) 10-03 20:11:42.252 2489 28443 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(37), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(1) 10-03 20:11:42.253 2489 28443 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd3c9e000), in_address_2(0xe926c000) 10-03 20:11:42.253 2489 28443 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd3c9e000), out_address_2(0xe926c000) 10-03 20:11:42.258 16929 28291 I RtmpConnection: handleRxInvoke: Got result for invoked method: createStream 10-03 20:11:42.258 16929 28291 D RtmpConnection: handleRxInvoke(): Stream ID to publish: 1 10-03 20:11:42.258 16929 28291 D RtmpConnection: fmlePublish(): Sending publish command... 10-03 20:11:42.259 16929 28291 D RtmpConnection: wrote packet: RTMP Command (command: publish, transaction ID: 0), size: 53 10-03 20:11:42.269 2489 28443 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 16 msec) 10-03 20:11:42.276 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.278 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.285 2489 28445 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(38), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(2) 10-03 20:11:42.286 2489 28445 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd39be000), in_address_2(0xe100f000) 10-03 20:11:42.286 2489 28445 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd39be000), out_address_2(0xe100f000) 10-03 20:11:42.304 2489 28445 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 18 msec) 10-03 20:11:42.317 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.320 2489 28447 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(39), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(3) 10-03 20:11:42.320 2489 28447 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xdeb1e000), in_address_2(0xe0a8f000) 10-03 20:11:42.320 2489 28447 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xdeb1e000), out_address_2(0xe0a8f000) 10-03 20:11:42.336 2489 28447 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 16 msec) 10-03 20:11:42.338 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.354 2489 28449 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(40), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(4) 10-03 20:11:42.354 2489 28449 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd37dd000), in_address_2(0xe098f000) 10-03 20:11:42.354 2489 28449 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd37dd000), out_address_2(0xe098f000) 10-03 20:11:42.360 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.363 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.372 2489 28449 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 17 msec) 10-03 20:11:42.381 2954 2982 I WindowManager_SurfaceController: Destroying surface Surface(name=Toast) called by com.android.server.wm.WindowStateAnimator.destroySurface:3070 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:1138 com.android.server.wm.WindowState.destroyOrSaveSurface:2798 com.android.server.wm.WindowSurfacePlacer.performSurfacePlacementInner:510 com.android.server.wm.WindowSurfacePlacer.performSurfacePlacementLoop:284 com.android.server.wm.WindowSurfacePlacer.performSurfacePlacement:232 com.android.server.wm.WindowManagerService$H.handleMessage:9606 android.os.Handler.dispatchMessage:102 10-03 20:11:42.382 2411 14001 I SurfaceFlinger: id=3605 Removed Toast (8/8) 10-03 20:11:42.382 2411 2419 I SurfaceFlinger: id=3605 Removed Toast (-2/8) 10-03 20:11:42.385 2489 28451 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(41), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(5) 10-03 20:11:42.385 2489 28451 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd2d05000), in_address_2(0xe078f000) 10-03 20:11:42.386 2489 28451 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd2d05000), out_address_2(0xe078f000) 10-03 20:11:42.403 2489 28451 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 18 msec) 10-03 20:11:42.405 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.418 2489 28453 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(42), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(6) 10-03 20:11:42.418 2489 28453 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd2a25000), in_address_2(0xdf88f000) 10-03 20:11:42.418 2489 28453 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd2a25000), out_address_2(0xdf88f000) 10-03 20:11:42.435 2489 28453 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 16 msec) 10-03 20:11:42.436 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.438 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.448 2502 2937 D EnterpriseController: netId is 0 10-03 20:11:42.448 2502 2937 D Netd : getNetworkForDns: using netid 559 for uid 10357 10-03 20:11:42.448 2502 2937 D DnsProxyListener: DNSDBG::dns addrinfo af 2 10-03 20:11:42.452 2489 28456 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(43), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(7) 10-03 20:11:42.452 2489 28456 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd2943000), in_address_2(0xdf50f000) 10-03 20:11:42.452 2489 28456 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd2943000), out_address_2(0xdf50f000) 10-03 20:11:42.469 2489 28456 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 17 msec) 10-03 20:11:42.476 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.478 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.485 2489 28458 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(44), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(8) 10-03 20:11:42.486 2489 28458 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd2861000), in_address_2(0xdee8f000) 10-03 20:11:42.486 2489 28458 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd2861000), out_address_2(0xdee8f000) 10-03 20:11:42.501 2489 28458 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 15 msec) 10-03 20:11:42.516 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.519 2489 28460 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(45), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(9) 10-03 20:11:42.519 2489 28460 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd277f000), in_address_2(0xdeaad000) 10-03 20:11:42.519 2489 28460 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd277f000), out_address_2(0xdeaad000) 10-03 20:11:42.531 2489 28460 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 12 msec) 10-03 20:11:42.534 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.551 2489 28462 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(46), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(10) 10-03 20:11:42.552 2489 28462 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd269d000), in_address_2(0xde211000) 10-03 20:11:42.552 2489 28462 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd269d000), out_address_2(0xde211000) 10-03 20:11:42.557 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.561 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.566 2489 28462 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 15 msec) 10-03 20:11:42.584 2489 28464 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(47), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(11) 10-03 20:11:42.584 16929 17566 I libOpenSLES: Emulating old channel mask behavior (ignoring positional mask 0x3, using default mask 0x3 based on channel count of 2) 10-03 20:11:42.585 2489 28464 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd25bb000), in_address_2(0xda511000) 10-03 20:11:42.585 2489 28464 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd25bb000), out_address_2(0xda511000) 10-03 20:11:42.586 2488 7082 I AudioFlinger: add dynamic flag, can move to deep thread, session 14385 10-03 20:11:42.591 16929 17566 D AudioTrack: Client defaulted notificationFrames to 240 for frameCount 480 10-03 20:11:42.595 2489 28464 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 10 msec) 10-03 20:11:42.599 2488 13897 W AudioPolicyIntefaceImpl: Skipped to add effects on session 14385 10-03 20:11:42.599 2488 13897 I APM_AudioPolicyManager: startOutput() output 21, stream 3, session 14385 10-03 20:11:42.599 2488 2548 D audio_hw_primary: adev_set_parameters: enter: kvpairs: TFA_SETVOLUME=15 10-03 20:11:42.600 2488 13897 I AudioEffectStage: getBuffer low_output_sub1_normal, 0xeb37c000 10-03 20:11:42.600 2488 13897 I AudioEffectStage: getBuffer low_output_sub1_normal 10-03 20:11:42.602 2488 2583 V audio_hw_primary: start_output_stream+, out->device : 00000002 , out->type = 1 10-03 20:11:42.602 2488 2583 D audio_hw_primary: start_output_stream jack_skip_check false 10-03 20:11:42.602 2488 2583 D audio_hw_primary: start_output_stream (0xebab47e0) out->pcm_device:7 out->config.rate:48000 out->config.format:0 out->period_size:240 10-03 20:11:42.603 2488 2583 D audio_hw_primary: start_output_stream (0xebab47e0) out->config.rate:48000 out->config.format:0 out->period_size:240 10-03 20:11:42.603 2488 2583 V audio_hw_primary: select_devices output_scenario:0 input_scenario:2 out_snd_device 0x2 in_snd_device:0xb 10-03 20:11:42.603 2488 2583 D audio_hw_spk_amp: check_speaker_amp_off: turning_off_speaker_amp = true 10-03 20:11:42.603 2488 2583 I audio_hw_primary: skip turning off nxp amp due to google hotword. 10-03 20:11:42.603 2488 2583 I audio_route: > audio_route_reset : 10-03 20:11:42.603 2488 2583 I audio_route: > audio_route_apply_path : "recording-mic" 10-03 20:11:42.604 2488 2583 V audio_hw_primary: select_devices() input_route "recording-mic" 10-03 20:11:42.604 2488 2583 I audio_route: > audio_route_apply_path : "media-speaker" 10-03 20:11:42.605 2488 2583 V audio_hw_primary: select_devices() output_route "media-speaker" 10-03 20:11:42.605 2488 2583 I audio_route: > audio_route_apply_path : "gain-recording-mic" 10-03 20:11:42.605 2488 2583 V audio_hw_primary: select_devices() input_gain "gain-recording-mic" 10-03 20:11:42.605 2488 2583 I audio_route: > audio_route_apply_path : "gain-media-speaker" 10-03 20:11:42.605 2488 2583 V audio_hw_primary: select_devices() output_gain "gain-media-speaker" 10-03 20:11:42.605 2488 2583 I audio_route: > audio_route_update_mixer : + 10-03 20:11:42.605 2488 2583 I audio_route: > audio_route_update_mixer : changed(0) - 10-03 20:11:42.605 2488 2583 D audio_hw_primary: select_devices: pcm_voice_out 0x0 10-03 20:11:42.605 2488 2583 D audio_hw_primary: select_devices: pcm_fm_out 0x0 10-03 20:11:42.605 2488 2583 I audio_hw_primary: select_devices - 10-03 20:11:42.605 2488 2583 D audio_hw_spk_amp: check_speaker_amp_on: turning_on_speaker_amp = true 10-03 20:11:42.605 2488 2583 D tfa98xxApp: [NXP] [MAR 28, 2017] tfa_enable: turning tfa on 10-03 20:11:42.605 2488 2583 D tfa98xxApp: [NXP] tfa_enable: tfa_i2c_dev_name = /dev/i2c-20, tfa_i2c_speed = 307 kbps, tfa_log_enable_cnt = 79, tfa_log_coldboot_cnt = 1 10-03 20:11:42.605 2488 2583 D tfa98xxApp: [NXP] tfa_enable: coldstartup_flag = 1 10-03 20:11:42.605 2488 2583 D tfa98xxApp: [NXP] tfa_enable: check speakerOn(0) && (tfaMode(0) == prev_tfaMode(0)) 10-03 20:11:42.606 2488 2583 D tfa98xxApp: [NXP] tfa_iscoldboot: Loaded container file /system/etc/Tfa9890.cnt. 10-03 20:11:42.606 2488 2583 D tfa_usrdrv: [NXP] tfaRunIsCold: status reg = 0x025d 10-03 20:11:42.606 2488 2583 D tfa98xxApp: [NXP] tfa_enable: warm boot 10-03 20:11:42.606 2488 2583 D tfa98xxApp: [NXP] tfa_enable: ic stable time 80 ms 10-03 20:11:42.611 2954 2965 I EDMNativeHelperService: isCameraEnabled 10-03 20:11:42.616 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.617 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.619 2489 28468 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(48), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(0) 10-03 20:11:42.620 2489 28468 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xe8e39000), in_address_2(0xe9373000) 10-03 20:11:42.620 2489 28468 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xe8e39000), out_address_2(0xe9373000) 10-03 20:11:42.641 2489 28468 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 22 msec) 10-03 20:11:42.652 2489 28470 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(49), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(1) 10-03 20:11:42.652 2489 28470 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd3c9e000), in_address_2(0xe926c000) 10-03 20:11:42.652 2489 28470 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd3c9e000), out_address_2(0xe926c000) 10-03 20:11:42.654 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.658 2502 2937 D EnterpriseController: netId is 0 10-03 20:11:42.658 2502 2937 D Netd : getNetworkForDns: using netid 559 for uid 10357 10-03 20:11:42.658 2502 2937 D DnsProxyListener: DNSDBG::dns addrinfo af 2 10-03 20:11:42.677 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.677 2489 28470 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 25 msec) 10-03 20:11:42.678 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.687 2488 2583 D tfa98xxApp: [NXP] tfa_enable: Tfa mode would be switched. prev = 0, current = 0 10-03 20:11:42.687 2488 2583 D tfa98xxApp: [NXP] tfa_speakeron: begin 10-03 20:11:42.687 2488 2583 D tfa98xxApp: [NXP] tfa_speakeron: set mode 0, current mode 0 10-03 20:11:42.687 2488 2583 D tfa98xxApp: [NXP] tfa_speakeron: Loaded container file speaker_on /system/etc/Tfa9890.cnt. 10-03 20:11:42.687 2488 2583 D tfa98xxApp: [NXP] tfa_speakeron: tfa start with volume 15. 10-03 20:11:42.687 2489 28474 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(50), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(2) 10-03 20:11:42.687 2489 28474 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd39be000), in_address_2(0xe100f000) 10-03 20:11:42.687 2489 28474 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd39be000), out_address_2(0xe100f000) 10-03 20:11:42.688 2488 2583 D tfa_dsp : tfaRunMute: -------------------- muted -------------------- 10-03 20:11:42.688 2488 2583 D tfa_container: tfaContWriteRegsProf: ----- profile: HQ (0) ----- 10-03 20:11:42.688 2488 2583 D tfa_container: tfaRunWriteBitfield: bitfield: CLIP=0x1 (0x49[0..0]=0x1) 10-03 20:11:42.690 2488 2583 D tfa_container: tfaRunWriteBitfield: bitfield: I2SSR=0x8 (0x4[12..15]=0x8) 10-03 20:11:42.690 2488 2583 D tfa_container: tfaRunWriteBitfield: bitfield: CHSA=0x2 (0x4[6..7]=0x2) 10-03 20:11:42.690 2488 2583 D tfa_container: tfaRunWriteBitfield: bitfield: CHS12=0x3 (0x4[3..4]=0x3) 10-03 20:11:42.690 2488 2583 D tfa_container: tfaRunWriteBitfield: bitfield: CFE=0x1 (0x9[2..2]=0x1) 10-03 20:11:42.692 2488 2583 D tfa_dsp : tfa_cf_powerup: power on (PWDN=0) 10-03 20:11:42.693 2488 2583 D tfa_dsp : tfa_cf_powerup: start dsp (set SBSL = 1) 10-03 20:11:42.702 2489 28474 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 15 msec) 10-03 20:11:42.704 2488 2583 D tfa_dsp : [NXP] tfa_start: status = 0xd05f (after power up) 10-03 20:11:42.713 2488 2583 D tfa_dsp : tfaRunUnmute: -------------------unmuted ------------------ 10-03 20:11:42.714 2488 2583 D tfa98xxApp: [NXP] tfa_speakeron: start usecase success 10-03 20:11:42.714 2488 2583 D tfa98xxApp: [NXP] tfa_speakeron: tfa mode same, nothing to be done 10-03 20:11:42.714 2488 2583 D tfa98xxApp: [NXP] tfa_speakeron: tfa start use case success 10-03 20:11:42.714 2488 2583 D tfa98xxApp: [NXP] tfa_speakeron: end 10-03 20:11:42.714 2488 2583 D tfa98xxApp: [NXP] tfa_enable: tfaVolume : 15 only attenuation 10-03 20:11:42.714 2488 2583 D tfa98xxApp: [NXP] tfa_setvolumeattenuation: begin 10-03 20:11:42.714 2488 2583 D tfa98xxApp: [NXP] tfa_setvolumeattenuation: tfa mode is set for 0 in set volume attenuation 10-03 20:11:42.714 2488 2583 D tfa98xxApp: [NXP] tfa_setvolumeattenuation: volume set to : 15 10-03 20:11:42.714 2488 2583 D tfa98xxApp: [NXP] tfa_setvolumeattenuation: tfa set volume successful 10-03 20:11:42.714 2488 2583 D tfa98xxApp: [NXP] tfa_setvolumeattenuation: end 10-03 20:11:42.715 2488 2583 D tfa_usrdrv: [NXP] tfa_show_status_device: /dev/i2c-20 0x34, device = 0, status = 0xd05f, WDS = 0, ACS = 0, CHSA = 2, DCA = 1, CHS12 = 3, SWS = 1, PLLS = 1, SBSL = 1, RCV = 0, INPLVL = 0, PWDN = 0, re0 = 0x1949 (6.3213 ohm) 10-03 20:11:42.715 2488 2583 D tfa98xxApp: [NXP] tfa_enable: end 10-03 20:11:42.715 2488 2583 V audio_hw_primary: start_output_stream- 10-03 20:11:42.718 2489 28476 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(51), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(3) 10-03 20:11:42.718 2489 28476 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xdeb1e000), in_address_2(0xe0a8f000) 10-03 20:11:42.718 2489 28476 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xdeb1e000), out_address_2(0xe0a8f000) 10-03 20:11:42.735 2489 28476 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 16 msec) 10-03 20:11:42.737 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.739 2488 2583 D AudioFlinger: mixer(0xeb003200) Spend too much time to write: delta 138(effect 1, stage 0) 10-03 20:11:42.740 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.752 2489 28478 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(52), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(4) 10-03 20:11:42.752 2489 28478 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd37dd000), in_address_2(0xe098f000) 10-03 20:11:42.752 2489 28478 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd37dd000), out_address_2(0xe098f000) 10-03 20:11:42.770 2489 28478 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-STK Preview Execution Time : ( 17 msec) 10-03 20:11:42.790 2489 28480 I ExynosCameraPipeSTK_PREVIEW: [CAM_ID(0)][PIPE_STK_PREVIEW]-INFO(m_run[229]):Start STK_Preview frameCount(53), stkPreviewQ(0), SeriesShotMode(0) nv21_STK_in_Buffer(5) 10-03 20:11:42.790 2489 28480 I stainkiller: stain_killer_run[0][STK_SCENARIO_PREVIEW] width(1280), height(720), in_address_1(0xd2d05000), in_address_2(0xe078f000) 10-03 20:11:42.790 2489 28480 I stainkiller: stain_killer_run[STK_SCENARIO_PREVIEW], format[STK_NV21_M], out_address_1(0xd2d05000), out_address_2(0xe078f000) 10-03 20:11:42.807 16929 28236 I SrsFlvMuxer: frame discarded 10-03 20:11:42.808 16929 28236 I SrsFlvMuxer: frame discarded

pedroSG94 commented 5 years ago

You can ignore frame discarded, this is because you are waiting server response and you have buffer queue full so you discard frames to preserve memory. This look a connection error in RtmpConnection class.

First of all check if you receive any reason in this callback: https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/blob/master/app/src/main/java/com/pedro/rtpstreamer/openglexample/OpenGlRtmpActivity.java#L297

After, check if connection is successfull here (connected variable should be true): https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/blob/master/rtmp/src/main/java/com/github/faucamp/simplertmp/io/RtmpConnection.java#L206

mmaschenko commented 5 years ago

Thanks for all of your answers btw, i really appreciate all of your efforts. Will look for connection issues for right now

mmaschenko commented 5 years ago

Hi, from what i investigated preview mode works fine. But here is new issue that i've found. If you rotate directly from landscape to landscapeReverse it is still showing wrong view that is upside (stream is also is upside down). I am using OpenGLView and last version your lib 1.4.2. Do you have any suggestions?

pedroSG94 commented 5 years ago

I found the problem. The reason is that you should indicate library new rotation when you rotate device. For example (This is my OpenGlRtmpActivity):

package com.pedro.rtpstreamer.openglexample;

import android.content.Context;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.hardware.SensorManager;
import android.media.MediaPlayer;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.support.annotation.RequiresApi;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.OrientationEventListener;
import android.view.SurfaceHolder;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.pedro.encoder.input.gl.render.filters.AndroidViewFilterRender;
import com.pedro.encoder.input.gl.render.filters.BasicDeformationFilterRender;
import com.pedro.encoder.input.gl.render.filters.BeautyFilterRender;
import com.pedro.encoder.input.gl.render.filters.BlurFilterRender;
import com.pedro.encoder.input.gl.render.filters.BrightnessFilterRender;
import com.pedro.encoder.input.gl.render.filters.CartoonFilterRender;
import com.pedro.encoder.input.gl.render.filters.ColorFilterRender;
import com.pedro.encoder.input.gl.render.filters.ContrastFilterRender;
import com.pedro.encoder.input.gl.render.filters.DuotoneFilterRender;
import com.pedro.encoder.input.gl.render.filters.EarlyBirdFilterRender;
import com.pedro.encoder.input.gl.render.filters.EdgeDetectionFilterRender;
import com.pedro.encoder.input.gl.render.filters.ExposureFilterRender;
import com.pedro.encoder.input.gl.render.filters.FireFilterRender;
import com.pedro.encoder.input.gl.render.filters.GammaFilterRender;
import com.pedro.encoder.input.gl.render.filters.GreyScaleFilterRender;
import com.pedro.encoder.input.gl.render.filters.HalftoneLinesFilterRender;
import com.pedro.encoder.input.gl.render.filters.Image70sFilterRender;
import com.pedro.encoder.input.gl.render.filters.LamoishFilterRender;
import com.pedro.encoder.input.gl.render.filters.MoneyFilterRender;
import com.pedro.encoder.input.gl.render.filters.NegativeFilterRender;
import com.pedro.encoder.input.gl.render.filters.NoFilterRender;
import com.pedro.encoder.input.gl.render.filters.PixelatedFilterRender;
import com.pedro.encoder.input.gl.render.filters.PolygonizationFilterRender;
import com.pedro.encoder.input.gl.render.filters.RGBSaturationFilterRender;
import com.pedro.encoder.input.gl.render.filters.RainbowFilterRender;
import com.pedro.encoder.input.gl.render.filters.RippleFilterRender;
import com.pedro.encoder.input.gl.render.filters.RotationFilterRender;
import com.pedro.encoder.input.gl.render.filters.SaturationFilterRender;
import com.pedro.encoder.input.gl.render.filters.SepiaFilterRender;
import com.pedro.encoder.input.gl.render.filters.SharpnessFilterRender;
import com.pedro.encoder.input.gl.render.filters.SurfaceFilterRender;
import com.pedro.encoder.input.gl.render.filters.TemperatureFilterRender;
import com.pedro.encoder.input.gl.render.filters.ZebraFilterRender;
import com.pedro.encoder.input.gl.render.filters.object.GifObjectFilterRender;
import com.pedro.encoder.input.gl.render.filters.object.ImageObjectFilterRender;
import com.pedro.encoder.input.gl.render.filters.object.TextObjectFilterRender;
import com.pedro.encoder.input.video.CameraOpenException;
import com.pedro.encoder.utils.gl.TranslateTo;
import com.pedro.rtplibrary.rtmp.RtmpCamera1;
import com.pedro.rtplibrary.view.OpenGlView;
import com.pedro.rtpstreamer.R;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import net.ossrs.rtmp.ConnectCheckerRtmp;

/**
 * More documentation see:
 * {@link com.pedro.rtplibrary.base.Camera1Base}
 * {@link com.pedro.rtplibrary.rtmp.RtmpCamera1}
 */
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2)
public class OpenGlRtmpActivity extends AppCompatActivity
    implements ConnectCheckerRtmp, View.OnClickListener, SurfaceHolder.Callback {

  public interface rotationCallbackFn {
    void onRotationChanged(int lastRotation, int newRotation);
  }

  public class RotationListenerHelper {

    private int lastRotation;

    private WindowManager windowManager;
    private OrientationEventListener orientationEventListener;

    private rotationCallbackFn callback;

    public RotationListenerHelper() {
    }

    public void listen(Context context, rotationCallbackFn callback) {
      // registering the listening only once.
      stop();
      context = context.getApplicationContext();
      this.callback = callback;
      this.windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);

      this.orientationEventListener = new OrientationEventListener(context, SensorManager.SENSOR_DELAY_NORMAL) {
        @Override
        public void onOrientationChanged(int orientation) {
          WindowManager localWindowManager = windowManager;
          rotationCallbackFn localCallback = RotationListenerHelper.this.callback;
          if (windowManager != null && localCallback != null) {
            int newRotation = localWindowManager.getDefaultDisplay().getRotation();
            if (newRotation != lastRotation) {
              localCallback.onRotationChanged(lastRotation, newRotation);
              lastRotation = newRotation;
            }
          }
        }
      };
      this.orientationEventListener.enable();

      lastRotation = windowManager.getDefaultDisplay().getRotation();
    }

    public void stop() {
      if (this.orientationEventListener != null) {
        this.orientationEventListener.disable();
      }
      this.orientationEventListener = null;
      this.windowManager = null;
      this.callback = null;
    }
  }

  private RotationListenerHelper rotationListenerHelper;
  private RtmpCamera1 rtmpCamera1;
  private Button button;
  private Button bRecord;
  private EditText etUrl;

  private String currentDateAndTime = "";
  private File folder = new File(Environment.getExternalStorageDirectory().getAbsolutePath()
      + "/rtmp-rtsp-stream-client-java");
  private OpenGlView openGlView;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    setContentView(R.layout.activity_open_gl);
    openGlView = findViewById(R.id.surfaceView);
    button = findViewById(R.id.b_start_stop);
    button.setOnClickListener(this);
    bRecord = findViewById(R.id.b_record);
    bRecord.setOnClickListener(this);
    Button switchCamera = findViewById(R.id.switch_camera);
    switchCamera.setOnClickListener(this);
    etUrl = findViewById(R.id.et_rtp_url);
    etUrl.setHint(R.string.hint_rtmp);
    rtmpCamera1 = new RtmpCamera1(openGlView, this);
    openGlView.getHolder().addCallback(this);
    rotationListenerHelper = new RotationListenerHelper();
  }

  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.gl_menu, menu);
    return true;
  }

  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
      case R.id.e_d_fxaa:
        Toast.makeText(this,
            "FXAA " + (rtmpCamera1.getGlInterface().isAAEnabled() ? " enabled" : "disabled"),
            Toast.LENGTH_SHORT).show();
        rtmpCamera1.getGlInterface().enableAA(!rtmpCamera1.getGlInterface().isAAEnabled());
        return true;
      //filters. NOTE: You can change filter values on fly without reset the filter.
      // Example:
      // ColorFilterRender color = new ColorFilterRender()
      // rtmpCamera1.setFilter(color);
      // color.setRGBColor(255, 0, 0); //red tint
      case R.id.no_filter:
        rtmpCamera1.getGlInterface().setFilter(new NoFilterRender());
        return true;
      case R.id.android_view:
        AndroidViewFilterRender androidViewFilterRender = new AndroidViewFilterRender();
        androidViewFilterRender.setView(findViewById(R.id.activity_example_rtmp));
        rtmpCamera1.getGlInterface().setFilter(androidViewFilterRender);
        return true;
      case R.id.basic_deformation:
        rtmpCamera1.getGlInterface().setFilter(new BasicDeformationFilterRender());
        return true;
      case R.id.beauty:
        rtmpCamera1.getGlInterface().setFilter(new BeautyFilterRender());
        return true;
      case R.id.blur:
        rtmpCamera1.getGlInterface().setFilter(new BlurFilterRender());
        return true;
      case R.id.brightness:
        rtmpCamera1.getGlInterface().setFilter(new BrightnessFilterRender());
        return true;
      case R.id.cartoon:
        rtmpCamera1.getGlInterface().setFilter(new CartoonFilterRender());
        return true;
      case R.id.color:
        rtmpCamera1.getGlInterface().setFilter(new ColorFilterRender());
        return true;
      case R.id.contrast:
        rtmpCamera1.getGlInterface().setFilter(new ContrastFilterRender());
        return true;
      case R.id.duotone:
        rtmpCamera1.getGlInterface().setFilter(new DuotoneFilterRender());
        return true;
      case R.id.early_bird:
        rtmpCamera1.getGlInterface().setFilter(new EarlyBirdFilterRender());
        return true;
      case R.id.edge_detection:
        rtmpCamera1.getGlInterface().setFilter(new EdgeDetectionFilterRender());
        return true;
      case R.id.exposure:
        rtmpCamera1.getGlInterface().setFilter(new ExposureFilterRender());
        return true;
      case R.id.fire:
        rtmpCamera1.getGlInterface().setFilter(new FireFilterRender());
        return true;
      case R.id.gamma:
        rtmpCamera1.getGlInterface().setFilter(new GammaFilterRender());
        return true;
      case R.id.gif:
        setGifToStream();
        return true;
      case R.id.grey_scale:
        rtmpCamera1.getGlInterface().setFilter(new GreyScaleFilterRender());
        return true;
      case R.id.halftone_lines:
        rtmpCamera1.getGlInterface().setFilter(new HalftoneLinesFilterRender());
        return true;
      case R.id.image:
        setImageToStream();
        return true;
      case R.id.image_70s:
        rtmpCamera1.getGlInterface().setFilter(new Image70sFilterRender());
        return true;
      case R.id.lamoish:
        rtmpCamera1.getGlInterface().setFilter(new LamoishFilterRender());
        return true;
      case R.id.money:
        rtmpCamera1.getGlInterface().setFilter(new MoneyFilterRender());
        return true;
      case R.id.negative:
        rtmpCamera1.getGlInterface().setFilter(new NegativeFilterRender());
        return true;
      case R.id.pixelated:
        rtmpCamera1.getGlInterface().setFilter(new PixelatedFilterRender());
        return true;
      case R.id.polygonization:
        rtmpCamera1.getGlInterface().setFilter(new PolygonizationFilterRender());
        return true;
      case R.id.rainbow:
        rtmpCamera1.getGlInterface().setFilter(new RainbowFilterRender());
        return true;
      case R.id.rgb_saturate:
        RGBSaturationFilterRender rgbSaturationFilterRender = new RGBSaturationFilterRender();
        rtmpCamera1.getGlInterface().setFilter(rgbSaturationFilterRender);
        //Reduce green and blue colors 20%. Red will predominate.
        rgbSaturationFilterRender.setRGBSaturation(1f, 0.8f, 0.8f);
        return true;
      case R.id.ripple:
        rtmpCamera1.getGlInterface().setFilter(new RippleFilterRender());
        return true;
      case R.id.rotation:
        RotationFilterRender rotationFilterRender = new RotationFilterRender();
        rtmpCamera1.getGlInterface().setFilter(rotationFilterRender);
        rotationFilterRender.setRotation(90);
        return true;
      case R.id.saturation:
        rtmpCamera1.getGlInterface().setFilter(new SaturationFilterRender());
        return true;
      case R.id.sepia:
        rtmpCamera1.getGlInterface().setFilter(new SepiaFilterRender());
        return true;
      case R.id.sharpness:
        rtmpCamera1.getGlInterface().setFilter(new SharpnessFilterRender());
        return true;
      case R.id.surface_filter:
        //You can render this filter with other api that draw in a surface. for example you can use VLC
        SurfaceFilterRender surfaceFilterRender = new SurfaceFilterRender();
        rtmpCamera1.getGlInterface().setFilter(surfaceFilterRender);
        MediaPlayer mediaPlayer = MediaPlayer.create(this, R.raw.big_bunny_240p);
        mediaPlayer.setSurface(surfaceFilterRender.getSurface());
        mediaPlayer.start();
        //Video is 360x240 so select a percent to keep aspect ratio (50% x 33.3% screen)
        surfaceFilterRender.setScale(50f, 33.3f);
        surfaceFilterRender.setListeners(openGlView); //Optional
        return true;
      case R.id.temperature:
        rtmpCamera1.getGlInterface().setFilter(new TemperatureFilterRender());
        return true;
      case R.id.text:
        setTextToStream();
        return true;
      case R.id.zebra:
        rtmpCamera1.getGlInterface().setFilter(new ZebraFilterRender());
        return true;
      default:
        return false;
    }
  }

  private void setTextToStream() {
    TextObjectFilterRender textObjectFilterRender = new TextObjectFilterRender();
    rtmpCamera1.getGlInterface().setFilter(textObjectFilterRender);
    textObjectFilterRender.setText("Hello world", 22, Color.RED);
    textObjectFilterRender.setDefaultScale(rtmpCamera1.getStreamWidth(),
        rtmpCamera1.getStreamHeight());
    textObjectFilterRender.setPosition(TranslateTo.CENTER);
    textObjectFilterRender.setListeners(openGlView);  //Optional
  }

  private void setImageToStream() {
    ImageObjectFilterRender imageObjectFilterRender = new ImageObjectFilterRender();
    rtmpCamera1.getGlInterface().setFilter(imageObjectFilterRender);
    imageObjectFilterRender.setImage(
        BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher));
    imageObjectFilterRender.setDefaultScale(rtmpCamera1.getStreamWidth(),
        rtmpCamera1.getStreamHeight());
    imageObjectFilterRender.setPosition(TranslateTo.RIGHT);
    imageObjectFilterRender.setListeners(openGlView); //Optional
  }

  private void setGifToStream() {
    try {
      GifObjectFilterRender gifObjectFilterRender = new GifObjectFilterRender();
      gifObjectFilterRender.setGif(getResources().openRawResource(R.raw.banana));
      rtmpCamera1.getGlInterface().setFilter(gifObjectFilterRender);
      gifObjectFilterRender.setDefaultScale(rtmpCamera1.getStreamWidth(),
          rtmpCamera1.getStreamHeight());
      gifObjectFilterRender.setPosition(TranslateTo.BOTTOM);
      gifObjectFilterRender.setListeners(openGlView); //Optional
    } catch (IOException e) {
      Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
    }
  }

  @Override
  public void onConnectionSuccessRtmp() {
    runOnUiThread(new Runnable() {
      @Override
      public void run() {
        Toast.makeText(OpenGlRtmpActivity.this, "Connection success", Toast.LENGTH_SHORT).show();
      }
    });
  }

  @Override
  public void onConnectionFailedRtmp(final String reason) {
    runOnUiThread(new Runnable() {
      @Override
      public void run() {
        Toast.makeText(OpenGlRtmpActivity.this, "Connection failed. " + reason, Toast.LENGTH_SHORT)
            .show();
        rtmpCamera1.stopStream();
        button.setText(R.string.start_button);
      }
    });
  }

  @Override
  public void onDisconnectRtmp() {
    runOnUiThread(new Runnable() {
      @Override
      public void run() {
        Toast.makeText(OpenGlRtmpActivity.this, "Disconnected", Toast.LENGTH_SHORT).show();
      }
    });
  }

  @Override
  public void onAuthErrorRtmp() {
    runOnUiThread(new Runnable() {
      @Override
      public void run() {
        Toast.makeText(OpenGlRtmpActivity.this, "Auth error", Toast.LENGTH_SHORT).show();
      }
    });
  }

  @Override
  public void onAuthSuccessRtmp() {
    runOnUiThread(new Runnable() {
      @Override
      public void run() {
        Toast.makeText(OpenGlRtmpActivity.this, "Auth success", Toast.LENGTH_SHORT).show();
      }
    });
  }

  @Override
  public void onClick(View view) {
    switch (view.getId()) {
      case R.id.b_start_stop:
        if (!rtmpCamera1.isStreaming()) {
          if (rtmpCamera1.isRecording()
              || rtmpCamera1.prepareAudio() && rtmpCamera1.prepareVideo()) {
            button.setText(R.string.stop_button);
            rtmpCamera1.startStream(etUrl.getText().toString());
          } else {
            Toast.makeText(this, "Error preparing stream, This device cant do it",
                Toast.LENGTH_SHORT).show();
          }
        } else {
          button.setText(R.string.start_button);
          rtmpCamera1.stopStream();
        }
        break;
      case R.id.switch_camera:
        try {
          rtmpCamera1.switchCamera();
        } catch (CameraOpenException e) {
          Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
        }
        break;
      case R.id.b_record:
        if (!rtmpCamera1.isRecording()) {
          try {
            if (!folder.exists()) {
              folder.mkdir();
            }
            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault());
            currentDateAndTime = sdf.format(new Date());
            if (!rtmpCamera1.isStreaming()) {
              if (rtmpCamera1.prepareAudio() && rtmpCamera1.prepareVideo()) {
                rtmpCamera1.startRecord(
                    folder.getAbsolutePath() + "/" + currentDateAndTime + ".mp4");
                bRecord.setText(R.string.stop_record);
                Toast.makeText(this, "Recording... ", Toast.LENGTH_SHORT).show();
              } else {
                Toast.makeText(this, "Error preparing stream, This device cant do it",
                    Toast.LENGTH_SHORT).show();
              }
            } else {
              rtmpCamera1.startRecord(folder.getAbsolutePath() + "/" + currentDateAndTime + ".mp4");
              bRecord.setText(R.string.stop_record);
              Toast.makeText(this, "Recording... ", Toast.LENGTH_SHORT).show();
            }
          } catch (IOException e) {
            rtmpCamera1.stopRecord();
            bRecord.setText(R.string.start_record);
            Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
          }
        } else {
          rtmpCamera1.stopRecord();
          bRecord.setText(R.string.start_record);
          Toast.makeText(this,
              "file " + currentDateAndTime + ".mp4 saved in " + folder.getAbsolutePath(),
              Toast.LENGTH_SHORT).show();
          currentDateAndTime = "";
        }
        break;
      default:
        break;
    }
  }

  @Override
  public void surfaceCreated(SurfaceHolder surfaceHolder) {

  }

  @Override
  public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i1, int i2) {
    rtmpCamera1.startPreview();
    rotationListenerHelper.listen(this, new rotationCallbackFn() {
      @Override
      public void onRotationChanged(int lastRotation, int newRotation) {
        final int curOrientation =  getWindowManager().getDefaultDisplay().getRotation();

        switch (curOrientation) {
          case 0:
            //. SCREEN_ORIENTATION_PORTRAIT
            resetPreview();
            break;
          //----------------------------------------
          case 2:
            //. SCREEN_ORIENTATION_REVERSE_PORTRAIT
            resetPreview();
            break;
          //----------------------------------------
          case 1:
            //. SCREEN_ORIENTATION_LANDSCAPE
            resetPreview();
            break;
          //----------------------------------------
          case 3:
            //. SCREEN_ORIENTATION_REVERSE_LANDSCAPE
            resetPreview();
            break;
          //----------------------------------------
        }
      }
    });
  }

  @Override
  public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
    rotationListenerHelper.stop();
    if (rtmpCamera1.isRecording()) {
      rtmpCamera1.stopRecord();
      bRecord.setText(R.string.start_record);
      Toast.makeText(this,
          "file " + currentDateAndTime + ".mp4 saved in " + folder.getAbsolutePath(),
          Toast.LENGTH_SHORT).show();
      currentDateAndTime = "";
    }
    if (rtmpCamera1.isStreaming()) {
      rtmpCamera1.stopStream();
      button.setText(getResources().getString(R.string.start_button));
    }
    rtmpCamera1.stopPreview();
  }

  private void resetPreview() {
    if (rtmpCamera1.isRecording()) {
      rtmpCamera1.stopRecord();
      bRecord.setText(R.string.start_record);
      Toast.makeText(this,
          "file " + currentDateAndTime + ".mp4 saved in " + folder.getAbsolutePath(),
          Toast.LENGTH_SHORT).show();
      currentDateAndTime = "";
    }
    if (rtmpCamera1.isStreaming()) {
      rtmpCamera1.stopStream();
      button.setText(getResources().getString(R.string.start_button));
    }
    rtmpCamera1.stopPreview();

    rtmpCamera1.startPreview();
  }
}

Remember change screenOrientation in manifest to fullSensor or sensorLandscape if you want. Also if you are using prepareVideo or startPreview with custom parameters your rotation should be:

CameraHelper.getCameraOrientation(context);
andrewBatutin commented 5 years ago

Hi OpenGLView works ok. But if i use surface view - i have an issue with front camera in landscape_reverse - it's flipped upside down. OpenGLView is ok for me. But maybe you should take a look at SurfaceView activity Thnx

pedroSG94 commented 5 years ago

Hi OpenGLView works ok. But if i use surface view - i have an issue with front camera in landscape_reverse - it's flipped upside down. OpenGLView is ok for me. But maybe you should take a look at SurfaceView activity Thnx

I will check it. Thanks :D