public static VideoCodecMeta createCodecMeta( VirtualTrack src, H264Encoder encoder, int thumbWidth, int thumbHeight) { VideoCodecMeta codecMeta = (VideoCodecMeta) src.getCodecMeta(); AvcCBox createAvcC = H264Utils.createAvcC( encoder.initSPS(new Size(thumbWidth, thumbHeight)), encoder.initPPS(), 4); return VideoCodecMeta.createVideoCodecMeta( "avc1", H264Utils.getAvcCData(createAvcC), new Size(thumbWidth, thumbHeight), codecMeta.getPasp()); }
@Override public VirtualPacket nextPacket() throws IOException { VirtualPacket nextPacket = src.nextPacket(); if (nextPacket == null) return null; return new TranscodePacket(this, nextPacket); }
@Override public VirtualEdit[] getEdits() { return src.getEdits(); }
@Override public int getPreferredTimescale() { return src.getPreferredTimescale(); }
@Override public void close() throws IOException { src.close(); }