Klasse XuggleVideoDriver

java.lang.Object
sidplay.audio.xuggle.XuggleBase
sidplay.audio.xuggle.XuggleVideoDriver
Alle implementierten Schnittstellen:
Consumer<VIC>, AudioDriver, VideoDriver
Bekannte direkte Unterklassen:
AVIDriver, FLVDriver, MP4Driver

public abstract class XuggleVideoDriver extends XuggleBase implements AudioDriver, VideoDriver
Create video.
 Video possibilities (file, RTMP and HLS):
 /home/ken/.jsidplay2/jsidplay2.flv
 rtmp://localhost/live/test
 http://localhost:90/hls/test.m3u8      (provided by NGINX RTMP as HLS)
 
The Kush Gauge: To find a decent bitrate simply multiply the target pixel count by the frame rate; then multiply the result by a factor of 1, 2 or 4, depending on the amount of motion in the video; and then multiply that result by 0.07 to get the bit rate in bps.
 Video Coder Bit Rate:
 PAL low motion:                192 * 312 * 50,1246 * 1 * 0,07  =   210.186
 PAL high motion:               192 * 312 * 50,1246 * 4 * 0,07  =   840.746
 NTSC low motion:               192 * 312 * 59,83 * 1 * 0,07    =   250.884
 NTSC high motion:      192 * 312 * 59,83 * 4 * 0,07    = 1.003.536
 
Autor:
ken
  • Felddetails

    • STATUS_TEXT_Y

      private static final int STATUS_TEXT_Y
      Siehe auch:
    • context

      private EventScheduler context
    • container

      private com.xuggle.xuggler.IContainer container
    • videoCoder

      private com.xuggle.xuggler.IStreamCoder videoCoder
    • audioCoder

      private com.xuggle.xuggler.IStreamCoder audioCoder
    • converter

      private com.xuggle.xuggler.video.IConverter converter
    • vicImage

      private BufferedImage vicImage
    • pictureBuffer

      private IntBuffer pictureBuffer
    • statusTextPixels

      private int[] statusTextPixels
    • statusTextOffset

      private int statusTextOffset
    • statusTextX

      private int statusTextX
    • statusTextOverflow

      private int statusTextOverflow
    • frameNo

      private long frameNo
    • framesPerKeyFrames

      private long framesPerKeyFrames
    • firstAudioTimeStamp

      private long firstAudioTimeStamp
    • firstVideoTimeStamp

      private long firstVideoTimeStamp
    • ticksPerMicrosecond

      private double ticksPerMicrosecond
    • audioDelayInMs

      private int audioDelayInMs
    • sampleBuffer

      private ByteBuffer sampleBuffer
  • Konstruktordetails

    • XuggleVideoDriver

      public XuggleVideoDriver()
  • Methodendetails

    • open

      public void open(IAudioSection audioSection, String recordingFilename, CPUClock cpuClock, EventScheduler context) throws IOException, LineUnavailableException, InterruptedException
      Beschreibung aus Schnittstelle kopiert: AudioDriver
      Open audio interface.
      Angegeben von:
      open in Schnittstelle AudioDriver
      Parameter:
      audioSection - audio configuration
      recordingFilename - name for a recording
      cpuClock - CPU clock
      context - event context
      Löst aus:
      IOException
      LineUnavailableException
      InterruptedException
    • write

      public void write() throws InterruptedException
      Beschreibung aus Schnittstelle kopiert: AudioDriver
      Write the complete contents of ByteBuffer to audio device.
      Angegeben von:
      write in Schnittstelle AudioDriver
      Löst aus:
      InterruptedException
    • accept

      public void accept(VIC vic)
      Beschreibung aus Schnittstelle kopiert: VideoDriver
      Propagates VIC pixel data for video drivers.
      Pixels can be accessed using vic.getPALEmulation().getPixels() Note: Pixel format is ARGB and is updated frequently at a rate of screen refresh rate. CPUClock.getScreenRefresh()
      Angegeben von:
      accept in Schnittstelle Consumer<VIC>
      Angegeben von:
      accept in Schnittstelle VideoDriver
    • close

      public void close()
      Beschreibung aus Schnittstelle kopiert: AudioDriver
      Free the audio device. (Counterpart of open().)
      Angegeben von:
      close in Schnittstelle AudioDriver
    • buffer

      public ByteBuffer buffer()
      Beschreibung aus Schnittstelle kopiert: AudioDriver
      Return the bytebuffer intended to hold the audio data. The audio data is in interleaved format and has as many channels as given by the result of open(). Use putShort() to write 16-bit values. Don't call write() until you have filled the entire buffer with audio.
      Angegeben von:
      buffer in Schnittstelle AudioDriver
      Gibt zurück:
      The buffer to write audio to.
    • isRecording

      public boolean isRecording()
      Angegeben von:
      isRecording in Schnittstelle AudioDriver
      Gibt zurück:
      is this audio driver recording tunes?
    • setStatusText

      public void setStatusText(String text)
    • getStatusTextOverflow

      public int getStatusTextOverflow()
    • getStatusTextX

      public int getStatusTextX()
    • setStatusTextX

      public void setStatusTextX(int statusTextX)
    • createVideoCoder

      private com.xuggle.xuggler.IStreamCoder createVideoCoder(IAudioSection audioSection, CPUClock cpuClock)
    • configurePreset

      private void configurePreset(com.xuggle.xuggler.IConfigurable configurable, String presetName)
    • createAudioCoder

      private com.xuggle.xuggler.IStreamCoder createAudioCoder(IAudioSection audioSection, AudioConfig cfg)
    • getAudioTimeStamp

      private long getAudioTimeStamp()
    • getVideoTimeStamp

      private long getVideoTimeStamp()
    • getOutputFormatName

      protected abstract String getOutputFormatName()
    • getSupportedSamplingRates

      protected abstract List<SamplingRate> getSupportedSamplingRates()
    • getDefaultSamplingRate

      protected abstract SamplingRate getDefaultSamplingRate()
    • getVideoCodec

      protected abstract com.xuggle.xuggler.ICodec.ID getVideoCodec()
    • getAudioCodec

      protected abstract com.xuggle.xuggler.ICodec.ID getAudioCodec()
    • getUrl

      protected abstract String getUrl(IAudioSection audioSection, String recordingFilename)