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