com.google.android.exoplayer2.extractor.ts.PsExtractor Java Examples

The following examples show how to use com.google.android.exoplayer2.extractor.ts.PsExtractor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultExtractorsFactory.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
@Override
public synchronized Extractor[] createExtractors() {
  Extractor[] extractors = new Extractor[FLAC_EXTRACTOR_CONSTRUCTOR == null ? 12 : 13];
  extractors[0] = new MatroskaExtractor(matroskaFlags);
  extractors[1] = new FragmentedMp4Extractor(fragmentedMp4Flags);
  extractors[2] = new Mp4Extractor(mp4Flags);
  extractors[3] = new Mp3Extractor(mp3Flags);
  extractors[4] = new AdtsExtractor();
  extractors[5] = new Ac3Extractor();
  extractors[6] = new TsExtractor(tsMode, tsFlags);
  extractors[7] = new FlvExtractor();
  extractors[8] = new OggExtractor();
  extractors[9] = new PsExtractor();
  extractors[10] = new WavExtractor();
  extractors[11] = new AmrExtractor();
  if (FLAC_EXTRACTOR_CONSTRUCTOR != null) {
    try {
      extractors[12] = FLAC_EXTRACTOR_CONSTRUCTOR.newInstance();
    } catch (Exception e) {
      // Should never happen.
      throw new IllegalStateException("Unexpected error creating FLAC extractor", e);
    }
  }
  return extractors;
}
 
Example #2
Source File: DefaultExtractorsFactory.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
@Override
public synchronized Extractor[] createExtractors() {
  Extractor[] extractors = new Extractor[FLAC_EXTRACTOR_CONSTRUCTOR == null ? 12 : 13];
  extractors[0] = new MatroskaExtractor(matroskaFlags);
  extractors[1] = new FragmentedMp4Extractor(fragmentedMp4Flags);
  extractors[2] = new Mp4Extractor(mp4Flags);
  extractors[3] = new Mp3Extractor(mp3Flags);
  extractors[4] = new AdtsExtractor();
  extractors[5] = new Ac3Extractor();
  extractors[6] = new TsExtractor(tsMode, tsFlags);
  extractors[7] = new FlvExtractor();
  extractors[8] = new OggExtractor();
  extractors[9] = new PsExtractor();
  extractors[10] = new WavExtractor();
  extractors[11] = new AmrExtractor();
  if (FLAC_EXTRACTOR_CONSTRUCTOR != null) {
    try {
      extractors[12] = FLAC_EXTRACTOR_CONSTRUCTOR.newInstance();
    } catch (Exception e) {
      // Should never happen.
      throw new IllegalStateException("Unexpected error creating FLAC extractor", e);
    }
  }
  return extractors;
}
 
Example #3
Source File: DefaultExtractorsFactory.java    From MediaSDK with Apache License 2.0 4 votes vote down vote up
@Override
public synchronized Extractor[] createExtractors() {
  Extractor[] extractors = new Extractor[FLAC_EXTRACTOR_CONSTRUCTOR == null ? 13 : 14];
  extractors[0] = new MatroskaExtractor(matroskaFlags);
  extractors[1] = new FragmentedMp4Extractor(fragmentedMp4Flags);
  extractors[2] = new Mp4Extractor(mp4Flags);
  extractors[3] =
      new Mp3Extractor(
          mp3Flags
              | (constantBitrateSeekingEnabled
                  ? Mp3Extractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING
                  : 0));
  extractors[4] =
      new AdtsExtractor(
          adtsFlags
              | (constantBitrateSeekingEnabled
                  ? AdtsExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING
                  : 0));
  extractors[5] = new Ac3Extractor();
  extractors[6] = new TsExtractor(tsMode, tsFlags);
  extractors[7] = new FlvExtractor();
  extractors[8] = new OggExtractor();
  extractors[9] = new PsExtractor();
  extractors[10] = new WavExtractor();
  extractors[11] =
      new AmrExtractor(
          amrFlags
              | (constantBitrateSeekingEnabled
                  ? AmrExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING
                  : 0));
  extractors[12] = new Ac4Extractor();
  if (FLAC_EXTRACTOR_CONSTRUCTOR != null) {
    try {
      extractors[13] = FLAC_EXTRACTOR_CONSTRUCTOR.newInstance();
    } catch (Exception e) {
      // Should never happen.
      throw new IllegalStateException("Unexpected error creating FLAC extractor", e);
    }
  }
  return extractors;
}
 
Example #4
Source File: DefaultExtractorsFactory.java    From Telegram-FOSS with GNU General Public License v2.0 4 votes vote down vote up
@Override
public synchronized Extractor[] createExtractors() {
  Extractor[] extractors = new Extractor[FLAC_EXTRACTOR_CONSTRUCTOR == null ? 13 : 14];
  extractors[0] = new MatroskaExtractor(matroskaFlags);
  extractors[1] = new FragmentedMp4Extractor(fragmentedMp4Flags);
  extractors[2] = new Mp4Extractor(mp4Flags);
  extractors[3] = new OggExtractor();
  extractors[4] =
      new Mp3Extractor(
          mp3Flags
              | (constantBitrateSeekingEnabled
                  ? Mp3Extractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING
                  : 0));
  extractors[5] =
      new AdtsExtractor(
          /* firstStreamSampleTimestampUs= */ 0,
          adtsFlags
              | (constantBitrateSeekingEnabled
                  ? AdtsExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING
                  : 0));
  extractors[6] = new Ac3Extractor();
  extractors[7] = new TsExtractor(tsMode, tsFlags);
  extractors[8] = new FlvExtractor();
  extractors[9] = new PsExtractor();
  extractors[10] = new WavExtractor();
  extractors[11] =
      new AmrExtractor(
          amrFlags
              | (constantBitrateSeekingEnabled
                  ? AmrExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING
                  : 0));
  extractors[12] = new Ac4Extractor();
  if (FLAC_EXTRACTOR_CONSTRUCTOR != null) {
    try {
      extractors[13] = FLAC_EXTRACTOR_CONSTRUCTOR.newInstance();
    } catch (Exception e) {
      // Should never happen.
      throw new IllegalStateException("Unexpected error creating FLAC extractor", e);
    }
  }
  return extractors;
}
 
Example #5
Source File: DefaultExtractorsFactory.java    From Telegram with GNU General Public License v2.0 4 votes vote down vote up
@Override
public synchronized Extractor[] createExtractors() {
  Extractor[] extractors = new Extractor[FLAC_EXTRACTOR_CONSTRUCTOR == null ? 13 : 14];
  extractors[0] = new MatroskaExtractor(matroskaFlags);
  extractors[1] = new FragmentedMp4Extractor(fragmentedMp4Flags);
  extractors[2] = new Mp4Extractor(mp4Flags);
  extractors[3] = new OggExtractor();
  extractors[4] =
      new Mp3Extractor(
          mp3Flags
              | (constantBitrateSeekingEnabled
                  ? Mp3Extractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING
                  : 0));
  extractors[5] =
      new AdtsExtractor(
          /* firstStreamSampleTimestampUs= */ 0,
          adtsFlags
              | (constantBitrateSeekingEnabled
                  ? AdtsExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING
                  : 0));
  extractors[6] = new Ac3Extractor();
  extractors[7] = new TsExtractor(tsMode, tsFlags);
  extractors[8] = new FlvExtractor();
  extractors[9] = new PsExtractor();
  extractors[10] = new WavExtractor();
  extractors[11] =
      new AmrExtractor(
          amrFlags
              | (constantBitrateSeekingEnabled
                  ? AmrExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING
                  : 0));
  extractors[12] = new Ac4Extractor();
  if (FLAC_EXTRACTOR_CONSTRUCTOR != null) {
    try {
      extractors[13] = FLAC_EXTRACTOR_CONSTRUCTOR.newInstance();
    } catch (Exception e) {
      // Should never happen.
      throw new IllegalStateException("Unexpected error creating FLAC extractor", e);
    }
  }
  return extractors;
}