Interface VideoFrameProcessor

    • Method Detail

      • queueInputBitmap

        void queueInputBitmap​(Bitmap inputBitmap,
                              long durationUs,
                              float frameRate)
        Deprecated.
        Provides an input Bitmap to the VideoFrameProcessor.

        Can be called on any thread.

        Parameters:
        inputBitmap - The Bitmap queued to the VideoFrameProcessor.
        durationUs - The duration for which to display the inputBitmap, in microseconds.
        frameRate - The frame rate at which to display the inputBitmap, in frames per second.
        Throws:
        UnsupportedOperationException - If the VideoFrameProcessor does not accept bitmap input.
      • queueInputTexture

        void queueInputTexture​(int textureId,
                               long presentationTimeUs)
        Deprecated.
        Provides an input texture ID to the VideoFrameProcessor.

        It must be called after the onInputFrameProcessedListener and the frameInfo have been set.

        Can be called on any thread.

        Parameters:
        textureId - The ID of the texture queued to the VideoFrameProcessor.
        presentationTimeUs - The presentation time of the queued texture, in microseconds.
      • registerInputStream

        void registerInputStream​(@com.google.android.exoplayer2.util.VideoFrameProcessor.InputType int inputType)
        Deprecated.
        Informs the VideoFrameProcessor that a new input stream will be queued.

        Call setInputFrameInfo(com.google.android.exoplayer2.util.FrameInfo) before this method if the FrameInfo of the new input stream differs from that of the current input stream.

      • getPendingInputFrameCount

        int getPendingInputFrameCount()
        Deprecated.
        Returns the number of input frames that have been made available to the VideoFrameProcessor but have not been processed yet.

        Can be called on any thread.

      • setOutputSurfaceInfo

        void setOutputSurfaceInfo​(@Nullable
                                  SurfaceInfo outputSurfaceInfo)
        Deprecated.
        Sets the output surface and supporting information. When output frames are rendered and not dropped, they will be rendered to this output SurfaceInfo.

        The new output SurfaceInfo is applied from the next output frame rendered onwards. If the output SurfaceInfo is null, the VideoFrameProcessor will stop rendering pending frames and resume rendering once a non-null SurfaceInfo is set.

        If the dimensions given in SurfaceInfo do not match the output size after applying the final effect the frames are resized before rendering to the surface and letter/pillar-boxing is applied.

        The caller is responsible for tracking the lifecycle of the SurfaceInfo.surface including calling this method with a new surface if it is destroyed. When this method returns, the previous output surface is no longer being used and can safely be released by the caller.

      • signalEndOfInput

        void signalEndOfInput()
        Deprecated.
        Informs the VideoFrameProcessor that no further input frames should be accepted.

        Can be called on any thread.

        Throws:
        IllegalStateException - If called more than once.
      • release

        void release()
        Deprecated.
        Releases all resources.

        If the VideoFrameProcessor is released before it has ended, it will attempt to cancel processing any input frames that have already become available. Input frames that become available after release are ignored.

        This method blocks until all resources are released or releasing times out.

        Can be called on any thread.