Package tvi.webrtc

Class VideoFileRenderer

  • All Implemented Interfaces:
    VideoSink

    public class VideoFileRenderer
    extends java.lang.Object
    implements VideoSink
    Can be used to save the video frames to file.
    • Constructor Summary

      Constructors 
      Constructor Description
      VideoFileRenderer​(java.lang.String outputFile, int outputFileWidth, int outputFileHeight, EglBase.Context sharedContext)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onFrame​(VideoFrame frame)
      Implementations should call frame.retain() if they need to hold a reference to the frame after this function returns.
      void release()
      Release all resources.
      • Methods inherited from class java.lang.Object

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

      • VideoFileRenderer

        public VideoFileRenderer​(java.lang.String outputFile,
                                 int outputFileWidth,
                                 int outputFileHeight,
                                 EglBase.Context sharedContext)
                          throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • onFrame

        public void onFrame​(VideoFrame frame)
        Description copied from interface: VideoSink
        Implementations should call frame.retain() if they need to hold a reference to the frame after this function returns. Each call to retain() should be followed by a call to frame.release() when the reference is no longer needed.
        Specified by:
        onFrame in interface VideoSink
      • release

        public void release()
        Release all resources. All already posted frames will be rendered first.