예제 #1
0
  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());
  }
예제 #2
0
 @Override
 public VirtualPacket nextPacket() throws IOException {
   VirtualPacket nextPacket = src.nextPacket();
   if (nextPacket == null) return null;
   return new TranscodePacket(this, nextPacket);
 }
예제 #3
0
 @Override
 public VirtualEdit[] getEdits() {
   return src.getEdits();
 }
예제 #4
0
 @Override
 public int getPreferredTimescale() {
   return src.getPreferredTimescale();
 }
예제 #5
0
 @Override
 public void close() throws IOException {
   src.close();
 }