本文整理汇总了Java中com.google.android.exoplayer.extractor.ExtractorOutput类的典型用法代码示例。如果您正苦于以下问题:Java ExtractorOutput类的具体用法?Java ExtractorOutput怎么用?Java ExtractorOutput使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ExtractorOutput类属于com.google.android.exoplayer.extractor包,在下文中一共展示了ExtractorOutput类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: consume
import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void consume(ParsableByteArray data, boolean payloadUnitStartIndicator,
ExtractorOutput output) {
// Skip pointer.
if (payloadUnitStartIndicator) {
int pointerField = data.readUnsignedByte();
data.skipBytes(pointerField);
}
data.readBytes(patScratch, 3);
patScratch.skipBits(12); // table_id (8), section_syntax_indicator (1), '0' (1), reserved (2)
int sectionLength = patScratch.readBits(12);
// transport_stream_id (16), reserved (2), version_number (5), current_next_indicator (1),
// section_number (8), last_section_number (8)
data.skipBytes(5);
int programCount = (sectionLength - 9) / 4;
for (int i = 0; i < programCount; i++) {
data.readBytes(patScratch, 4);
patScratch.skipBits(19); // program_number (16), reserved (3)
int pid = patScratch.readBits(13);
tsPayloadReaders.put(pid, new PmtReader());
}
// Skip CRC_32.
}
示例2: init
import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput output) {
this.output = output;
this.trackOutput = output.track(0);
output.endTracks();
try {
decoder = new FlacJni();
} catch (FlacDecoderException e) {
throw new RuntimeException(e);
}
}
示例3: consume
import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void consume(ParsableByteArray data, boolean payloadUnitStartIndicator,
ExtractorOutput output) {
// Skip pointer.
if (payloadUnitStartIndicator) {
int pointerField = data.readUnsignedByte();
data.skipBytes(pointerField);
}
data.readBytes(patScratch, 3);
patScratch.skipBits(12); // table_id (8), section_syntax_indicator (1), '0' (1), reserved (2)
int sectionLength = patScratch.readBits(12);
// transport_stream_id (16), reserved (2), version_number (5), current_next_indicator (1),
// section_number (8), last_section_number (8)
data.skipBytes(5);
int programCount = (sectionLength - 9) / 4;
for (int i = 0; i < programCount; i++) {
data.readBytes(patScratch, 4);
int programNumber = patScratch.readBits(16);
patScratch.skipBits(3); // reserved (3)
if (programNumber == 0) {
patScratch.skipBits(13); // network_PID (13)
} else {
int pid = patScratch.readBits(13);
tsPayloadReaders.put(pid, new PmtReader());
}
}
// Skip CRC_32.
}
示例4: consume
import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
/**
* Consumes the payload of a PS packet.
*
* @param data The PES packet. The position will be set to the start of the payload.
* @param output The output to which parsed data should be written.
*/
public void consume(ParsableByteArray data, ExtractorOutput output) {
data.readBytes(pesScratch.data, 0, 3);
pesScratch.setPosition(0);
parseHeader();
data.readBytes(pesScratch.data, 0, extendedHeaderLength);
pesScratch.setPosition(0);
parseHeaderExtension();
pesPayloadReader.packetStarted(timeUs, true);
pesPayloadReader.consume(data);
// We always have complete PES packets with program stream.
pesPayloadReader.packetFinished();
}
示例5: init
import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput output) {
extractorOutput = output;
trackOutput = output.track(0);
wavHeader = null;
output.endTracks();
}
示例6: init
import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public final void init(ExtractorOutput output) {
extractorOutput = output;
if (sideloadedTrack != null) {
TrackBundle bundle = new TrackBundle(output.track(0));
bundle.init(sideloadedTrack, new DefaultSampleValues(0, 0, 0, 0));
trackBundles.put(0, bundle);
extractorOutput.endTracks();
}
}
示例7: init
import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput output) {
adtsReader = new AdtsReader(output.track(0));
output.endTracks();
output.seekMap(SeekMap.UNSEEKABLE);
}
示例8: init
import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput output) {
this.output = output;
output.seekMap(SeekMap.UNSEEKABLE);
}
示例9: init
import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput output) {
extractorOutput = output;
}
示例10: init
import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput output) {
extractorOutput = output;
trackOutput = output.track(0);
extractorOutput.endTracks();
}
示例11: init
import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput extractorOutput) {
this.extractorOutput = extractorOutput;
trackOutput = extractorOutput.track(0);
extractorOutput.endTracks();
}
示例12: init
import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput output) {
adtsReader = new AdtsReader(output.track(0), output.track(1));
output.endTracks();
output.seekMap(SeekMap.UNSEEKABLE);
}
示例13: init
import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput output) {
TrackOutput trackOutput = output.track(0);
output.endTracks();
streamReader.init(output, trackOutput);
}
示例14: init
import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
void init(ExtractorOutput output, TrackOutput trackOutput) {
this.extractorOutput = output;
this.trackOutput = trackOutput;
}
示例15: init
import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput output) {
this.extractorOutput = output;
}