World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Структура AVPacket

#include <avcodec.h>

+ Граф связей класса AVPacket:

Открытые атрибуты

AVBufferRefbuf
 
int64_t pts
 
int64_t dts
 
uint8_tdata
 
int size
 
int stream_index
 
int flags
 
AVPacketSideDataside_data
 
int side_data_elems
 
int64_t duration
 
int64_t pos
 byte position in stream, -1 if unknown Подробнее...
 
attribute_deprecated int64_t convergence_duration
 

Подробное описание

This structure stores compressed data. It is typically exported by demuxers and then passed as input to decoders, or received as output from encoders and then passed to muxers.

For video, it should typically contain one compressed frame. For audio it may contain several compressed frames. Encoders are allowed to output empty packets, with no compressed data, containing only side data (e.g. to update some stream parameters at the end of encoding).

AVPacket is one of the few structs in FFmpeg, whose size is a part of public ABI. Thus it may be allocated on stack and no new fields can be added to it without libavcodec and libavformat major bump.

The semantics of data ownership depends on the buf field. If it is set, the packet data is dynamically allocated and is valid indefinitely until a call to av_packet_unref() reduces the reference count to 0.

If the buf field is not set av_packet_ref() would make a copy instead of increasing the reference count.

The side data is always allocated with av_malloc(), copied by av_packet_ref() and freed by av_packet_unref().

См. также
av_packet_ref
av_packet_unref

См. определение в файле avcodec.h строка 1454

Данные класса

◆ buf

AVBufferRef* AVPacket::buf

A reference to the reference-counted buffer where the packet data is stored. May be NULL, then the packet data is not reference-counted.

См. определение в файле avcodec.h строка 1460

◆ pts

int64_t AVPacket::pts

Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will be presented to the user. Can be AV_NOPTS_VALUE if it is not stored in the file. pts MUST be larger or equal to dts as presentation cannot happen before decompression, unless one wants to view hex dumps. Some formats misuse the terms dts and pts/cts to mean something different. Such timestamps must be converted to true pts/dts before they are stored in AVPacket.

См. определение в файле avcodec.h строка 1470

Используется в Movie::GetFrame().

◆ dts

int64_t AVPacket::dts

Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed. Can be AV_NOPTS_VALUE if it is not stored in the file.

См. определение в файле avcodec.h строка 1476

◆ data

uint8_t* AVPacket::data

См. определение в файле avcodec.h строка 1477

◆ size

int AVPacket::size

См. определение в файле avcodec.h строка 1478

◆ stream_index

int AVPacket::stream_index

См. определение в файле avcodec.h строка 1479

Используется в Movie::GetFrame().

◆ flags

int AVPacket::flags

A combination of AV_PKT_FLAG values

См. определение в файле avcodec.h строка 1483

◆ side_data

AVPacketSideData* AVPacket::side_data

Additional packet data that can be provided by the container. Packet can contain several types of side information.

См. определение в файле avcodec.h строка 1488

◆ side_data_elems

int AVPacket::side_data_elems

См. определение в файле avcodec.h строка 1489

◆ duration

int64_t AVPacket::duration

Duration of this packet in AVStream->time_base units, 0 if unknown. Equals next_pts - this_pts in presentation order.

См. определение в файле avcodec.h строка 1495

◆ pos

int64_t AVPacket::pos

byte position in stream, -1 if unknown

См. определение в файле avcodec.h строка 1497

◆ convergence_duration

attribute_deprecated int64_t AVPacket::convergence_duration
Уст.:
Same as the duration field, but as int64_t. This was required for Matroska subtitles, whose duration values could overflow when the duration field was still an int.

См. определение в файле avcodec.h строка 1506


Объявления и описания членов структуры находятся в файле: