Class JpegExtractor

  • All Implemented Interfaces:
    Extractor

    public final class JpegExtractor
    extends Object
    implements Extractor
    Extracts JPEG image using the Exif format.
    • Constructor Detail

      • JpegExtractor

        public JpegExtractor()
    • Method Detail

      • sniff

        public boolean sniff​(ExtractorInput input)
                      throws IOException
        Description copied from interface: Extractor
        Returns whether this extractor can extract samples from the ExtractorInput, which must provide data from the start of the stream.

        If true is returned, the input's reading position may have been modified. Otherwise, only its peek position may have been modified.

        Specified by:
        sniff in interface Extractor
        Parameters:
        input - The ExtractorInput from which data should be peeked/read.
        Returns:
        Whether this extractor can read the provided input.
        Throws:
        IOException - If an error occurred reading from the input.
      • seek

        public void seek​(long position,
                         long timeUs)
        Description copied from interface: Extractor
        Notifies the extractor that a seek has occurred.

        Following a call to this method, the ExtractorInput passed to the next invocation of Extractor.read(ExtractorInput, PositionHolder) is required to provide data starting from position in the stream. Valid random access positions are the start of the stream and positions that can be obtained from any SeekMap passed to the ExtractorOutput.

        Specified by:
        seek in interface Extractor
        Parameters:
        position - The byte offset in the stream from which data will be provided.
        timeUs - The seek time in microseconds.
      • release

        public void release()
        Description copied from interface: Extractor
        Releases all kept resources.
        Specified by:
        release in interface Extractor