Package tvi.webrtc

Interface VideoEncoder.Callback

  • Enclosing interface:

    public static interface VideoEncoder.Callback
    • Method Detail

      • onEncodedFrame

        void onEncodedFrame​(EncodedImage frame,
                            VideoEncoder.CodecSpecificInfo info)
        Old encoders assume that the byte buffer held by |frame| is not accessed after the call to this method returns. If the pipeline downstream needs to hold on to the buffer, it then has to make its own copy. We want to move to a model where no copying is needed, and instead use retain()/release() to signal to the encoder when it is safe to reuse the buffer. Over the transition, implementations of this class should use the maybeRetain() method if they want to keep a reference to the buffer, and fall back to copying if that method returns false.