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