Misc cleanup.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122506577
This commit is contained in:
olly 2016-05-17 02:52:01 -07:00 committed by Oliver Woodman
parent a43144decf
commit 9e65693e91
7 changed files with 7 additions and 12 deletions

View File

@ -42,7 +42,6 @@ public final class OpusReaderTest extends InstrumentationTestCase {
private static final String TEST_FILE = "asset:///ogg/bear.opus";
private OggExtractor extractor;
private OpusReader opusReader;
private FakeExtractorOutput extractorOutput;
private DefaultExtractorInput extractorInput;
@ -61,8 +60,6 @@ public final class OpusReaderTest extends InstrumentationTestCase {
assertTrue(extractor.sniff(extractorInput));
extractorInput.resetPeekPosition();
opusReader = (OpusReader) extractor.getStreamReader();
extractorOutput = new FakeExtractorOutput();
extractor.init(extractorOutput);
}

View File

@ -34,7 +34,7 @@ import com.google.android.exoplayer.testutil.TestUtil;
0x4F, 0x67, 0x67, 0x53, // Oggs.
0x00, // Stream revision.
headerType,
(int) (granule >> 0) & 0xFF,
(int) (granule) & 0xFF,
(int) (granule >> 8) & 0xFF,
(int) (granule >> 16) & 0xFF,
(int) (granule >> 24) & 0xFF,
@ -46,7 +46,7 @@ import com.google.android.exoplayer.testutil.TestUtil;
0x10,
0x00,
0x00, // MSB of data serial number.
(pageSequenceCounter >> 0) & 0xFF,
(pageSequenceCounter) & 0xFF,
(pageSequenceCounter >> 8) & 0xFF,
(pageSequenceCounter >> 16) & 0xFF,
(pageSequenceCounter >> 24) & 0xFF,

View File

@ -58,7 +58,7 @@ import java.util.regex.Pattern;
public class MediaPresentationDescriptionParser extends DefaultHandler
implements UriLoadable.Parser<MediaPresentationDescription> {
private static final String TAG = "MediaPresentationDescriptionParser";
private static final String TAG = "MpdParser";
private static final Pattern FRAME_RATE_PATTERN = Pattern.compile("(\\d+)(?:/(\\d+))?");

View File

@ -324,7 +324,7 @@ public final class FragmentedMp4Extractor implements Extractor {
LeafAtom child = moovLeafChildren.get(i);
if (child.type == Atom.TYPE_pssh) {
if (schemeDatas == null) {
schemeDatas = new ArrayList<SchemeData>();
schemeDatas = new ArrayList<>();
}
byte[] psshData = child.data.data;
UUID uuid = PsshAtomUtil.parseUuid(psshData);

View File

@ -54,11 +54,9 @@ public class OggExtractor implements Extractor {
}
return true;
} catch (ParserException e) {
// does not happen
} finally {
}
return false;
}
}
@Override
public void init(ExtractorOutput output) {

View File

@ -31,6 +31,6 @@ public interface SubtitleParser extends
*
* @param positionUs The current playback position in microseconds.
*/
public void setPositionUs(long positionUs);
void setPositionUs(long positionUs);
}

View File

@ -50,7 +50,7 @@ public final class Eia608Subtitle implements Subtitle {
@Override
public List<Cue> getCues(long timeUs) {
if (caption == null || caption.isEmpty()) {
return Collections.<Cue>emptyList();
return Collections.emptyList();
} else {
return Collections.singletonList(new Cue(caption));
}