android.view.TextureView.setSurfaceTexture()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(227)

本文整理了Java中android.view.TextureView.setSurfaceTexture()方法的一些代码示例,展示了TextureView.setSurfaceTexture()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextureView.setSurfaceTexture()方法的具体详情如下:
包路径:android.view.TextureView
类名称:TextureView
方法名:setSurfaceTexture

TextureView.setSurfaceTexture介绍

暂无

代码示例

代码示例来源:origin: tcking/GiraffePlayer2

@Override
public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
  log("onSurfaceTextureAvailable");
  if (this.surface == null) {
    handler.obtainMessage(MSG_SET_DISPLAY, surface).sendToTarget();
    this.surface = surface;
  } else {
    textureView.setSurfaceTexture(this.surface);
  }
}

代码示例来源:origin: stackoverflow.com

mDisplay = (TextureView) rootView.findViewById(R.id.texture_view);
if (mTexture != null) {
  mDisplay.setSurfaceTexture(mTexture);

代码示例来源:origin: vbier/habpanelviewer

@Override
public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int i, int i1) {
  if (mSurface == null) {
    previewListener.progress(mContext.getString(R.string.surfaceObtained));
    mSurface = surfaceTexture;
    Log.d(TAG, "starting preview...");
    mImplementation.startPreview(mSurface, previewListener);
    Log.d(TAG, "starting preview finished");
  } else {
    mPreviewView.setSurfaceTexture(mSurface);
  }
}

相关文章