public void clone(AVPacket packet) { // growing must be done here (to get the new buffer size) int growBy = packet.size() - getSize(); if (growBy > 0) grow(growBy); int res = avcodecLibrary.av_packet_copy_props( Pointer.getPointer(internal), Pointer.getPointer(packet)); if (res != 0) throw new LibavRuntimeException(res); Pointer<Byte> pData = packet.data(); if (pData != null) pData.copyTo(getData(), packet.size()); setSize(packet.size()); }
public PooledPacket(AVPacket internal) { this.internal = internal; this.bufferSize = internal.size(); }
public void setDts(long dts) { internal.dts(dts); }
public PooledPacket alloc() { avcodecLibrary.av_init_packet(Pointer.getPointer(internal)); bufferSize = internal.size(); return this; }
public long getDts() { return internal.dts(); }
public Pointer<Byte> getData() { return internal.data(); }
public void setSize(int size) { internal.size(size); }
public int getSize() { return internal.size(); }
public int getStreamIndex() { return internal.stream_index(); }
public void grow(int growBy) { int result = avcodecLibrary.av_grow_packet(Pointer.getPointer(internal), growBy); if (result != 0) throw new LibavRuntimeException(result); bufferSize = internal.size(); }