22#ifndef AVFORMAT_MPEGTS_H
23#define AVFORMAT_MPEGTS_H
27#define TS_FEC_PACKET_SIZE 204
28#define TS_DVHS_PACKET_SIZE 192
29#define TS_PACKET_SIZE 188
30#define TS_MAX_PACKET_SIZE 204
32#define NB_PID_MAX 8192
33#define USUAL_SECTION_SIZE 1024
34#define MAX_SECTION_SIZE 4096
37#define STUFFING_BYTE 0xFF
38#define SYSTEM_CLOCK_FREQUENCY_DIVISOR 300
43#define TSDT_PID 0x0002
44#define IPMP_PID 0x0003
53#define NET_SYNC_PID 0x0015
59#define LINK_LOCAL_PID 0x001C
60#define MEASUREMENT_PID 0x001D
65#define FIRST_OTHER_PID 0x0020
66#define LAST_OTHER_PID 0x1FFA
70#define NULL_PID 0x1FFF
73#define M2TS_PMT_PID 0x0100
74#define M2TS_PCR_PID 0x1001
75#define M2TS_VIDEO_PID 0x1011
76#define M2TS_VIDEO_EL_PID 0x1015
77#define M2TS_AUDIO_START_PID 0x1100
78#define M2TS_PGSSUB_START_PID 0x1200
79#define M2TS_TEXTSUB_PID 0x1800
80#define M2TS_SECONDARY_AUDIO_START_PID 0x1A00
81#define M2TS_SECONDARY_VIDEO_START_PID 0x1B00
102#define EITS_START_TID 0x50
103#define EITS_END_TID 0x5F
104#define OEITS_START_TID 0x60
105#define OEITS_END_TID 0x6F
114#define MPE_FEC_TID 0x78
116#define MPE_IFEC_TID 0x7A
117#define PROTMT_TID 0x7B
125#define STREAM_TYPE_VIDEO_MPEG1 0x01
126#define STREAM_TYPE_VIDEO_MPEG2 0x02
127#define STREAM_TYPE_AUDIO_MPEG1 0x03
128#define STREAM_TYPE_AUDIO_MPEG2 0x04
129#define STREAM_TYPE_PRIVATE_SECTION 0x05
130#define STREAM_TYPE_PRIVATE_DATA 0x06
131#define STREAM_TYPE_AUDIO_AAC 0x0f
132#define STREAM_TYPE_AUDIO_AAC_LATM 0x11
133#define STREAM_TYPE_VIDEO_MPEG4 0x10
136#define STREAM_TYPE_ISO_IEC_14496_PES 0x12
139#define STREAM_TYPE_ISO_IEC_14496_SECTION 0x13
140#define STREAM_TYPE_METADATA 0x15
141#define STREAM_TYPE_VIDEO_H264 0x1b
144#define STREAM_TYPE_AUDIO_MPEG4 0x1c
145#define STREAM_TYPE_VIDEO_MVC 0x20
146#define STREAM_TYPE_VIDEO_JPEG2000 0x21
147#define STREAM_TYPE_VIDEO_HEVC 0x24
148#define STREAM_TYPE_VIDEO_JPEGXS 0x32
149#define STREAM_TYPE_VIDEO_VVC 0x33
150#define STREAM_TYPE_VIDEO_LCEVC 0x36
151#define STREAM_TYPE_VIDEO_CAVS 0x42
152#define STREAM_TYPE_VIDEO_AVS2 0xd2
153#define STREAM_TYPE_VIDEO_AVS3 0xd4
154#define STREAM_TYPE_VIDEO_VC1 0xea
155#define STREAM_TYPE_VIDEO_DIRAC 0xd1
158#define STREAM_TYPE_BLURAY_AUDIO_PCM_BLURAY 0x80
159#define STREAM_TYPE_BLURAY_AUDIO_AC3 0x81
160#define STREAM_TYPE_BLURAY_AUDIO_DTS 0x82
161#define STREAM_TYPE_BLURAY_AUDIO_TRUEHD 0x83
162#define STREAM_TYPE_BLURAY_AUDIO_EAC3 0x84
163#define STREAM_TYPE_BLURAY_AUDIO_DTS_HD 0x85
164#define STREAM_TYPE_BLURAY_AUDIO_DTS_HD_MASTER 0x86
165#define STREAM_TYPE_BLURAY_AUDIO_EAC3_SECONDARY 0xa1
166#define STREAM_TYPE_BLURAY_AUDIO_DTS_EXPRESS_SECONDARY 0xa2
167#define STREAM_TYPE_BLURAY_SUBTITLE_PGS 0x90
168#define STREAM_TYPE_BLURAY_SUBTITLE_TEXT 0x92
170#define STREAM_TYPE_SCTE_DATA_SCTE_35 0x86
172#define STREAM_TYPE_ATSC_AUDIO_AC3 0x81
173#define STREAM_TYPE_ATSC_AUDIO_EAC3 0x87
178#define STREAM_TYPE_HLS_SE_VIDEO_H264 0xdb
179#define STREAM_TYPE_HLS_SE_AUDIO_AAC 0xcf
180#define STREAM_TYPE_HLS_SE_AUDIO_AC3 0xc1
181#define STREAM_TYPE_HLS_SE_AUDIO_EAC3 0xc2
185#define STREAM_ID_PROGRAM_STREAM_MAP 0xbc
186#define STREAM_ID_PRIVATE_STREAM_1 0xbd
187#define STREAM_ID_PADDING_STREAM 0xbe
188#define STREAM_ID_PRIVATE_STREAM_2 0xbf
189#define STREAM_ID_AUDIO_STREAM_0 0xc0
190#define STREAM_ID_VIDEO_STREAM_0 0xe0
191#define STREAM_ID_ECM_STREAM 0xf0
192#define STREAM_ID_EMM_STREAM 0xf1
193#define STREAM_ID_DSMCC_STREAM 0xf2
194#define STREAM_ID_TYPE_E_STREAM 0xf8
195#define STREAM_ID_METADATA_STREAM 0xfc
196#define STREAM_ID_EXTENDED_STREAM_ID 0xfd
197#define STREAM_ID_PROGRAM_STREAM_DIRECTORY 0xff
200#define VIDEO_STREAM_DESCRIPTOR 0x02
201#define REGISTRATION_DESCRIPTOR 0x05
202#define ISO_639_LANGUAGE_DESCRIPTOR 0x0a
203#define IOD_DESCRIPTOR 0x1d
204#define SL_DESCRIPTOR 0x1e
205#define FMC_DESCRIPTOR 0x1f
206#define METADATA_DESCRIPTOR 0x26
207#define METADATA_STD_DESCRIPTOR 0x27
208#define EXTENSION_DESCRIPTOR 0x3f
212#define JXS_VIDEO_DESCRIPTOR 0x14
213#define LCEVC_VIDEO_DESCRIPTOR 0x17
214#define LCEVC_LINKAGE_DESCRIPTOR 0x18
218#define NETWORK_NAME_DESCRIPTOR 0x40
219#define SERVICE_LIST_DESCRIPTOR 0x41
220#define SERVICE_DESCRIPTOR 0x48
221#define STREAM_IDENTIFIER_DESCRIPTOR 0x52
222#define TELETEXT_DESCRIPTOR 0x56
223#define SUBTITLING_DESCRIPTOR 0x59
224#define AC3_DESCRIPTOR 0x6a
225#define ENHANCED_AC3_DESCRIPTOR 0x7a
226#define DTS_DESCRIPTOR 0x7b
227#define DVB_EXTENSION_DESCRIPTOR 0x7f
231#define SUPPLEMENTARY_AUDIO_DESCRIPTOR 0x06
232#define AC4_DESCRIPTOR 0x15
236#define DOVI_VIDEO_STREAM_DESCRIPTOR 0xb0
238#define DATA_COMPONENT_DESCRIPTOR 0xfd
244 const uint8_t *buf,
int len);
297 const uint8_t **pp,
const uint8_t *desc_list_end,
298 Mp4Descr *mp4_descr,
int mp4_descr_count,
int pid,
static const uint16_t fc[]
void avpriv_mpegts_parse_close(MpegTSContext *ts)
int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type, int prg_id, const uint8_t **pp, const uint8_t *desc_list_end, Mp4Descr *mp4_descr, int mp4_descr_count, int pid, MpegTSContext *ts)
Parse an MPEG-2 descriptor.
int ff_check_h264_startcode(AVFormatContext *s, const AVStream *st, const AVPacket *pkt)
Check presence of H264 startcode.
MpegTSContext * avpriv_mpegts_parse_open(AVFormatContext *s)
int avpriv_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt, const uint8_t *buf, int len)
This structure stores compressed data.
uint8_t component_type_flag
uint8_t * dec_config_descr