Interface Multiplexer

All Superinterfaces:
AutoCloseable, Closeable
All Known Subinterfaces:
MovieWriter
All Known Implementing Classes:
AVIWriter, FileMultiplexer, ImageSequenceWriter, QuickTimeMultiplexer, QuickTimeWriter

public interface Multiplexer extends Closeable
A Multiplexer can write multiple media tracks into a single output stream.
Author:
Werner Randelshofer
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Adds a track.
    void
    Closes the Multiplexer.
    void
    write(int track, Buffer buf)
    Writes a sample.
  • Method Details

    • addTrack

      int addTrack(Format fmt) throws IOException
      Adds a track.
      Parameters:
      fmt - The format of the track.
      Returns:
      The track number.
      Throws:
      IOException
    • write

      void write(int track, Buffer buf) throws IOException
      Writes a sample. Does nothing if the discard-flag or the prefetch-flag in the buffer is set to true.
      Parameters:
      track - The track number.
      buf - The buffer containing the sample data.
      Throws:
      IOException - if the write fails
    • close

      void close() throws IOException
      Closes the Multiplexer.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException - if close fails