Interface MediaIO

All Known Implementing Classes:
MediaInput, MediaOutput, TestCamera, TestMedia

public interface MediaIO
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    read(MemorySegment data, int size)
    Default FFM implementation of read().
    int
    read(MediaCoder coder, byte[] data)
    Request to read data.
    default long
    seek(long pos, int how)
    Default FFM implementation of seek().
    long
    seek(MediaCoder coder, long pos, int how)
    Request to seek file.
    default MemorySegment[]
    internal to FFM : implementing class must store upcall references until no longer needed.
    default int
    write(MemorySegment data, int size)
    Default FFM implementation of write().
    int
    write(MediaCoder coder, byte[] data)
    Request to write data.
  • Field Details

  • Method Details

    • read

      int read(MediaCoder coder, byte[] data)
      Request to read data.
      Parameters:
      data - = buffer to receive data
    • read

      default int read(MemorySegment data, int size)
      Default FFM implementation of read(). Do not implement.
    • write

      int write(MediaCoder coder, byte[] data)
      Request to write data.
      Parameters:
      data - = buffer of data to be written.
    • write

      default int write(MemorySegment data, int size)
      Default FFM implementation of write(). Do not implement.
    • seek

      long seek(MediaCoder coder, long pos, int how)
      Request to seek file.
      Parameters:
      pos - = position
      how - = how to seek (see MediaCoder.SEEK_... types)
    • seek

      default long seek(long pos, int how)
      Default FFM implementation of seek(). Do not implement.
    • store

      default MemorySegment[] store(MemorySegment[] array)
      internal to FFM : implementing class must store upcall references until no longer needed. See MediaInput and MediaOutput