FFmpeg
|
#include <string.h>
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
#include "libavutil/mem.h"
#include "bytestream.h"
#include "internal.h"
#include "packet.h"
#include "packet_internal.h"
Go to the source code of this file.
Macros | |
#define | ALLOC_MALLOC(data, size) data = av_malloc(size) |
#define | ALLOC_BUF(data, size) |
#define | DUP_DATA(dst, src, size, padding, ALLOC) |
#define | FF_MERGE_MARKER 0x8c4d9d108e25e9feULL |
Functions | |
void | av_init_packet (AVPacket *pkt) |
static void | get_packet_defaults (AVPacket *pkt) |
AVPacket * | av_packet_alloc (void) |
Allocate an AVPacket and set its fields to default values. More... | |
void | av_packet_free (AVPacket **pkt) |
Free the packet, if the packet is reference counted, it will be unreferenced first. More... | |
static int | packet_alloc (AVBufferRef **buf, int size) |
int | av_new_packet (AVPacket *pkt, int size) |
Allocate the payload of a packet and initialize its fields with default values. More... | |
void | av_shrink_packet (AVPacket *pkt, int size) |
Reduce packet size, correctly zeroing padding. More... | |
int | av_grow_packet (AVPacket *pkt, int grow_by) |
Increase packet size, correctly zeroing padding. More... | |
int | av_packet_from_data (AVPacket *pkt, uint8_t *data, int size) |
Initialize a reference-counted packet from av_malloc()ed data. More... | |
static int | copy_packet_data (AVPacket *pkt, const AVPacket *src, int dup) |
int | av_copy_packet_side_data (AVPacket *pkt, const AVPacket *src) |
int | av_dup_packet (AVPacket *pkt) |
int | av_copy_packet (AVPacket *dst, const AVPacket *src) |
FF_ENABLE_DEPRECATION_WARNINGS void | av_packet_free_side_data (AVPacket *pkt) |
Convenience function to free all the side data stored. More... | |
FF_DISABLE_DEPRECATION_WARNINGS void | av_free_packet (AVPacket *pkt) |
FF_ENABLE_DEPRECATION_WARNINGS 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. More... | |
uint8_t * | av_packet_new_side_data (AVPacket *pkt, enum AVPacketSideDataType type, buffer_size_t size) |
uint8_t * | av_packet_get_side_data (const AVPacket *pkt, enum AVPacketSideDataType type, buffer_size_t *size) |
const char * | av_packet_side_data_name (enum AVPacketSideDataType type) |
int | av_packet_merge_side_data (AVPacket *pkt) |
int | av_packet_split_side_data (AVPacket *pkt) |
uint8_t * | av_packet_pack_dictionary (AVDictionary *dict, size_t *size) |
Pack a dictionary for use in side_data. More... | |
int | av_packet_unpack_dictionary (const uint8_t *data, size_t size, AVDictionary **dict) |
Unpack a dictionary from side_data. More... | |
int | av_packet_shrink_side_data (AVPacket *pkt, enum AVPacketSideDataType type, buffer_size_t size) |
int | av_packet_copy_props (AVPacket *dst, const AVPacket *src) |
Copy only "properties" fields from src to dst. More... | |
void | av_packet_unref (AVPacket *pkt) |
Wipe the packet. More... | |
int | av_packet_ref (AVPacket *dst, const AVPacket *src) |
Setup a new reference to the data described by a given packet. More... | |
AVPacket * | av_packet_clone (const AVPacket *src) |
Create a new packet that references the same data as src. More... | |
void | av_packet_move_ref (AVPacket *dst, AVPacket *src) |
Move every field in src to dst and reset src. More... | |
int | av_packet_make_refcounted (AVPacket *pkt) |
Ensure the data described by a given packet is reference counted. More... | |
int | av_packet_make_writable (AVPacket *pkt) |
Create a writable reference for the data described by a given packet, avoiding data copy if possible. More... | |
void | av_packet_rescale_ts (AVPacket *pkt, AVRational src_tb, AVRational dst_tb) |
Convert valid timing fields (timestamps / durations) in a packet from one timebase to another. More... | |
int | avpriv_packet_list_put (PacketList **packet_buffer, PacketList **plast_pktl, AVPacket *pkt, int(*copy)(AVPacket *dst, const AVPacket *src), int flags) |
Append an AVPacket to the list. More... | |
int | avpriv_packet_list_get (PacketList **pkt_buffer, PacketList **pkt_buffer_end, AVPacket *pkt) |
Remove the oldest AVPacket in the list and return it. More... | |
void | avpriv_packet_list_free (PacketList **pkt_buf, PacketList **pkt_buf_end) |
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) |
Definition at line 184 of file avpacket.c.
#define FF_MERGE_MARKER 0x8c4d9d108e25e9feULL |
Definition at line 425 of file avpacket.c.
void av_init_packet | ( | AVPacket * | pkt | ) |
Definition at line 36 of file avpacket.c.
Referenced by av_get_packet(), avpriv_dv_produce_packet(), compat_encode(), dv_extract_audio_info(), ff_read_packet(), and ffmmal_decode().
|
static |
Definition at line 55 of file avpacket.c.
Referenced by av_new_packet(), av_packet_alloc(), av_packet_move_ref(), and av_packet_unref().
|
static |
Definition at line 84 of file avpacket.c.
Referenced by av_new_packet(), av_packet_make_refcounted(), av_packet_make_writable(), and av_packet_ref().
Definition at line 212 of file avpacket.c.
Referenced by av_copy_packet(), and av_dup_packet().
Definition at line 240 of file avpacket.c.
Referenced by copy_packet_data().
Definition at line 265 of file avpacket.c.
Definition at line 276 of file avpacket.c.
FF_DISABLE_DEPRECATION_WARNINGS void av_free_packet | ( | AVPacket * | pkt | ) |
Definition at line 295 of file avpacket.c.
uint8_t* av_packet_new_side_data | ( | AVPacket * | pkt, |
enum AVPacketSideDataType | type, | ||
buffer_size_t | size | ||
) |
Definition at line 343 of file avpacket.c.
Referenced by aac_adtstoasc_filter(), add_event(), asf_parse_packet(), av_packet_copy_props(), avi_read_packet(), cbs_bsf_update_side_data(), dash_parse_prft(), encode_apng(), encode_frame(), ff_add_param_change(), ff_mpv_encode_picture(), ff_side_data_set_encoder_stats(), ff_side_data_set_prft(), flac_encode_frame(), gdv_read_packet(), idcin_read_packet(), libopus_encode(), load_ipmovie_packet(), mov_change_extradata(), mov_read_packet(), mp3lame_encode_frame(), new_pes_packet(), ogg_read_packet(), opus_encode_frame(), process_input(), read_frame(), read_frame_internal(), read_sm_data(), simbiosis_imx_read_packet(), storeframe(), swf_read_packet(), decklink_input_callback::VideoInputFrameArrived(), and vorbis_encode_frame().
uint8_t* av_packet_get_side_data | ( | const AVPacket * | pkt, |
enum AVPacketSideDataType | type, | ||
buffer_size_t * | size | ||
) |
Definition at line 368 of file avpacket.c.
Referenced by aac_decode_frame(), add_metadata_from_side_data(), adts_write_packet(), adx_decode_frame(), apply_param_change(), cbs_bsf_update_side_data(), cinepak_decode_frame(), dash_parse_prft(), decode_frame(), decode_simple_internal(), ff_decklink_read_packet(), ff_decode_frame_props(), ff_get_packet_palette(), ff_mov_write_packet(), ff_side_data_set_encoder_stats(), ff_side_data_set_prft(), ffat_decode(), flac_write_audio_packet(), flush_packet(), flv_write_packet(), gdv_decode_frame(), h264_decode_frame(), h264_metadata_handle_display_orientation(), hevc_decode_frame(), idcin_decode_frame(), imx_decode_frame(), ipvideo_decode_frame(), latm_write_packet(), mkv_check_new_extra_data(), mkv_write_block(), mkv_write_vtt_blocks(), mov_write_single_packet(), mp3_write_audio_packet(), mpegts_write_packet_internal(), msrle_decode_frame(), msvideo1_decode_frame(), process_input(), qtrle_decode_frame(), raw_decode(), read_frame_internal(), rscc_decode_frame(), rtp_write_packet(), seg_write_packet(), show_packet(), smc_decode_frame(), srt_decode_frame(), srt_write_packet(), update_stream_extradata(), vpx_decode(), webvtt_write_packet(), and write_packet().
Definition at line 427 of file avpacket.c.
Definition at line 462 of file avpacket.c.
int av_packet_shrink_side_data | ( | AVPacket * | pkt, |
enum AVPacketSideDataType | type, | ||
buffer_size_t | size | ||
) |
Definition at line 584 of file avpacket.c.
Referenced by ff_mpv_encode_picture().
int avpriv_packet_list_put | ( | PacketList ** | head, |
PacketList ** | tail, | ||
AVPacket * | pkt, | ||
int(*)(AVPacket *dst, const AVPacket *src) | copy, | ||
int | flags | ||
) |
Append an AVPacket to the list.
head | List head element |
tail | List tail element |
pkt | The packet being appended. The data described in it will be made reference counted if it isn't already. |
copy | A 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. |
Definition at line 753 of file avpacket.c.
Referenced by aiff_write_packet(), av_read_frame(), avformat_find_stream_info(), avformat_queue_attached_pictures(), ff_read_packet(), flac_write_packet(), mp3_write_packet(), parse_packet(), and tta_write_packet().
int avpriv_packet_list_get | ( | PacketList ** | head, |
PacketList ** | tail, | ||
AVPacket * | pkt | ||
) |
Remove the oldest AVPacket in the list and return it.
head | List head element |
tail | List tail element |
pkt | Pointer to an AVPacket struct |
Definition at line 790 of file avpacket.c.
Referenced by av_read_frame(), ff_read_packet(), flac_queue_flush(), mp3_queue_flush(), read_frame_internal(), and tta_queue_flush().
void avpriv_packet_list_free | ( | PacketList ** | head, |
PacketList ** | tail | ||
) |
Wipe the list and unref all the packets in it.
head | List head element |
tail | List tail element |
Definition at line 806 of file avpacket.c.
Referenced by aiff_deinit(), flac_deinit(), flush_packet_queue(), matroska_parse_laces(), 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 | ||
) |
Definition at line 820 of file avpacket.c.
Referenced by dnxhd_encode_picture(), eb_receive_packet(), encode_frame(), ff_mpv_encode_picture(), ff_qsv_encode(), libkvazaar_encode(), libx265_encode_frame(), process_output_surface(), storeframe(), svq1_encode_frame(), X264_frame(), XAVS_frame(), and xvid_encode_frame().
Definition at line 845 of file avpacket.c.
Referenced by X264_frame().