Java Code Examples for com.google.android.exoplayer2.extractor.Extractor#sniff()
The following examples show how to use
com.google.android.exoplayer2.extractor.Extractor#sniff() .
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: DefaultHlsExtractorFactory.java From MediaSDK with Apache License 2.0 | 5 votes |
private static boolean sniffQuietly(Extractor extractor, ExtractorInput input) throws InterruptedException, IOException { boolean result = false; try { result = extractor.sniff(input); } catch (EOFException e) { // Do nothing. } finally { input.resetPeekPosition(); } return result; }
Example 2
Source File: TestUtil.java From ExoPlayer-Offline with Apache License 2.0 | 5 votes |
public static boolean sniffTestData(Extractor extractor, FakeExtractorInput input) throws IOException, InterruptedException { while (true) { try { return extractor.sniff(input); } catch (SimulatedIOException e) { // Ignore. } } }
Example 3
Source File: DefaultHlsExtractorFactory.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
private static boolean sniffQuietly(Extractor extractor, ExtractorInput input) throws InterruptedException, IOException { boolean result = false; try { result = extractor.sniff(input); } catch (EOFException e) { // Do nothing. } finally { input.resetPeekPosition(); } return result; }
Example 4
Source File: DefaultHlsExtractorFactory.java From Telegram with GNU General Public License v2.0 | 5 votes |
private static boolean sniffQuietly(Extractor extractor, ExtractorInput input) throws InterruptedException, IOException { boolean result = false; try { result = extractor.sniff(input); } catch (EOFException e) { // Do nothing. } finally { input.resetPeekPosition(); } return result; }