private SeekableDemuxerTrack sdt() throws JCodecException { if (!(videoTrack instanceof SeekableDemuxerTrack)) throw new JCodecException("Not a seekable track"); return (SeekableDemuxerTrack) videoTrack; }
private void getProgramAssociationTable(final MTSPacket packet) throws JCodecException { final ByteBuffer payload = packet.getPayload(); final int pointer = payload.get() & 0xff; payload.position(payload.position() + pointer); final PATSection programAssociationTable = PATSection.parse(payload); if (programAssociationTable == null) { throw new JCodecException("Program association table does not exist."); } programMapTablePacketIdDirectory.addAll(programAssociationTable.getPrograms().values()); if (programMapTablePacketIdDirectory.isEmpty()) { throw new JCodecException("No programs found in transport stream."); } }