Interface SampleSink

    • Method Summary

      Modifier and Type Method Description
      void acceptSample​(StreamingSample streamingSample, StreamingTrack streamingTrack)
      Adds a samples to the SampleSink.
      void close()
      Free all resources blocked and interrupts the process of writing the output.
    • Method Detail

      • close

        void close()
            throws IOException
        Free all resources blocked and interrupts the process of writing the output. An implementation should flush all samples that have not yet been written and write the file footer - if exists - before actually freeing the resources.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Throws:
        IOException - if closing fails
      • acceptSample

        void acceptSample​(StreamingSample streamingSample,
                          StreamingTrack streamingTrack)
                   throws IOException
        Adds a samples to the SampleSink. This might or might not cause writing the sample any output stream or channel. Once this method is called the StreamingTrack must be ready and accept calls to any method.
        Throws:
        IOException - if writing (or reading) fails.