com.google.android.exoplayer2.extractor.mkv.MatroskaExtractor Java Examples
The following examples show how to use
com.google.android.exoplayer2.extractor.mkv.MatroskaExtractor.
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 |
@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 |
@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: DashUtil.java From MediaSDK with Apache License 2.0 | 5 votes |
private static ChunkExtractorWrapper newWrappedExtractor(int trackType, Format format) { String mimeType = format.containerMimeType; boolean isWebm = mimeType != null && (mimeType.startsWith(MimeTypes.VIDEO_WEBM) || mimeType.startsWith(MimeTypes.AUDIO_WEBM)); Extractor extractor = isWebm ? new MatroskaExtractor() : new FragmentedMp4Extractor(); return new ChunkExtractorWrapper(extractor, trackType, format); }
Example #4
Source File: DashUtil.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
private static ChunkExtractorWrapper newWrappedExtractor(int trackType, Format format) { String mimeType = format.containerMimeType; boolean isWebm = mimeType != null && (mimeType.startsWith(MimeTypes.VIDEO_WEBM) || mimeType.startsWith(MimeTypes.AUDIO_WEBM)); Extractor extractor = isWebm ? new MatroskaExtractor() : new FragmentedMp4Extractor(); return new ChunkExtractorWrapper(extractor, trackType, format); }
Example #5
Source File: DashUtil.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
private static ChunkExtractorWrapper newWrappedExtractor(int trackType, Format format) { String mimeType = format.containerMimeType; boolean isWebm = mimeType != null && (mimeType.startsWith(MimeTypes.VIDEO_WEBM) || mimeType.startsWith(MimeTypes.AUDIO_WEBM)); Extractor extractor = isWebm ? new MatroskaExtractor() : new FragmentedMp4Extractor(); return new ChunkExtractorWrapper(extractor, trackType, format); }
Example #6
Source File: DashUtil.java From K-Sonic with MIT License | 5 votes |
private static ChunkExtractorWrapper newWrappedExtractor(Format format) { String mimeType = format.containerMimeType; boolean isWebm = mimeType.startsWith(MimeTypes.VIDEO_WEBM) || mimeType.startsWith(MimeTypes.AUDIO_WEBM); Extractor extractor = isWebm ? new MatroskaExtractor() : new FragmentedMp4Extractor(); return new ChunkExtractorWrapper(extractor, format); }
Example #7
Source File: DashUtil.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
private static ChunkExtractorWrapper newWrappedExtractor(int trackType, Format format) { String mimeType = format.containerMimeType; boolean isWebm = mimeType != null && (mimeType.startsWith(MimeTypes.VIDEO_WEBM) || mimeType.startsWith(MimeTypes.AUDIO_WEBM)); Extractor extractor = isWebm ? new MatroskaExtractor() : new FragmentedMp4Extractor(); return new ChunkExtractorWrapper(extractor, trackType, format); }
Example #8
Source File: DashUtil.java From Telegram with GNU General Public License v2.0 | 5 votes |
private static ChunkExtractorWrapper newWrappedExtractor(int trackType, Format format) { String mimeType = format.containerMimeType; boolean isWebm = mimeType != null && (mimeType.startsWith(MimeTypes.VIDEO_WEBM) || mimeType.startsWith(MimeTypes.AUDIO_WEBM)); Extractor extractor = isWebm ? new MatroskaExtractor() : new FragmentedMp4Extractor(); return new ChunkExtractorWrapper(extractor, trackType, format); }
Example #9
Source File: DefaultExtractorsFactory.java From MediaSDK with Apache License 2.0 | 4 votes |
@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 #10
Source File: DefaultExtractorsFactory.java From Telegram-FOSS with GNU General Public License v2.0 | 4 votes |
@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 #11
Source File: DefaultExtractorsFactory.java From Telegram with GNU General Public License v2.0 | 4 votes |
@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 #12
Source File: DefaultExtractorsFactory.java From MediaSDK with Apache License 2.0 | 2 votes |
/** * Sets flags for {@link MatroskaExtractor} instances created by the factory. * * @see MatroskaExtractor#MatroskaExtractor(int) * @param flags The flags to use. * @return The factory, for convenience. */ public synchronized DefaultExtractorsFactory setMatroskaExtractorFlags( @MatroskaExtractor.Flags int flags) { this.matroskaFlags = flags; return this; }
Example #13
Source File: DefaultExtractorsFactory.java From TelePlus-Android with GNU General Public License v2.0 | 2 votes |
/** * Sets flags for {@link MatroskaExtractor} instances created by the factory. * * @see MatroskaExtractor#MatroskaExtractor(int) * @param flags The flags to use. * @return The factory, for convenience. */ public synchronized DefaultExtractorsFactory setMatroskaExtractorFlags( @MatroskaExtractor.Flags int flags) { this.matroskaFlags = flags; return this; }
Example #14
Source File: DefaultExtractorsFactory.java From TelePlus-Android with GNU General Public License v2.0 | 2 votes |
/** * Sets flags for {@link MatroskaExtractor} instances created by the factory. * * @see MatroskaExtractor#MatroskaExtractor(int) * @param flags The flags to use. * @return The factory, for convenience. */ public synchronized DefaultExtractorsFactory setMatroskaExtractorFlags( @MatroskaExtractor.Flags int flags) { this.matroskaFlags = flags; return this; }
Example #15
Source File: DefaultExtractorsFactory.java From Telegram-FOSS with GNU General Public License v2.0 | 2 votes |
/** * Sets flags for {@link MatroskaExtractor} instances created by the factory. * * @see MatroskaExtractor#MatroskaExtractor(int) * @param flags The flags to use. * @return The factory, for convenience. */ public synchronized DefaultExtractorsFactory setMatroskaExtractorFlags( @MatroskaExtractor.Flags int flags) { this.matroskaFlags = flags; return this; }
Example #16
Source File: DefaultExtractorsFactory.java From Telegram with GNU General Public License v2.0 | 2 votes |
/** * Sets flags for {@link MatroskaExtractor} instances created by the factory. * * @see MatroskaExtractor#MatroskaExtractor(int) * @param flags The flags to use. * @return The factory, for convenience. */ public synchronized DefaultExtractorsFactory setMatroskaExtractorFlags( @MatroskaExtractor.Flags int flags) { this.matroskaFlags = flags; return this; }