Interface MpegFileTrackProvider
-
- All Known Implementing Classes:
MpegFragmentedFileTrackProvider,MpegStandardFileTrackProvider
public interface MpegFileTrackProviderTrack provider for a type of MP4 file.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetDuration()booleaninitialise(MpegTrackConsumer trackConsumer)voidprovideFrames()Provide audio frames to the frame consumer until the end of the track or interruption.voidseekToTimecode(long timecode)Perform a seek to the given timecode (ms).
-
-
-
Method Detail
-
initialise
boolean initialise(MpegTrackConsumer trackConsumer)
- Parameters:
trackConsumer- Track consumer which defines the track this will provide and the consumer for packets.- Returns:
- Returns true if it had enough information for initialisation.
-
getDuration
long getDuration()
- Returns:
- Total duration of the file in milliseconds
-
provideFrames
void provideFrames() throws java.lang.InterruptedException, java.io.IOExceptionProvide audio frames to the frame consumer until the end of the track or interruption.- Throws:
java.lang.InterruptedException- When interrupted externally (or for seek/stop).java.io.IOException- When network exception is happened, currently only throw from MpegFragmentedFileTrackProvider.
-
seekToTimecode
void seekToTimecode(long timecode)
Perform a seek to the given timecode (ms). On the next call to provideFrames, the seekPerformed method of frame consumer is called with the position where it actually seeked to and the position where the seek was requested to as arguments.- Parameters:
timecode- The timecode to seek to in milliseconds
-
-