Package 

Class SnapshotVideoRecorder

    • Method Summary

      Modifier and Type Method Description
      void onRendererTextureCreated(int textureId) Called on the renderer thread, hopefully only once, to notify thatthe texture was created (or to inform a new callback of the old texture).
      void onRendererFilterChanged(@NonNull() Filter filter) Called when the renderer filter changes.
      void onRendererFrame(@NonNull() SurfaceTexture surfaceTexture, int rotation, float scaleX, float scaleY) Called on the renderer thread after each frame was drawn.You are not supposed to hold for too long onto this thread, becausewell, it is the rendering thread.
      void onEncodingStart() Called when encoding started.
      void onEncodingStop() Called when encoding stopped.
      void onEncodingEnd(int stopReason, @Nullable() Exception e) Called when encoding ended for some reason.If there's an exception, it failed.
      • Methods inherited from class com.otaliastudios.cameraview.video.VideoRecorder

        isRecording, start, stop
      • Methods inherited from class com.otaliastudios.cameraview.preview.RendererFrameCallback

        onRendererFrame
      • Methods inherited from class com.otaliastudios.cameraview.video.encoding.MediaEncoderEngine.Listener

        onEncodingEnd
      • Methods inherited from class java.lang.Object

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

      • onRendererTextureCreated

         void onRendererTextureCreated(int textureId)

        Called on the renderer thread, hopefully only once, to notify thatthe texture was created (or to inform a new callback of the old texture).

        Parameters:
        textureId - the GL texture linked to the image stream
      • onRendererFrame

         void onRendererFrame(@NonNull() SurfaceTexture surfaceTexture, int rotation, float scaleX, float scaleY)

        Called on the renderer thread after each frame was drawn.You are not supposed to hold for too long onto this thread, becausewell, it is the rendering thread.

        Parameters:
        surfaceTexture - the texture to get transformation
        rotation - the rotation (to reach REF_VIEW)
        scaleX - the scaleX (in REF_VIEW) value
        scaleY - the scaleY (in REF_VIEW) value
      • onEncodingStop

         void onEncodingStop()

        Called when encoding stopped. At this point the muxer or the encoders might still beprocessing data, but we have stopped receiving input (recording video and audio frames).Actually, we will stop very soon.The onEncodingEnd callback will soon be calledwith the results.

      • onEncodingEnd

         void onEncodingEnd(int stopReason, @Nullable() Exception e)

        Called when encoding ended for some reason.If there's an exception, it failed.

        Parameters:
        e - the error, if present