Go to the documentation of this file.
30 const uint8_t *data_name =
NULL;
32 uint8_t *extra_data =
NULL;
39 bytes = strlen(data_name);
47 memcpy(extra_data, data_name, bytes);
54 "Error occurred in av_packet_add_side_data: %s\n",
63 const static uint8_t*
data =
"selftest for av_packet_clone(...)";
94 printf(
"failed to initialize variables\n");
111 printf(
"av_grow_packet failed to return error "
112 "when \"grow_by\" parameter is too large.\n" );
117 printf(
"av_new_packet failed to return error "
118 "when \"size\" parameter is too large.\n" );
123 printf(
"av_packet_from_data failed to return error "
124 "when \"size\" parameter is too large.\n" );
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
#define AV_PKT_FLAG_DISCARD
Flag is used to discard packets which are required to maintain valid decoder state but are not requir...
int av_grow_packet(AVPacket *pkt, int grow_by)
Increase packet size, correctly zeroing padding.
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type, uint8_t *data, size_t size)
Wrap an existing array as a packet side data.
const char * av_packet_side_data_name(enum AVPacketSideDataType type)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
static int initializations(AVPacket *avpkt)
int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size)
Initialize a reference-counted packet from av_malloc()ed data.
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
printf("static const uint8_t my_array[100] = {\n")
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
int flags
A combination of AV_PKT_FLAG values.
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
@ AV_PKT_DATA_NEW_EXTRADATA
The AV_PKT_DATA_NEW_EXTRADATA is used to notify the codec or the format that the extradata buffer was...
This structure stores compressed data.
int64_t pos
byte position in stream, -1 if unknown
AVPacket * av_packet_clone(const AVPacket *src)
Create a new packet that references the same data as src.
static int setup_side_data_entry(AVPacket *avpkt)