Package 

Interface IRendererHolder


  • 
    public interface IRendererHolder
    
                        

    Hold shared texture that receive camera frame and draw them to registered surface if needs

    • Method Summary

      Modifier and Type Method Description
      abstract boolean isRunning()
      abstract void release()
      abstract Surface getPrimarySurface() Get Surface that receive camera frame.
      abstract SurfaceTexture getPrimarySurfaceTexture() Get SurfaceTexture that receive camera frame.
      abstract void checkPrimarySurface() Check whether Primary Surface is valid, if invalid recreate Primary Surface
      abstract void updatePrimarySize(int width, int height) Change size of Primary Surface
      abstract void addSlaveSurface(int id, Object surface, boolean isRecordable) Add slave surface that is a mirror of primary surface
      abstract void addSlaveSurface(int id, Object surface, boolean isRecordable, int maxFps) Add slave surface that is a mirror of primary surface
      abstract void removeSlaveSurface(int id) Remove specific slave surface
      abstract void removeSlaveSurfaceAll() Remove all slave surface
      abstract void clearSlaveSurface(int id, int color) Fill specific slave Surface with specific color
      abstract void clearSlaveSurfaceAll(int color) Fill all slave Surface with specific color
      abstract boolean isSlaveSurfaceEnable(int id) Get state of slave surface
      abstract void setSlaveSurfaceEnable(int id, boolean enable) Set state of slave surface
      abstract void rotateTo(int angle)
      abstract void rotateBy(int angle)
      abstract void setMirrorMode(int mode) Set slave surface's Mirror Mode that flip image horizontally, or flip image vertically.
      abstract int getMirrorMode() Get slave surface's Mirror Mode that flip image horizontally, or flip image vertically.
      abstract void requestFrame() Update all slave surface based on master surface immediately
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getPrimarySurface

         abstract Surface getPrimarySurface()

        Get Surface that receive camera frame.

      • getPrimarySurfaceTexture

         abstract SurfaceTexture getPrimarySurfaceTexture()

        Get SurfaceTexture that receive camera frame.

      • checkPrimarySurface

         abstract void checkPrimarySurface()

        Check whether Primary Surface is valid, if invalid recreate Primary Surface

      • updatePrimarySize

         abstract void updatePrimarySize(int width, int height)

        Change size of Primary Surface

      • addSlaveSurface

         abstract void addSlaveSurface(int id, Object surface, boolean isRecordable)

        Add slave surface that is a mirror of primary surface

        Parameters:
        id - often use #hashCode.
      • addSlaveSurface

         abstract void addSlaveSurface(int id, Object surface, boolean isRecordable, int maxFps)

        Add slave surface that is a mirror of primary surface

        Parameters:
        id - often use #hashCode.
        maxFps - no limit if it is less than zero
      • removeSlaveSurface

         abstract void removeSlaveSurface(int id)

        Remove specific slave surface

      • clearSlaveSurface

         abstract void clearSlaveSurface(int id, int color)

        Fill specific slave Surface with specific color

      • clearSlaveSurfaceAll

         abstract void clearSlaveSurfaceAll(int color)

        Fill all slave Surface with specific color

      • setSlaveSurfaceEnable

         abstract void setSlaveSurfaceEnable(int id, boolean enable)

        Set state of slave surface

      • rotateTo

         abstract void rotateTo(int angle)
      • rotateBy

         abstract void rotateBy(int angle)
      • setMirrorMode

         abstract void setMirrorMode(int mode)

        Set slave surface's Mirror Mode that flip image horizontally, or flip image vertically.

        Parameters:
        mode - 0:normal, 1:flip horizontally, 2:flip vertically, 3:flip horizontal direction and vertical direction
      • getMirrorMode

         abstract int getMirrorMode()

        Get slave surface's Mirror Mode that flip image horizontally, or flip image vertically.

      • requestFrame

         abstract void requestFrame()

        Update all slave surface based on master surface immediately