FFmpeg
Functions
packet_internal.h File Reference
#include <stdint.h>
#include "packet.h"

Go to the source code of this file.

Functions

int avpriv_packet_list_put (AVPacketList **head, AVPacketList **tail, AVPacket *pkt, int(*copy)(AVPacket *dst, const AVPacket *src), int flags)
 Append an AVPacket to the list. More...
 
int avpriv_packet_list_get (AVPacketList **head, AVPacketList **tail, AVPacket *pkt)
 Remove the oldest AVPacket in the list and return it. More...
 
void avpriv_packet_list_free (AVPacketList **head, AVPacketList **tail)
 Wipe the list and unref all the packets in it. More...
 
int ff_side_data_set_encoder_stats (AVPacket *pkt, int quality, int64_t *error, int error_count, int pict_type)
 
int ff_side_data_set_prft (AVPacket *pkt, int64_t timestamp)
 

Function Documentation

int avpriv_packet_list_put ( AVPacketList **  head,
AVPacketList **  tail,
AVPacket pkt,
int(*)(AVPacket *dst, const AVPacket *src copy,
int  flags 
)

Append an AVPacket to the list.

Parameters
headList head element
tailList tail element
pktThe packet being appended. The data described in it will be made reference counted if it isn't already.
copyA callback to copy the contents of the packet to the list. May be null, in which case the packet's reference will be moved to the list.
Returns
0 on success, negative AVERROR value on failure. On failure, the packet and the list are unchanged.

Definition at line 729 of file avpacket.c.

Referenced by aiff_write_packet(), av_read_frame(), avformat_find_stream_info(), avformat_queue_attached_pictures(), extract_packet_props(), ff_read_packet(), flac_write_packet(), matroska_parse_frame(), matroska_parse_rm_audio(), matroska_parse_webvtt(), mp3_write_packet(), parse_packet(), and tta_write_packet().

int avpriv_packet_list_get ( AVPacketList **  head,
AVPacketList **  tail,
AVPacket pkt 
)

Remove the oldest AVPacket in the list and return it.

Note
The pkt will be overwritten completely on success. The caller owns the packet and must unref it by itself.
Parameters
headList head element
tailList tail element
pktPointer to an AVPacket struct
Returns
0 on success, and a packet is returned. AVERROR(EAGAIN) if the list was empty.

Definition at line 766 of file avpacket.c.

Referenced by av_read_frame(), extract_packet_props(), ff_decode_frame_props(), ff_read_packet(), flac_queue_flush(), matroska_deliver_packet(), mp3_queue_flush(), read_frame_internal(), and tta_queue_flush().

void avpriv_packet_list_free ( AVPacketList **  head,
AVPacketList **  tail 
)

Wipe the list and unref all the packets in it.

Parameters
headList head element
tailList tail element

Definition at line 782 of file avpacket.c.

Referenced by aiff_deinit(), avcodec_close(), flac_deinit(), flush_packet_queue(), matroska_clear_queue(), mp3_deinit(), and tta_deinit().

int ff_side_data_set_encoder_stats ( AVPacket pkt,
int  quality,
int64_t *  error,
int  error_count,
int  pict_type 
)
int ff_side_data_set_prft ( AVPacket pkt,
int64_t  timestamp 
)

Definition at line 821 of file avpacket.c.

Referenced by X264_frame().