加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

flash's SurfaceTexture

发布时间:2020-12-15 18:34:20 所属栏目:百科 来源:网络整理
导读:original,how webview go? 1. generate a MediaLayer with webview. 2. MediaLayer has a MediaTexture. in MediaLayer generate a MediaTexture with webview. 3. MediaTexture has a TextureWrapper (TextureWrapper has SurfaceTexture,ANativeWindow,Med
original,how webview go? 1. generate a MediaLayer with webview. 2. MediaLayer has a MediaTexture. in MediaLayer generate a MediaTexture with webview. 3. MediaTexture has a TextureWrapper (TextureWrapper has SurfaceTexture,ANativeWindow,MediaListener) in TextureWrapper use webview to generate a MediaListener how could flash push data to mediaLayer? 1.MediaLayer call MediaTexture's creatureTexture. in this,create a new Wrapper wrapper->surfaceTexture,SurfaceTexture(server proxy) wrapper->nativeWindow,SurfaceTextureClient(so,native is a surface,it'll call the proxy's method if it want to draw) we own the nativewindow to m_newWindow. 2. whene flash call anp_acquireNativeWindow,we call medialayer's acquireNativeWindowForVideo Medialayer call MediaTexture's requestNativeWindowForVideo,and return the window. 3. so flash will use the nativewindow(surfacetextureclient) how flash be the listener MediaListener,it's will call it's callback function in it's onFrameAvailable. 1.0flash call anp_setFramerateCallback,set the layer's listener. 1.1MediaLayer will set the listener to MediaTexture 1.2MediaTexture will set listener to the wrapper's MediaListener. 2. wrapper's listener is created with nativeWindow","surfaceTexture" so it'll call it's callback when it's onFrameAvailable is called. and it is set as surfaceTexture's FrameAvailableListener. how will wrapper's native window's change will be notified to wrapper's medialistener. because medialistener was created with wrapper's native window. how frame available will be passed from SurfaceTextureClient to Server 1.SurfaceTexture watch surface,and OPENGL etc watch SurfaceTexture SurfaceTexture'queueBuffer->listener's onFrameAvailable so it will call flash's onFrameAvailable. 2. flash get onFrameAvailable and call MediaLayer's drawGL (it will call MediaTexture's draw) process 1.flash fill the anative window,(that's the wrapper's nativewindow) 2.wrapper's mediaListener's onFrameAvailable will be called. 3.flash's FramerateCallbackProc will receive the message 4.flash will call mediaLayer's drawLayer 5.MediaLayer's will do the draw (in MediaTexture,and with opengl) video->surfaceTexture->updateTexImage() and m_contentTexture->surfaceTexture->updateTexImage() what does video's surfacetexture and content's surfacetexture do with webview? and how will the frame be drawn in the webview?? 1.MediaListen was also created with webview. so it will call webview's postInvalidate? in onFrameAvailable (ahead of calling flash's FramerateCallbackProc). (but still has nothing to do with webview) when could be waiting 1.MediaLayer.acquireNativeWindowForVideo->MediaTexturer.equestNativeWindowForVideo()

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读