FFmpeg
|
Types and functions for working with AVPacket. More...
Data Structures | |
struct | AVPacket |
This structure stores compressed data. More... | |
Macros | |
#define | AV_PKT_FLAG_KEY 0x0001 |
The packet contains a keyframe. More... | |
#define | AV_PKT_FLAG_CORRUPT 0x0002 |
The packet content is corrupted. More... | |
#define | AV_PKT_FLAG_DISCARD 0x0004 |
Flag is used to discard packets which are required to maintain valid decoder state but are not required for output and should be dropped after decoding. More... | |
#define | AV_PKT_FLAG_TRUSTED 0x0008 |
The packet comes from a trusted source. More... | |
#define | AV_PKT_FLAG_DISPOSABLE 0x0010 |
Flag is used to indicate packets that contain frames that can be discarded by the decoder. More... | |
Enumerations | |
enum | AVSideDataParamChangeFlags { AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE = 0x0004, AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS = 0x0008 } |
Functions | |
AVPacket * | av_packet_alloc (void) |
Allocate an AVPacket and set its fields to default values. More... | |
AVPacket * | av_packet_clone (const AVPacket *src) |
Create a new packet that references the same data as src. More... | |
void | av_packet_free (AVPacket **pkt) |
Free the packet, if the packet is reference counted, it will be unreferenced first. More... | |
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... | |
uint8_t * | av_packet_new_side_data (AVPacket *pkt, enum AVPacketSideDataType type, size_t size) |
Allocate new information of a packet. More... | |
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... | |
int | av_packet_shrink_side_data (AVPacket *pkt, enum AVPacketSideDataType type, size_t size) |
Shrink the already allocated side data buffer. More... | |
uint8_t * | av_packet_get_side_data (const AVPacket *pkt, enum AVPacketSideDataType type, size_t *size) |
Get side information from packet. More... | |
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... | |
void | av_packet_free_side_data (AVPacket *pkt) |
Convenience function to free all the side data stored. More... | |
int | av_packet_ref (AVPacket *dst, const AVPacket *src) |
Setup a new reference to the data described by a given packet. More... | |
void | av_packet_unref (AVPacket *pkt) |
Wipe the packet. More... | |
void | av_packet_move_ref (AVPacket *dst, AVPacket *src) |
Move every field in src to dst and reset src. More... | |
int | av_packet_copy_props (AVPacket *dst, const AVPacket *src) |
Copy only "properties" fields from src to dst. 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 tb_src, AVRational tb_dst) |
Convert valid timing fields (timestamps / durations) in a packet from one timebase to another. More... | |
struct AVContainerFifo * | av_container_fifo_alloc_avpacket (unsigned flags) |
Allocate an AVContainerFifo instance for AVPacket. More... | |
Types and functions for working with AVPacket.
#define AV_PKT_FLAG_KEY 0x0001 |
#define AV_PKT_FLAG_CORRUPT 0x0002 |
#define AV_PKT_FLAG_DISCARD 0x0004 |
#define AV_PKT_FLAG_TRUSTED 0x0008 |
#define AV_PKT_FLAG_DISPOSABLE 0x0010 |
AVPacket* av_packet_alloc | ( | void | ) |
Allocate an AVPacket and set its fields to default values.
The resulting struct must be freed using av_packet_free().
Definition at line 64 of file packet.c.
Referenced by add_stream(), amv_init(), apng_write_packet(), asf_read_stream_properties(), asf_read_timestamp(), av1_frame_merge_init(), av1_frame_split_init(), av_bsf_alloc(), av_packet_clone(), avcodec_open2(), avformat_alloc_context(), bsf_init(), config_input(), config_props(), container_packet_alloc(), cri_decode_init(), dec_alloc(), dec_thread_init(), decoder_init(), demux_thread_init(), ds_open(), enc_thread_init(), encode_write(), estimate_best_b_count(), evc_frame_merge_init(), ff_alsa_open(), ff_bsf_get_packet(), ff_decode_preinit(), ff_frame_thread_encoder_init(), ff_frame_thread_init(), ff_hw_base_encode_init(), ff_reshuffle_raw_rgb(), ff_subtitles_queue_insert(), frame_merge_init(), ftr_init(), gif_write_packet(), handle_eac3(), init(), init_filters(), init_packet(), init_thread(), initialize_fifo_tst_muxer_chain(), ist_filter_add(), libdav1d_receive_frame_internal(), libxevd_init(), libxevd_receive_frame(), LLVMFuzzerTestOneInput(), main(), mediacodec_generate_extradata(), moflex_read_sync(), mov_init(), movie_common_init(), mpegts_get_dts(), mux_queue_packet(), mux_thread_init(), new_playlist(), ost_add(), packet_queue_put(), qt_rtp_init(), read_gab2_sub(), read_interval_packets(), read_thread(), rtp_mpegts_write_header(), run_test(), sch_add_demux(), sch_add_enc(), sch_mux_sub_heartbeat_add(), seek_test(), setts_init(), setup_sync_queues(), tdsc_init(), tiff_init(), transcode_subtitles(), video_decode(), video_decode_example(), vp9_superframe_init(), vp9_superframe_split_init(), wc3_read_header(), webp_decode_init(), and xvid_encode_init().
Create a new packet that references the same data as src.
This is a shortcut for av_packet_alloc()+av_packet_ref().
Definition at line 474 of file packet.c.
Referenced by decklink_write_video_packet(), flac_write_packet(), and main().
void av_packet_free | ( | AVPacket ** | pkt | ) |
Free the packet, if the packet is reference counted, it will be unreferenced first.
pkt | packet to be freed. The pointer will be set to NULL. |
Definition at line 75 of file packet.c.
Referenced by amv_deinit(), apng_deinit(), asf_read_close(), asf_read_timestamp(), av1_frame_merge_close(), av1_frame_split_close(), av_bsf_free(), av_packet_clone(), avformat_free_context(), avi_read_close(), avi_write_packet(), close_stream(), container_packet_free(), cri_decode_close(), dec_free(), dec_thread_uninit(), decklink_write_video_packet(), decode_audio_frame(), decoder_destroy(), demux_thread_uninit(), drop_dups(), ds_free(), dts2pts_filter(), dts2pts_flush(), enc_thread_uninit(), encode_audio_frame(), encode_write(), estimate_best_b_count(), evc_frame_merge_close(), ff_alsa_close(), ff_codec_close(), ff_frame_thread_encoder_free(), ff_frame_thread_free(), ff_hw_base_encode_close(), ff_reshuffle_raw_rgb(), ff_subtitles_queue_clean(), ff_subtitles_queue_insert(), filter(), flac_deinit(), frame_merge_close(), free_playlist_list(), ftr_close(), gif_write_trailer(), h264_filter(), h264_mp4toannexb_filter(), hevc_mp4toannexb_filter(), ifile_close(), imx_dump_header(), libdav1d_receive_frame_internal(), libdav1d_user_data_free(), libxevd_close(), libxevd_receive_frame(), libxevd_return_frame(), LLVMFuzzerTestOneInput(), main(), mediacodec_generate_extradata(), mjpeg2jpeg_filter(), mjpega_dump_header(), moflex_read_close(), mov_free(), mov_write_packet(), movie_uninit(), mpegts_get_dts(), mux_task_start(), mux_thread_uninit(), new_playlist(), of_free(), ost_free(), packet_queue_flush(), packet_queue_get(), packet_queue_put(), qt_rtp_close(), read_gab2_sub(), read_interval_packets(), read_thread(), decklink_frame::Release(), rtp_mpegts_write_close(), run_test(), sch_free(), seek_test(), setts_close(), tdsc_close(), text2movsub(), tiff_end(), transcode_subtitles(), uninit(), video_decode(), video_decode_example(), vp9_raw_reorder_filter(), vp9_raw_reorder_frame_free(), vp9_superframe_close(), vp9_superframe_split_uninit(), vvc_mp4toannexb_filter(), wc3_read_close(), webp_decode_close(), and xvid_encode_init().
int av_new_packet | ( | AVPacket * | pkt, |
int | size | ||
) |
Allocate the payload of a packet and initialize its fields with default values.
pkt | packet |
size | wanted payload size |
Definition at line 99 of file packet.c.
Referenced by aac_parse_packet(), ac3_handle_packet(), amr_handle_packet(), amv_init(), ape_read_packet(), asf_parse_packet(), asf_read_replicated_data(), asf_read_single_payload(), audio_read_packet(), avf_read_packet(), avisynth_read_packet_audio(), avisynth_read_packet_video(), avs_read_video_packet(), binka_read_packet(), bmv_read_packet(), callback(), cdxl_read_packet(), cin_read_packet(), create_subcc_packet(), decode_frame(), demux_audio(), demux_video(), do_subtitle_out(), dsf_read_packet(), dss_723_1_read_packet(), dss_sp_read_packet(), dump_extradata(), dxa_read_packet(), encode_frame(), fbdev_read_packet(), ff_h263_handle_packet(), ff_h264_handle_aggregated_packet(), ff_h264_handle_frag_packet(), ff_img_read_packet(), ff_raw_read_partial_packet(), ff_reshuffle_raw_rgb(), ff_rm_retrieve_cache(), ff_spdif_read_packet(), ff_subtitles_queue_insert(), filter(), fourxm_read_packet(), fsb_read_packet(), g723_1_read_packet(), gdigrab_read_packet(), genh_read_packet(), get_eia608_packet(), gif_read_packet(), grab_read_packet(), h264_handle_packet(), h264_mp4toannexb_filter(), hevc_handle_packet(), image_available(), imx_dump_header(), jpegxl_anim_read_packet(), laf_read_packet(), latm_parse_packet(), lavfi_read_packet(), LLVMFuzzerTestOneInput(), load_ipmovie_packet(), lxf_read_packet(), main(), merge_superframe(), mjpeg2jpeg_filter(), mjpega_dump_header(), mmap_read_frame(), modplug_read_packet(), mpa_robust_parse_packet(), mpc_read_packet(), mpeg_parse_packet(), mpegts_raw_read_packet(), mxg_read_packet(), nuv_packet(), ogg_read_packet(), pp_bnk_read_packet(), prepare_packet(), pulse_read_packet(), qdm2_restore_block(), qoa_read_packet(), qt_rtp_parse_packet(), read_frame(), read_packet(), read_packet_gme(), read_packet_openmpt(), rechunk_filter(), recode_subtitle(), return_stored_frame(), rm_assemble_video_frame(), rm_read_audio_stream_info(), roq_read_packet(), rsd_read_packet(), rtp_parse_packet_internal(), sbg_read_packet(), sdr2_read_packet(), sds_read_packet(), seq_read_packet(), sga_audio_packet(), sga_video_packet(), siff_read_packet(), smacker_read_packet(), store_packet(), str_read_packet(), supply_new_packets(), swf_read_packet(), text2movsub(), vc2hq_handle_sequence_header(), vc2hq_mark_end_of_sequence(), videostream_cb(), vmd_read_packet(), vp9_raw_reorder_make_output(), vpk_read_packet(), vqf_read_packet(), wsaud_read_packet(), wv_read_packet(), xiph_handle_packet(), and yop_read_packet().
void av_shrink_packet | ( | AVPacket * | pkt, |
int | size | ||
) |
Reduce packet size, correctly zeroing padding.
pkt | packet |
size | new size |
Definition at line 114 of file packet.c.
Referenced by adx_read_packet(), append_packet_chunked(), asf_parse_packet(), cdxl_read_packet(), cfhd_encode_frame(), cin_read_packet(), decode_frame(), decrypt_video_frame(), do_subtitle_out(), dxv_encode(), encode_frame(), encode_picture_ls(), ff_raw_read_partial_packet(), flac_encode_frame(), fourxm_read_packet(), gif_read_packet(), hap_encode(), hdr_encode_frame(), imf_read_packet(), libopenjpeg_encode_frame(), libopus_encode(), mlp_encode_frame(), mxf_decrypt_triplet(), mxf_get_d10_aes3_packet(), nuv_packet(), pnm_encode_frame(), pulse_read_packet(), rm_assemble_video_frame(), rpza_encode_frame(), sdr2_read_packet(), smc_encode_frame(), swf_read_packet(), twolame_encode_frame(), vc2_encode_frame(), wbmp_encode_frame(), and yop_read_packet().
int av_grow_packet | ( | AVPacket * | pkt, |
int | grow_by | ||
) |
Increase packet size, correctly zeroing padding.
pkt | packet |
grow_by | number of bytes by which to increase the size of the packet |
Definition at line 122 of file packet.c.
Referenced by append_au(), append_packet_chunked(), encode_frame(), ff_subtitles_queue_insert(), frame_merge_filter(), ftr_decode_frame(), handle_eac3(), hevc_mp4toannexb_filter(), main(), stream_seek(), stream_skip(), stream_write(), vvc_mp4toannexb_filter(), and wv_read_packet().
int av_packet_from_data | ( | AVPacket * | pkt, |
uint8_t * | data, | ||
int | size | ||
) |
Initialize a reference-counted packet from av_malloc()ed data.
pkt | packet to be initialized. This function will set the data, size, and buf fields, all others are left untouched. |
data | Data allocated by av_malloc() to be used as packet data. If this function returns successfully, the data is owned by the underlying AVBuffer. The caller may not access the data through other means. |
size | size of data in bytes, without the padding. I.e. the full buffer size is assumed to be size + AV_INPUT_BUFFER_PADDING_SIZE. |
Definition at line 173 of file packet.c.
Referenced by asf_deinterleave(), ff_mov_generate_squashed_ttml_packet(), ff_rtp_finalize_packet(), iec61883_parse_queue_dv(), main(), omx_encode_frame(), qt_rtp_parse_packet(), and rfc4175_finalize_packet().
uint8_t* av_packet_new_side_data | ( | AVPacket * | pkt, |
enum AVPacketSideDataType | type, | ||
size_t | size | ||
) |
Allocate new information of a packet.
pkt | packet |
type | side information type |
size | side information size |
Definition at line 232 of file packet.c.
Referenced by aac_adtstoasc_filter(), aac_encode_frame(), add_event(), asf_parse_packet(), audio_frame_obu(), 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(), frame_data_apply(), gdv_read_packet(), idcin_read_packet(), imf_read_packet(), libopus_encode(), load_ipmovie_packet(), mov_change_extradata(), mov_read_packet(), mp3lame_encode_frame(), msrle_encode_frame(), new_pes_packet(), ogg_read_packet(), opus_encode_frame(), read_frame(), read_frame_internal(), read_sm_data(), rtp_set_prft(), simbiosis_imx_read_packet(), smc_encode_frame(), storeframe(), swf_read_packet(), decklink_input_callback::VideoInputFrameArrived(), and vorbis_encode_frame().
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.
pkt | packet |
type | side information type |
data | the side data array. It must be allocated with the av_malloc() family of functions. The ownership of the data is transferred to pkt. |
size | side information size |
Definition at line 198 of file packet.c.
Referenced by aax_read_packet(), add_filename_as_pkt_side_data(), av_packet_new_side_data(), cenc_filter(), concat_read_packet(), extract_extradata_filter(), ff_mpv_encode_picture(), flv_read_packet(), get_metadata(), h264_metadata_handle_display_orientation(), lavfi_read_packet(), ogg_read_packet(), setup_side_data_entry(), and decklink_input_callback::VideoInputFrameArrived().
int av_packet_shrink_side_data | ( | AVPacket * | pkt, |
enum AVPacketSideDataType | type, | ||
size_t | size | ||
) |
Shrink the already allocated side data buffer.
pkt | packet |
type | side information type |
size | new side information size |
Definition at line 377 of file packet.c.
Referenced by ff_mpv_encode_picture().
uint8_t* av_packet_get_side_data | ( | const AVPacket * | pkt, |
enum AVPacketSideDataType | type, | ||
size_t * | size | ||
) |
Get side information from packet.
pkt | packet |
type | desired side information type |
size | If supplied, *size will be set to the size of the side data or to zero if the desired side data is not present. |
Definition at line 253 of file packet.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(), ff_cbs_read_packet_side_data(), ff_copy_palette(), ff_decklink_read_packet(), ff_get_packet_palette(), ff_iamf_write_audio_frame(), ff_iamf_write_parameter_blocks(), 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(), h264_decode_frame(), h264_metadata_handle_display_orientation(), h264_mp4toannexb_filter(), hevc_receive_frame(), ipvideo_decode_frame(), latm_write_packet(), mediacodec_generate_extradata(), mkv_check_new_extra_data(), mkv_write_block(), mov_write_single_packet(), mp3_write_audio_packet(), mpegts_write_packet_internal(), read_frame_internal(), rtp_write_packet(), seg_write_packet(), show_packet(), srt_decode_frame(), srt_write_packet(), trace_headers(), update_stream_extradata(), update_video_stats(), vpx_decode(), webm_reformat_vtt(), and webvtt_write_packet().
uint8_t* av_packet_pack_dictionary | ( | AVDictionary * | dict, |
size_t * | size | ||
) |
Pack a dictionary for use in side_data.
dict | The dictionary to pack. |
size | pointer to store the size of the returned data |
Definition at line 315 of file packet.c.
Referenced by add_filename_as_pkt_side_data(), concat_read_packet(), lavfi_read_packet(), decklink_input_callback::VideoInputFrameArrived(), and vorbis_update_metadata().
int av_packet_unpack_dictionary | ( | const uint8_t * | data, |
size_t | size, | ||
AVDictionary ** | dict | ||
) |
Unpack a dictionary from side_data.
data | data from side_data |
size | size of the data |
dict | the metadata storage dictionary |
Definition at line 350 of file packet.c.
Referenced by add_metadata_from_side_data(), ff_decklink_read_packet(), and show_packet().
void av_packet_free_side_data | ( | AVPacket * | pkt | ) |
Convenience function to free all the side data stored.
All the other fields stay untouched.
pkt | packet |
Definition at line 189 of file packet.c.
Referenced by av_packet_copy_props(), and av_packet_unref().
Setup a new reference to the data described by a given packet.
If src is reference-counted, setup dst as a new reference to the buffer in src. Otherwise allocate a new buffer in dst and copy the data from src into it.
All the other fields are copied from src.
dst | Destination packet. Will be completely overwritten. |
src | Source packet |
Definition at line 438 of file packet.c.
Referenced by amv_write_packet(), apng_write_packet(), av1_frame_split_filter(), av_packet_clone(), avcodec_send_packet(), avformat_queue_attached_pictures(), container_packet_transfer(), demux_send_for_stream(), evc_frame_merge_filter(), extract_extradata(), ff_subtitles_queue_read_packet(), ffat_decode(), fifo_write_packet(), flush_packet(), gif_write_packet(), handle_eac3(), mkv_write_packet(), mov_write_packet(), qsv_decode_frame(), read_thread(), rechunk_filter(), sch_enc_send(), setts_filter(), stream_params_copy(), tee_write_packet(), vp9_superframe_split_filter(), webp_write_packet(), write_muxed_file(), and write_packet().
void av_packet_unref | ( | AVPacket * | pkt | ) |
Wipe the packet.
Unreference the buffer referenced by the packet and reset the remaining packet fields to their default values.
pkt | The packet to be unreferenced. |
Definition at line 430 of file packet.c.
Referenced by aac_adtstoasc_filter(), activate(), adts_aac_read_packet(), amv_write_packet(), android_camera_read_close(), append_packet_chunked(), asf_deinterleave(), asf_parse_packet(), asf_read_header(), asf_read_pts(), asf_read_timestamp(), asf_reset_header(), asfrtp_parse_packet(), audio_read_packet(), av1_frame_merge_filter(), av1_frame_merge_flush(), av1_frame_split_filter(), av1_frame_split_flush(), av1_receive_frame(), av1_receive_frame_internal(), av_bsf_flush(), av_bsf_send_packet(), av_get_packet(), av_interleaved_write_frame(), av_packet_free(), av_packet_ref(), av_read_frame(), av_write_frame(), av_write_trailer(), avcodec_decode_subtitle2(), avcodec_flush_buffers(), avcodec_receive_packet(), avformat_find_stream_info(), avi_read_packet(), avisynth_read_packet_audio(), avisynth_read_packet_video(), avpriv_packet_list_free(), avs_read_audio_packet(), binkaudio_receive_frame(), bsf_list_filter(), combine_au(), compute_crc_of_packets(), concat_read_packet(), container_packet_reset(), cri_decode_frame(), cuvid_output_frame(), decode_frame(), decode_get_packet(), decode_simple_internal(), decoder_decode_frame(), decoder_thread(), demux_audio(), demux_send(), demux_send_for_stream(), demux_stream_send_to_dst(), dng_decode_jpeg(), do_send(), do_subtitle_out(), ds_run(), dshow_read_close(), dts2pts_filter(), dump_extradata(), dv_error_marker_filter(), ea_read_packet(), eac3_core_filter(), encode(), encode_frame(), encode_receive_packet_internal(), encode_write(), encode_write_frame(), encoder_thread(), estimate_best_b_count(), estimate_timings_from_pts(), evc_frame_merge_filter(), evc_frame_merge_flush(), extract_extradata(), extract_extradata_filter(), extract_packet_props(), ff_add_attached_pic(), ff_cbs_bsf_generic_filter(), ff_decklink_packet_queue_flush(), ff_decklink_packet_queue_put(), ff_decode_flush_buffers(), ff_decode_get_packet(), ff_encode_encode_cb(), ff_free_stream(), ff_get_encode_buffer(), ff_interleave_add_packet(), ff_interleave_packet_per_dts(), ff_load_image(), ff_mov_add_hinted_packet(), ff_qsv_enc_close(), ff_raw_read_partial_packet(), ff_read_packet(), ff_rm_free_rmstream(), ff_rtp_finalize_packet(), ff_thread_receive_frame(), ff_v4l2_buffer_buf_to_avpkt(), ffat_close_decoder(), ffat_decode(), ffat_decode_callback(), ffat_decode_flush(), ffmmal_add_packet(), fifo_basic_test(), fifo_overflow_drop_test(), fifo_test_packet(), fifo_thread_recover(), fifo_thread_write_packet(), fifo_write_packet(), filter(), filter_1phase(), filter_frame(), filter_units_filter(), fits_read_packet(), flac_finish_header(), flac_queue_flush(), flac_read_timestamp(), flush(), flush_packet(), flv_read_packet(), fourxm_read_packet(), frame_merge_filter(), frame_merge_flush(), free_message(), free_pkt_fifo(), gif_read_packet(), gif_write_packet(), h264_mp4toannexb_filter(), handle_eac3(), handle_id3(), handle_new_packet(), hapqa_extract(), hevc_mp4toannexb_filter(), hevc_receive_frame(), hls_read_packet(), hls_read_seek(), iec61883_parse_queue_dv(), image_available(), imx_dump_header(), input_thread(), interleaved_write_packet(), libjxl_receive_frame(), libxevd_receive_frame(), LLVMFuzzerTestOneInput(), main(), mediacodec_decode_close(), mediacodec_decode_flush(), mediacodec_receive_frame(), mjpeg2jpeg_filter(), mjpega_dump_header(), mkv_write_packet(), mmap_read_frame(), mov2textsub(), mov_create_chapter_track(), mov_create_timecode_track(), mov_read_packet(), mov_write_squashed_packet(), mov_write_subtitle_end_packet(), mov_write_ttml_document_from_queue(), mp3_queue_flush(), mpa_robust_parse_packet(), mpc_read_seek(), mpeg4_unpack_bframes_filter(), mpegts_get_dts(), mpegts_read_packet(), mpegts_write_packet_internal(), mux_frames(), mux_id3(), mux_packet_filter(), muxer_thread(), mxf_interleave_get_packet(), new_data_packet(), new_pes_packet(), noise(), nsv_read_close(), osq_receive_frame(), packet_queue_put(), parse_packet(), prores_metadata(), pulse_read_packet(), qsv_clear_buffers(), qsv_decode_frame(), qt_rtp_parse_packet(), read_frame_internal(), read_gab2_sub(), read_interval_packets(), read_packet(), read_thread(), receive_locked(), rechunk_filter(), recode_subtitle(), reset_packet(), rkmpp_receive_frame(), rm_assemble_video_frame(), rm_read_packet(), rtp_mpegts_write_packet(), run_test(), sch_enc_send(), decklink_output_callback::ScheduledFrameCompleted(), seek_frame_generic(), seek_subtitle(), set_output_frame(), setts_filter(), signal_init_ts(), storeframe(), str_read_close(), str_read_packet(), stream_params_copy(), submit_packet(), tdsc_decode_jpeg_tile(), tee_write_packet(), text2movsub(), trace_headers(), truehd_core_filter(), tta_encode_frame(), tta_queue_flush(), update_context_from_user(), v4l2_m2m_destroy_context(), v4l2_receive_frame(), vfw_read_close(), video_decode(), video_decode_example(), vp8_lossy_decode_frame(), vp9_superframe_filter(), vp9_superframe_flush(), vp9_superframe_split_filter(), vp9_superframe_split_flush(), vtenc_frame(), vvc_mp4toannexb_filter(), vvc_parser_close(), write_muxed_file(), write_packet(), write_packets_from_bsfs(), write_trailer(), xiph_handle_packet(), yop_read_close(), yop_read_packet(), and yop_read_seek().
Move every field in src to dst and reset src.
src | Source packet, will be reset |
dst | Destination packet |
Definition at line 487 of file packet.c.
Referenced by asf_read_packet(), audio_read_packet(), av1_frame_merge_filter(), av1_frame_split_filter(), av_bsf_send_packet(), avcodec_receive_packet(), avpriv_packet_list_put(), container_packet_transfer(), dts2pts_filter(), dump_extradata(), evc_frame_merge_filter(), ff_bsf_get_packet_ref(), ff_hw_base_encode_receive_packet(), ff_interleave_add_packet(), ff_qsv_encode(), ff_thread_get_packet(), ff_thread_video_encode_frame(), ffat_decode_callback(), frame_merge_output(), get_subtitle_pkt(), h264_mp4toannexb_filter(), handle_eac3(), hevc_mp4toannexb_filter(), hls_read_packet(), lavfi_read_packet(), LLVMFuzzerTestOneInput(), mjpega_dump_header(), moflex_read_packet(), mux_queue_packet(), nsv_read_packet(), packet_queue_get(), packet_queue_put(), parse_nal_units(), rechunk_filter(), rm_assemble_video_frame(), setts_filter(), submit_packet(), vp9_raw_reorder_make_output(), vp9_superframe_filter(), vp9_superframe_split_filter(), vvc_mp4toannexb_filter(), wc3_read_packet(), and yop_read_packet().
Copy only "properties" fields from src to dst.
Properties for the purpose of this function are all the fields beside those related to the packet data (buf, data, size)
dst | Destination packet |
src | Source packet |
Definition at line 393 of file packet.c.
Referenced by av_packet_ref(), av_write_frame(), dump_extradata(), extract_packet_props(), ff_reshuffle_raw_rgb(), filter(), frame_merge_filter(), h264_mp4toannexb_filter(), hevc_mp4toannexb_filter(), imx_dump_header(), mjpeg2jpeg_filter(), mjpega_dump_header(), rechunk_filter(), recode_subtitle(), sch_mux_sub_heartbeat(), text2movsub(), update_context_from_user(), vp9_superframe_filter(), and vvc_mp4toannexb_filter().
int av_packet_make_refcounted | ( | AVPacket * | pkt | ) |
Ensure the data described by a given packet is reference counted.
pkt | packet whose data should be made reference counted. |
Definition at line 493 of file packet.c.
Referenced by av_bsf_send_packet(), avpriv_packet_list_put(), ff_decklink_packet_queue_put(), ff_interleave_add_packet(), ff_read_packet(), ffmmal_add_packet(), LLVMFuzzerTestOneInput(), parse_packet(), and prepare_input_packet().
int av_packet_make_writable | ( | AVPacket * | pkt | ) |
Create a writable reference for the data described by a given packet, avoiding data copy if possible.
pkt | Packet whose data should be made writable. |
Definition at line 512 of file packet.c.
Referenced by decode_frame(), dv_error_marker_filter(), ftr_decode_frame(), imm5_decode_frame(), mov_write_packet(), mpeg4_unpack_bframes_filter(), noise(), prores_metadata(), and truehd_core_filter().
void av_packet_rescale_ts | ( | AVPacket * | pkt, |
AVRational | tb_src, | ||
AVRational | tb_dst | ||
) |
Convert valid timing fields (timestamps / durations) in a packet from one timebase to another.
Timestamps with unknown values (AV_NOPTS_VALUE) will be ignored.
pkt | packet on which the conversion will be performed |
tb_src | source timebase, in which the timing fields in pkt are expressed |
tb_dst | destination timebase, to which the timing fields will be converted |
Definition at line 534 of file packet.c.
Referenced by demux_send(), encode_write(), encode_write_frame(), ff_write_chained(), fifo_thread_write_packet(), main(), mov_write_ttml_document_from_queue(), mux_fixup_ts(), mux_packet_filter(), rechunk_filter(), tee_write_packet(), write_frame(), and write_packets_from_bsfs().
struct AVContainerFifo* av_container_fifo_alloc_avpacket | ( | unsigned | flags | ) |
Allocate an AVContainerFifo instance for AVPacket.
flags | currently unused |
Definition at line 782 of file packet.c.
Referenced by sq_add_stream(), and tq_alloc().