22 #ifndef GAVL_COMPRESSION_H_INCLUDED 23 #define GAVL_COMPRESSION_H_INCLUDED 25 #include <gavl/gavldefs.h> 45 #define GAVL_COMPRESSION_HAS_P_FRAMES (1<<0) 46 #define GAVL_COMPRESSION_HAS_B_FRAMES (1<<1) 47 #define GAVL_COMPRESSION_HAS_FIELD_PICTURES (1<<2) 48 #define GAVL_COMPRESSION_SBR (1<<3) 145 #define GAVL_PACKET_TYPE_I 'I' 146 #define GAVL_PACKET_TYPE_P 'P' 147 #define GAVL_PACKET_TYPE_B 'B' 148 #define GAVL_PACKET_TYPE_MASK 0xff 150 #define GAVL_PACKET_KEYFRAME (1<<8) 151 #define GAVL_PACKET_LAST (1<<9) 216 #endif // GAVL_COMPRESSION_H_INCLUDED int data_len
Length of data.
Definition: compression.h:169
Complete DIRAC frames, sequence end code appended to last packet.
Definition: compression.h:72
int64_t pts
Presentation time.
Definition: compression.h:174
MPEG-1 video.
Definition: compression.h:67
GAVL_PUBLIC void gavl_compression_info_dump(const gavl_compression_info_t *info)
Dump a compression info to stderr.
AAC as stored in quicktime/mp4.
Definition: compression.h:59
MPEG-1 audio layer II.
Definition: compression.h:56
int data_alloc
How many bytes got allocated.
Definition: compression.h:170
GAVL_PUBLIC void gavl_packet_free(gavl_packet_t *p)
Free memory of a packet.
uint8_t * global_header
Global header.
Definition: compression.h:91
int64_t duration
Duration of the contained frame.
Definition: compression.h:175
MPEG-4 ASP (a.k.a. Divx4)
Definition: compression.h:69
int header_size
Size of a repeated global header (or 0)
Definition: compression.h:178
GAVL_PUBLIC void gavl_compression_info_free(gavl_compression_info_t *info)
Free all dynamically allocated memory of a compression info.
Compression format.
Definition: compression.h:86
uint8_t * data
Data.
Definition: compression.h:168
int palette_size
Size of the embedded palette for image codecs.
Definition: compression.h:95
H.264 (Annex B)
Definition: compression.h:70
GAVL_PUBLIC void gavl_packet_dump(const gavl_packet_t *p)
Dump a packet to stderr.
int global_header_len
Length of global header.
Definition: compression.h:92
Vorbis (segmented extradata and packets)
Definition: compression.h:60
int field2_offset
Offset of field 2 for field pictures.
Definition: compression.h:177
gavl_codec_id_t id
Codec ID.
Definition: compression.h:89
TIFF image.
Definition: compression.h:65
alaw 2:1
Definition: compression.h:54
JPEG image.
Definition: compression.h:63
GAVL_PUBLIC const char * gavl_compression_get_extension(gavl_codec_id_t id, int *separate)
Get the file extension of the corresponding raw format.
Unknown/unsupported compression format.
Definition: compression.h:52
MPEG-1/2 audio layer 3 CBR/VBR.
Definition: compression.h:57
MPEG-2 video.
Definition: compression.h:68
TGA image.
Definition: compression.h:66
gavl_codec_id_t
Definition: compression.h:50
DV (several variants)
Definition: compression.h:73
int flags
ORed combination of GAVL_PACKET_* flags.
Definition: compression.h:172
int sequence_end_pos
Position of sequence end code if any.
Definition: compression.h:179
Theora (segmented extradata.
Definition: compression.h:71
PNG image.
Definition: compression.h:64
GAVL_PUBLIC int gavl_compression_need_pixelformat(gavl_codec_id_t id)
Check if the compression supports multiple pixelformats.
mu-law 2:1
Definition: compression.h:55
int bitrate
Needed by some codecs, negative values mean VBR.
Definition: compression.h:94
GAVL_PUBLIC void gavl_packet_alloc(gavl_packet_t *p, int len)
Allocate memory for a packet.
Packet structure.
Definition: compression.h:166
AC3.
Definition: compression.h:58
int flags
ORed combination of GAVL_COMPRESSION_* flags.
Definition: compression.h:88