bo.write(unknown2, 0, unknown2.length); currentPlaylistItems.addItem(key, bo);
boolean endCurrentPlaylist(boolean foundPlaylist) throws ItlException { // Ensure that when a playlist ends that the correct number of playlist // items were found and if the current playlist is not the desired // playlist null out the current playlist/title so it gets ignored if (currentPlaylistItems != null) { List<Integer> items = currentPlaylistItems.getItemIds(); int expectedCount = currentPlaylistItems.getExpectedItemCount(); if (expectedCount != items.size()) { throw new ItlException("Expected " + expectedCount + " playlist items, got " + items.size()); } if (!foundPlaylist) { currentPlaylistItems = null; currentPlaylistTitle = null; } } return foundPlaylist; } }
List<Integer> pi = playlist.getItemIds(); Collections.shuffle(pi); int offset = (int) playlist.getItemStartOffset(); int index = 0; List<ByteArrayOutputStream> pbi = playlist.getRawItems(); bo.write(hdr.fileData, 0, (int) playlist.getItemStartOffset());
private void readHpim(Input di, int length) throws IOException, ItlException { int unknownA = di.readInt(); int unknownB = di.readInt(); int itemCount = di.readInt(); // System.out.println("HPIM items: " + itemCount); // System.out.printf("0x%04x%04x", unknownA, unknownB); // System.out.println(""); byte[] remaining = new byte[length - 20]; di.readFully(remaining); byte[] ppid = new byte[8]; System.arraycopy(remaining, 420, ppid, 0, ppid.length); currentPlaylistItems = new PlaylistRawItems(itemCount); }
((currentPlaylistItems.getExpectedItemCount() != currentPlaylistItems.getItemIds().size()) || (!currentPlaylistItems.getItemIds().isEmpty()))) ((currentPlaylistItems.getExpectedItemCount() != currentPlaylistItems.getItemIds().size()) || (!currentPlaylistItems.getItemIds().isEmpty())))