Class JCodecRecorder

  • All Implemented Interfaces:
    nl.elec332.util.implementationmanager.api.IExtensionImplementation, IRecorder<org.jcodec.common.model.Picture>

    public class JCodecRecorder
    extends java.lang.Object
    implements IRecorder<org.jcodec.common.model.Picture>
    Created by Elec332 on 13-4-2020
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int height  
      protected java.util.concurrent.locks.ReentrantLock lock  
      protected org.jcodec.api.SequenceEncoder recorder  
      protected org.jcodec.common.io.SeekableByteChannel recOut  
      protected int width  
    • Constructor Summary

      Constructors 
      Constructor Description
      JCodecRecorder()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.function.Supplier<org.jcodec.common.model.Picture> convertFrame​(java.awt.image.BufferedImage image)  
      void encodeFrame​(org.jcodec.common.model.Picture frame)  
      static void fromBufferedImage​(java.awt.image.BufferedImage src, org.jcodec.common.model.Picture dst)  
      static org.jcodec.common.model.Picture fromBufferedImageRGB​(java.awt.image.BufferedImage src)  
      nl.elec332.util.implementationmanager.api.ImplementationType getImplementationType()  
      boolean isRecording()  
      void startRecorder​(int fps, int width, int height, java.io.File file)  
      void stopRecorder()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface nl.elec332.util.implementationmanager.api.IExtensionImplementation

        getImplementationSpeed
    • Field Detail

      • lock

        protected final java.util.concurrent.locks.ReentrantLock lock
      • recOut

        protected org.jcodec.common.io.SeekableByteChannel recOut
      • recorder

        protected org.jcodec.api.SequenceEncoder recorder
      • width

        protected int width
      • height

        protected int height
    • Constructor Detail

      • JCodecRecorder

        public JCodecRecorder()
    • Method Detail

      • getImplementationType

        public nl.elec332.util.implementationmanager.api.ImplementationType getImplementationType()
        Specified by:
        getImplementationType in interface nl.elec332.util.implementationmanager.api.IExtensionImplementation
        Specified by:
        getImplementationType in interface IRecorder<org.jcodec.common.model.Picture>
      • startRecorder

        public void startRecorder​(int fps,
                                  int width,
                                  int height,
                                  java.io.File file)
        Specified by:
        startRecorder in interface IRecorder<org.jcodec.common.model.Picture>
      • stopRecorder

        public void stopRecorder()
        Specified by:
        stopRecorder in interface IRecorder<org.jcodec.common.model.Picture>
      • encodeFrame

        public void encodeFrame​(org.jcodec.common.model.Picture frame)
        Specified by:
        encodeFrame in interface IRecorder<org.jcodec.common.model.Picture>
      • isRecording

        public boolean isRecording()
        Specified by:
        isRecording in interface IRecorder<org.jcodec.common.model.Picture>
      • convertFrame

        public java.util.function.Supplier<org.jcodec.common.model.Picture> convertFrame​(java.awt.image.BufferedImage image)
        Specified by:
        convertFrame in interface IRecorder<org.jcodec.common.model.Picture>
      • fromBufferedImageRGB

        public static org.jcodec.common.model.Picture fromBufferedImageRGB​(java.awt.image.BufferedImage src)
      • fromBufferedImage

        public static void fromBufferedImage​(java.awt.image.BufferedImage src,
                                             org.jcodec.common.model.Picture dst)