public static MovieHeaderBox createMovieHeaderBox(int timescale, long duration, float rate, float volume, long created, long modified, int[] matrix, int nextTrackId) { MovieHeaderBox mvhd = new MovieHeaderBox(new Header(fourcc())); mvhd.timescale = timescale; mvhd.duration = duration; mvhd.rate = rate; mvhd.volume = volume; mvhd.created = created; mvhd.modified = modified; mvhd.matrix = matrix; mvhd.nextTrackId = nextTrackId; return mvhd; }
public long getDuration() { return getMovieHeader().getDuration(); }
public void appendTrack(TrakBox newTrack) { newTrack.getTrackHeader().setNo(getMovieHeader().getNextTrackId()); getMovieHeader().setNextTrackId(getMovieHeader().getNextTrackId() + 1); boxes.add(newTrack); }
public void parse(ByteBuffer input) { super.parse(input); if (version == 0) { created = fromMovTime(input.getInt()); modified = fromMovTime(input.getInt()); timescale = input.getInt(); duration = input.getInt(); } else if (version == 1) { created = fromMovTime((int) input.getLong()); modified = fromMovTime((int) input.getLong()); timescale = input.getInt(); duration = input.getLong(); } else { throw new RuntimeException("Unsupported version"); } rate = readRate(input); volume = readVolume(input); NIOUtils.skip(input, 10); matrix = readMatrix(input); NIOUtils.skip(input, 24); nextTrackId = input.getInt(); }
public int getTimescale() { return getMovieHeader().getTimescale(); }
public MovieHeaderBox(int timescale, long duration, float rate, float volume, long created, long modified, int[] matrix, int nextTrackId) { super(new Header(fourcc())); this.timescale = timescale; this.duration = duration; this.rate = rate; this.volume = volume; this.created = created; this.modified = modified; this.matrix = matrix; this.nextTrackId = nextTrackId; }
public void setDuration(long movDuration) { getMovieHeader().setDuration(movDuration); }
private MovieHeaderBox movieHeader(NodeBox movie) { int timescale = tracks.get(0).getTimescale(); long duration = tracks.get(0).getTrackTotalDuration(); AbstractMP4MuxerTrack videoTrack = getVideoTrack(); if (videoTrack != null) { timescale = videoTrack.getTimescale(); duration = videoTrack.getTrackTotalDuration(); } return new MovieHeaderBox(timescale, duration, 1.0f, 1.0f, new Date().getTime(), new Date().getTime(), new int[] { 0x10000, 0, 0, 0, 0x10000, 0, 0, 0, 0x40000000 }, nextTrackId); }
public void parse(ByteBuffer input) { super.parse(input); if (version == 0) { created = fromMovTime(input.getInt()); modified = fromMovTime(input.getInt()); timescale = input.getInt(); duration = input.getInt(); } else if (version == 1) { created = fromMovTime((int) input.getLong()); modified = fromMovTime((int) input.getLong()); timescale = input.getInt(); duration = input.getLong(); } else { throw new RuntimeException("Unsupported version"); } rate = readRate(input); volume = readVolume(input); NIOUtils.skip(input, 10); matrix = readMatrix(input); NIOUtils.skip(input, 24); nextTrackId = input.getInt(); }
public int getTimescale() { return getMovieHeader().getTimescale(); }
public MovieHeaderBox(int timescale, long duration, float rate, float volume, long created, long modified, int[] matrix, int nextTrackId) { super(new Header(fourcc())); this.timescale = timescale; this.duration = duration; this.rate = rate; this.volume = volume; this.created = created; this.modified = modified; this.matrix = matrix; this.nextTrackId = nextTrackId; }
public void setDuration(long movDuration) { getMovieHeader().setDuration(movDuration); }
private MovieHeaderBox movieHeader(NodeBox movie) { int timescale = tracks.get(0).getTimescale(); long duration = tracks.get(0).getTrackTotalDuration(); AbstractMP4MuxerTrack videoTrack = getVideoTrack(); if (videoTrack != null) { timescale = videoTrack.getTimescale(); duration = videoTrack.getTrackTotalDuration(); } return new MovieHeaderBox(timescale, duration, 1.0f, 1.0f, new Date().getTime(), new Date().getTime(), new int[] { 0x10000, 0, 0, 0, 0x10000, 0, 0, 0, 0x40000000 }, nextTrackId); }
public void parse(ByteBuffer input) { super.parse(input); if (version == 0) { created = fromMovTime(input.getInt()); modified = fromMovTime(input.getInt()); timescale = input.getInt(); duration = input.getInt(); } else if (version == 1) { created = fromMovTime((int) input.getLong()); modified = fromMovTime((int) input.getLong()); timescale = input.getInt(); duration = input.getLong(); } else { throw new RuntimeException("Unsupported version"); } rate = readRate(input); volume = readVolume(input); NIOUtils.skip(input, 10); matrix = readMatrix(input); NIOUtils.skip(input, 24); nextTrackId = input.getInt(); }
public void appendTrack(TrakBox newTrack) { newTrack.getTrackHeader().setNo(getMovieHeader().getNextTrackId()); getMovieHeader().setNextTrackId(getMovieHeader().getNextTrackId() + 1); boxes.add(newTrack); }
public int getTimescale() { return getMovieHeader().getTimescale(); }
public MovieHeaderBox() { super(new Header(fourcc())); }
public void setDuration(long movDuration) { getMovieHeader().setDuration(movDuration); }
public long getDuration() { return getMovieHeader().getDuration(); }
public void appendTrack(TrakBox newTrack) { newTrack.getTrackHeader().setNo(getMovieHeader().getNextTrackId()); getMovieHeader().setNextTrackId(getMovieHeader().getNextTrackId() + 1); boxes.add(newTrack); }