Package tvi.webrtc

Class FileVideoCapturer

    • Constructor Summary

      Constructors 
      Constructor Description
      FileVideoCapturer​(java.lang.String inputFile)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void changeCaptureFormat​(int width, int height, int framerate)  
      void dispose()
      Perform any final cleanup here.
      void initialize​(SurfaceTextureHelper surfaceTextureHelper, android.content.Context applicationContext, CapturerObserver capturerObserver)
      This function is used to initialize the camera thread, the android application context, and the capture observer.
      boolean isScreencast()  
      void startCapture​(int width, int height, int framerate)
      Start capturing frames in a format that is as close as possible to width x height and framerate.
      void stopCapture()
      Stop capturing.
      void tick()  
      • Methods inherited from class java.lang.Object

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

      • FileVideoCapturer

        public FileVideoCapturer​(java.lang.String inputFile)
                          throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • tick

        public void tick()
      • initialize

        public void initialize​(SurfaceTextureHelper surfaceTextureHelper,
                               android.content.Context applicationContext,
                               CapturerObserver capturerObserver)
        Description copied from interface: VideoCapturer
        This function is used to initialize the camera thread, the android application context, and the capture observer. It will be called only once and before any startCapture() request. The camera thread is guaranteed to be valid until dispose() is called. If the VideoCapturer wants to deliver texture frames, it should do this by rendering on the SurfaceTexture in surfaceTextureHelper, register itself as a listener, and forward the frames to CapturerObserver.onFrameCaptured(). The caller still has ownership of surfaceTextureHelper and is responsible for making sure surfaceTextureHelper.dispose() is called. This also means that the caller can reuse the SurfaceTextureHelper to initialize a new VideoCapturer once the previous VideoCapturer has been disposed.
        Specified by:
        initialize in interface VideoCapturer
      • startCapture

        public void startCapture​(int width,
                                 int height,
                                 int framerate)
        Description copied from interface: VideoCapturer
        Start capturing frames in a format that is as close as possible to width x height and framerate.
        Specified by:
        startCapture in interface VideoCapturer
      • stopCapture

        public void stopCapture()
                         throws java.lang.InterruptedException
        Description copied from interface: VideoCapturer
        Stop capturing. This function should block until capture is actually stopped.
        Specified by:
        stopCapture in interface VideoCapturer
        Throws:
        java.lang.InterruptedException
      • changeCaptureFormat

        public void changeCaptureFormat​(int width,
                                        int height,
                                        int framerate)
        Specified by:
        changeCaptureFormat in interface VideoCapturer
      • dispose

        public void dispose()
        Description copied from interface: VideoCapturer
        Perform any final cleanup here. No more capturing will be done after this call.
        Specified by:
        dispose in interface VideoCapturer
      • isScreencast

        public boolean isScreencast()
        Specified by:
        isScreencast in interface VideoCapturer
        Returns:
        true if-and-only-if this is a screen capturer.