Class ViewOutput

All Implemented Interfaces:
IOutput, Closeable, AutoCloseable
Direct Known Subclasses:
SurfaceOutput, TextureOutput

public abstract class ViewOutput extends VerifyCloseable implements IOutput
Displaying the result of work Player on the view
  • Constructor Details

    • ViewOutput

      protected ViewOutput(String tag)
  • Method Details

    • setContentMode

      public void setContentMode(ContentMode contentMode)
      By default the content mode is set to ASPECT_FILL
      Parameters:
      contentMode - rendering logic when the size of the surface and size of the frame are different
      See Also:
    • present

      public void present(IRenderTargetPresentable renderTarget)
      Presenting the processed frame to the surface
      Specified by:
      present in interface IOutput
      Parameters:
      renderTarget - provided by the Player
    • isSurfaceAvailable

      protected abstract boolean isSurfaceAvailable()
      Check if surface is available
      Returns:
      true if surface holds a physical surface
    • createWindowSurface

      protected abstract WindowSurface createWindowSurface(EglCore eglCore)
      Сreates and configures a unique WindowSurface
      Parameters:
      eglCore - EGL state
      Returns:
      a new instance of the WindowSurface
    • destroyWindowSurface

      protected abstract void destroyWindowSurface(WindowSurface windowSurface)
      Destroys the given WindowSurface
      Parameters:
      windowSurface - surface to be destroyed
    • getSurfaceFrame

      protected abstract android.graphics.Rect getSurfaceFrame()
      Retrieve the current size of the surface
      Returns:
      Rect the surface's dimensions
    • destroy

      protected void destroy()
      Destroy the WindowSurface and remove callback
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class VerifyCloseable