Package org.mp4parser.streaming.output
Interface SampleSink
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
FragmentedMp4Writer,StandardMp4Writer
public interface SampleSink extends Closeable
Controls the creation of media files.
-
-
Method Summary
Modifier and Type Method Description voidacceptSample(StreamingSample streamingSample, StreamingTrack streamingTrack)Adds a samples to the SampleSink.voidclose()Free all resources blocked and interrupts the process of writing the output.
-
-
-
Method Detail
-
close
void close() throws IOExceptionFree 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- 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 theStreamingTrackmust be ready and accept calls to any method.- Throws:
IOException- if writing (or reading) fails.
-
-