API调用
常用API
AVPacket * av_packet_alloc ( void ) ;
void av_packet_free ( AVPacket * * pkt) ;
void av_packet_rescale_ts ( AVPacket * pkt, AVRational tb_src, AVRational tb_dst) ;
结构体介绍
typedef struct AVPacket {
AVBufferRef * buf;
int64_t pts;
int64_t dts;
uint8_t * data;
int size;
int stream_index;
int flags;
AVPacketSideData * side_data;
int side_data_elems;
int64_t duration;
int64_t pos;
void * opaque;
AVBufferRef * opaque_ref;
AVRational time_base;
} AVPacket;
struct AVBuffer {
uint8_t * data;
size_t size;
atomic_uint refcount;
void ( * free) ( void * opaque, uint8_t * data) ;
void * opaque;
int flags;
int flags_internal;
} ;
其他
AVPacket * av_packet_alloc ( void ) ;
AVPacket * av_packet_clone ( const AVPacket * src) ;
void av_packet_free ( AVPacket * * pkt) ;
void av_init_packet ( AVPacket * pkt) ;
int av_new_packet ( AVPacket * pkt, int size) ;
void av_shrink_packet ( AVPacket * pkt, int size) ;
int av_grow_packet ( AVPacket * pkt, int grow_by) ;
int av_packet_from_data ( AVPacket * pkt, uint8_t * data, int size) ;
uint8_t * av_packet_new_side_data ( AVPacket * pkt, enum AVPacketSideDataType type, size_t size) ;
int av_packet_add_side_data ( AVPacket * pkt, enum AVPacketSideDataType type, uint8_t * data, size_t size) ;
int av_packet_shrink_side_data ( AVPacket * pkt, enum AVPacketSideDataType type, size_t size) ;
uint8_t * av_packet_get_side_data ( const AVPacket * pkt, enum AVPacketSideDataType type, size_t * size) ;
const char * av_packet_side_data_name ( enum AVPacketSideDataType type) ;
uint8_t * av_packet_pack_dictionary ( AVDictionary * dict, size_t * size) ;
int av_packet_unpack_dictionary ( const uint8_t * data, size_t size, AVDictionary * * dict) ;
void av_packet_free_side_data ( AVPacket * pkt) ;
int av_packet_ref ( AVPacket * dst, const AVPacket * src) ;
void av_packet_unref ( AVPacket * pkt) ;
void av_packet_move_ref ( AVPacket * dst, AVPacket * src) ;
int av_packet_copy_props ( AVPacket * dst, const AVPacket * src) ;
int av_packet_make_refcounted ( AVPacket * pkt) ;
int av_packet_make_writable ( AVPacket * pkt) ;
void av_packet_rescale_ts ( AVPacket * pkt, AVRational tb_src, AVRational tb_dst) ;