AmrExtractor implements Extractor { @Override public boolean sniff(ExtractorInput input) throws IOException, InterruptedException { return readAmrHeader(input); } AmrExtractor();  AmrExtractor(@Flags int flags); @Override boolean sniff(ExtractorInput input); @Override void init(ExtractorOutput extractorOutput); @Override int read(ExtractorInput input, PositionHolder seekPosition); @Override void seek(long position, long timeUs); @Override void release(); static final ExtractorsFactory FACTORY; static final int FLAG_ENABLE_CONSTANT_BITRATE_SEEKING; }
@Test public void testSniff_nonAmrSignature_returnFalse() throws IOException, InterruptedException { AmrExtractor amrExtractor = setupAmrExtractorWithOutput(); FakeExtractorInput input = fakeExtractorInputWithData(Util.getUtf8Bytes("0#!AMR\n123")); boolean result = amrExtractor.sniff(input); assertThat(result).isFalse(); }