Package io.rong.imkit.utils.videocompressor.videoslimmer.muxer

## Class CodecInputSurface

- All Implemented Interfaces:

      public class CodecInputSurface

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CodecInputSurface(Surface surface)` | Creates a CodecInputSurface from a Surface.

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `createRender()` |
    `SurfaceTexture` | `getSurfaceTexture()` |
    `void` | `changeFragmentShader(String fragmentShader)` |
    `void` | `awaitNewImage()` |
    `void` | `drawImage()` |
    `void` | `onFrameAvailable(SurfaceTexture st)` |
    `Surface` | `getSurface()` |
    `void` | `release()` | Discards all resources held by this class, notably the EGL context.
    `void` | `makeCurrent()` | Makes our EGL context and surface current.
    `boolean` | `swapBuffers()` | Calls eglSwapBuffers.
    `void` | `setPresentationTime(long nsecs)` | Sends the presentation time stamp to EGL.

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### CodecInputSurface

          CodecInputSurface(Surface surface)

      Creates a CodecInputSurface from a Surface.

  - ### Method Detail

    - #### createRender

           void createRender()

    - #### getSurfaceTexture

           SurfaceTexture getSurfaceTexture()

    - #### changeFragmentShader

           void changeFragmentShader(String fragmentShader)

    - #### awaitNewImage

           void awaitNewImage()

    - #### drawImage

           void drawImage()

    - #### onFrameAvailable

           void onFrameAvailable(SurfaceTexture st)

    - #### getSurface

           Surface getSurface()

    - #### release

           void release()

      Discards all resources held by this class, notably the EGL context. Also releases the Surface that was passed to our constructor.

    - #### makeCurrent

           void makeCurrent()

      Makes our EGL context and surface current.

    - #### swapBuffers

           boolean swapBuffers()

      Calls eglSwapBuffers. Use this to "publish" the current frame.

    - #### setPresentationTime

           void setPresentationTime(long nsecs)

      Sends the presentation time stamp to EGL. Time is expressed in nanoseconds.