Class MpegFragmentedFileTrackProvider

    • Constructor Detail

      • MpegFragmentedFileTrackProvider

        public MpegFragmentedFileTrackProvider​(MpegReader reader,
                                               MpegSectionInfo root)
        Parameters:
        reader - MP4-specific reader
        root - Root section info (synthetic section wrapping the entire file)
    • Method Detail

      • initialise

        public boolean initialise​(MpegTrackConsumer consumer)
        Specified by:
        initialise in interface MpegFileTrackProvider
        Parameters:
        consumer - Track consumer which defines the track this will provide and the consumer for packets.
        Returns:
        Returns true if it had enough information for initialisation.
      • provideFrames

        public void provideFrames()
                           throws java.lang.InterruptedException,
                                  java.io.IOException
        Description copied from interface: MpegFileTrackProvider
        Provide audio frames to the frame consumer until the end of the track or interruption.
        Specified by:
        provideFrames in interface MpegFileTrackProvider
        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

        public void seekToTimecode​(long timecode)
        Description copied from interface: MpegFileTrackProvider
        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.
        Specified by:
        seekToTimecode in interface MpegFileTrackProvider
        Parameters:
        timecode - The timecode to seek to in milliseconds
      • parseMovieExtended

        public void parseMovieExtended​(MpegSectionInfo mvex)
                                throws java.io.IOException
        Handle mvex section.
        Parameters:
        mvex - Section header.
        Throws:
        java.io.IOException - On read error
      • parseSegmentIndex

        public void parseSegmentIndex​(MpegVersionedSectionInfo sbix)
                               throws java.io.IOException
        Handle segment index section.
        Parameters:
        sbix - Section header.
        Throws:
        java.io.IOException - On read error