TextureBufferImpl

tee3.webrtc

## 类 TextureBufferImpl

- java.lang.Object
- - tee3.webrtc.TextureBufferImpl

- 所有已实现的接口:
    RefCounted, VideoFrame.Buffer, VideoFrame.TextureBuffer

      public class TextureBufferImpl
      extends java.lang.Object
      implements VideoFrame.TextureBuffer

  Android texture buffer that glues together the necessary information together with a generic release callback. ToI420() is implemented by providing a Handler and a YuvConverter.

- - ### 嵌套类概要

    - ### 从接口继承的嵌套类/接口 tee3.webrtc.VideoFrame.TextureBuffer

      `VideoFrame.TextureBuffer.Type`

  - ### 构造器概要

    构造器
    构造器和说明
    `TextureBufferImpl(int width, int height, VideoFrame.TextureBuffer.Type type, int id, android.graphics.Matrix transformMatrix, android.os.Handler toI420Handler, YuvConverter yuvConverter, java.lang.Runnable releaseCallback)`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `VideoFrame.Buffer` | `cropAndScale(int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight)` Crops a region defined by |cropx|, |cropY|, |cropWidth| and |cropHeight|.
    `int` | `getHeight()`
    `int` | `getTextureId()`
    `android.graphics.Matrix` | `getTransformMatrix()` Retrieve the transform matrix associated with the frame.
    `VideoFrame.TextureBuffer.Type` | `getType()`
    `int` | `getWidth()` Resolution of the buffer in pixels.
    `int` | `refCount()`
    `void` | `release()` Decreases ref count by one.
    `void` | `retain()` Increases ref count by one.
    `VideoFrame.I420Buffer` | `toI420()` Returns a memory-backed frame in I420 format.

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### TextureBufferImpl

          public TextureBufferImpl(int width,
                                   int height,
                                   VideoFrame.TextureBuffer.Type type,
                                   int id,
                                   android.graphics.Matrix transformMatrix,
                                   android.os.Handler toI420Handler,
                                   YuvConverter yuvConverter,
                                   @Nullable
                                   java.lang.Runnable releaseCallback)

  - ### 方法详细资料

    - #### getType

          public VideoFrame.TextureBuffer.Type getType()

      指定者:
        `getType` 在接口中 `VideoFrame.TextureBuffer`

    - #### getTextureId

          public int getTextureId()

      指定者:
        `getTextureId` 在接口中 `VideoFrame.TextureBuffer`

    - #### getTransformMatrix

          public android.graphics.Matrix getTransformMatrix()

      从接口复制的说明: `VideoFrame.TextureBuffer`
      Retrieve the transform matrix associated with the frame. This transform matrix maps 2D homogeneous coordinates of the form (s, t, 1) with s and t in the inclusive range [0, 1] to the coordinate that should be used to sample that location from the buffer.
      指定者:
        `getTransformMatrix` 在接口中 `VideoFrame.TextureBuffer`

    - #### getWidth

          public int getWidth()

      从接口复制的说明: `VideoFrame.Buffer`
      Resolution of the buffer in pixels.
      指定者:
        `getWidth` 在接口中 `VideoFrame.Buffer`

    - #### getHeight

          public int getHeight()

      指定者:
        `getHeight` 在接口中 `VideoFrame.Buffer`

    - #### toI420

          public VideoFrame.I420Buffer toI420()

      从接口复制的说明: `VideoFrame.Buffer`
      Returns a memory-backed frame in I420 format. If the pixel data is in another format, a conversion will take place. All implementations must provide a fallback to I420 for compatibility with e.g. the internal WebRTC software encoders.
      指定者:
        `toI420` 在接口中 `VideoFrame.Buffer`

    - #### retain

          public void retain()

      从接口复制的说明: `RefCounted`
      Increases ref count by one.
      指定者:
        `retain` 在接口中 `RefCounted`
      指定者:
        `retain` 在接口中 `VideoFrame.Buffer`

    - #### release

          public void release()

      从接口复制的说明: `RefCounted`
      Decreases ref count by one. When the ref count reaches zero, resources related to the object will be freed.
      指定者:
        `release` 在接口中 `RefCounted`
      指定者:
        `release` 在接口中 `VideoFrame.Buffer`

    - #### refCount

          public int refCount()

    - #### cropAndScale

          public VideoFrame.Buffer cropAndScale(int cropX,
                                                int cropY,
                                                int cropWidth,
                                                int cropHeight,
                                                int scaleWidth,
                                                int scaleHeight)

      从接口复制的说明: `VideoFrame.Buffer`
      Crops a region defined by |cropx|, |cropY|, |cropWidth| and |cropHeight|. Scales it to size |scaleWidth| x |scaleHeight|.
      指定者:
        `cropAndScale` 在接口中 `VideoFrame.Buffer`