Class StreamExtractor

  • All Implemented Interfaces:
    com.google.android.exoplayer2.extractor.Extractor

    public class StreamExtractor
    extends java.lang.Object
    implements com.google.android.exoplayer2.extractor.Extractor
    The stream extractor which has to used in conjunction with NodeDataSource.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  StreamExtractor.Factory
      The factory class of this class.
      • Nested classes/interfaces inherited from interface com.google.android.exoplayer2.extractor.Extractor

        com.google.android.exoplayer2.extractor.Extractor.ReadResult
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static com.google.android.exoplayer2.extractor.ExtractorsFactory FACTORY  
      • Fields inherited from interface com.google.android.exoplayer2.extractor.Extractor

        RESULT_CONTINUE, RESULT_END_OF_INPUT, RESULT_SEEK
    • Constructor Summary

      Constructors 
      Constructor Description
      StreamExtractor()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void init​(com.google.android.exoplayer2.extractor.ExtractorOutput output)  
      int read​(com.google.android.exoplayer2.extractor.ExtractorInput input, com.google.android.exoplayer2.extractor.PositionHolder seekPosition)  
      void release()  
      void seek​(long position, long timeUs)  
      boolean sniff​(com.google.android.exoplayer2.extractor.ExtractorInput input)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • FACTORY

        public static final com.google.android.exoplayer2.extractor.ExtractorsFactory FACTORY
    • Constructor Detail

      • StreamExtractor

        public StreamExtractor()
    • Method Detail

      • sniff

        public boolean sniff​(@NonNull
                             com.google.android.exoplayer2.extractor.ExtractorInput input)
                      throws java.io.IOException
        Specified by:
        sniff in interface com.google.android.exoplayer2.extractor.Extractor
        Throws:
        java.io.IOException
      • init

        public void init​(@NonNull
                         com.google.android.exoplayer2.extractor.ExtractorOutput output)
        Specified by:
        init in interface com.google.android.exoplayer2.extractor.Extractor
      • read

        public int read​(@NonNull
                        com.google.android.exoplayer2.extractor.ExtractorInput input,
                        @NonNull
                        com.google.android.exoplayer2.extractor.PositionHolder seekPosition)
                 throws java.io.IOException
        Specified by:
        read in interface com.google.android.exoplayer2.extractor.Extractor
        Throws:
        java.io.IOException
      • seek

        public void seek​(long position,
                         long timeUs)
        Specified by:
        seek in interface com.google.android.exoplayer2.extractor.Extractor
      • release

        public void release()
        Specified by:
        release in interface com.google.android.exoplayer2.extractor.Extractor