/** * @param readableByteChannel the data source * @throws IOException in case I/O error */ public IsoFile(ReadableByteChannel readableByteChannel) throws IOException { this(readableByteChannel, new PropertyBoxParserImpl()); }
public IsoFile(String file) throws IOException { this(new FileInputStream(file).getChannel(), new PropertyBoxParserImpl()); }
public IsoFile(File file) throws IOException { this(new FileInputStream(file).getChannel(), new PropertyBoxParserImpl()); }
public ClassicMp4ContainerSource(InputStream is) throws IOException { readableByteChannel = Channels.newChannel(new TeeInputStream(is, baos)); BasicContainer container = new BasicContainer(); BoxParser boxParser = new PropertyBoxParserImpl(); Box current = null; while (current == null || !"moov".equals(current.getType())) { current = boxParser.parseBox(readableByteChannel, null); container.addBox(current); } // Either mdat was already read (yeahh sucks but what can you do if it's in the beginning) // or it's still coming for (TrackBox trackBox : Path.<TrackBox>getPaths(container, "moov[0]/trak")) { Mp4StreamingTrack mp4StreamingTrack = new Mp4StreamingTrack(trackBox); tracks.put(trackBox, mp4StreamingTrack); if (trackBox.getSampleTableBox().getCompositionTimeToSample() != null) { mp4StreamingTrack.addTrackExtension(new CompositionTimeTrackExtension()); } mp4StreamingTrack.addTrackExtension(new TrackIdTrackExtension(trackBox.getTrackHeaderBox().getTrackId())); currentChunks.put(trackBox, 1L); currentSamples.put(trackBox, 1L); } }
/** * @param readableByteChannel the data source * @throws IOException in case I/O error */ public IsoFile(ReadableByteChannel readableByteChannel) throws IOException { this(readableByteChannel, new PropertyBoxParserImpl()); }
public IsoFile(File file) throws IOException { this(new FileInputStream(file).getChannel(), new PropertyBoxParserImpl()); }
public IsoFile(String file) throws IOException { this(new FileInputStream(file).getChannel(), new PropertyBoxParserImpl()); }