FFmpeg  4.0
Data Structures | Macros | Functions
mpegts.h File Reference
#include "avformat.h"

Go to the source code of this file.

Data Structures

struct  SLConfigDescr
 
struct  Mp4Descr
 

Macros

#define TS_FEC_PACKET_SIZE   204
 
#define TS_DVHS_PACKET_SIZE   192
 
#define TS_PACKET_SIZE   188
 
#define TS_MAX_PACKET_SIZE   204
 
#define NB_PID_MAX   8192
 
#define MAX_SECTION_SIZE   4096
 
#define PAT_PID   0x0000
 
#define SDT_PID   0x0011
 
#define PAT_TID   0x00
 
#define PMT_TID   0x02
 
#define M4OD_TID   0x05
 
#define SDT_TID   0x42
 
#define STREAM_TYPE_VIDEO_MPEG1   0x01
 
#define STREAM_TYPE_VIDEO_MPEG2   0x02
 
#define STREAM_TYPE_AUDIO_MPEG1   0x03
 
#define STREAM_TYPE_AUDIO_MPEG2   0x04
 
#define STREAM_TYPE_PRIVATE_SECTION   0x05
 
#define STREAM_TYPE_PRIVATE_DATA   0x06
 
#define STREAM_TYPE_AUDIO_AAC   0x0f
 
#define STREAM_TYPE_AUDIO_AAC_LATM   0x11
 
#define STREAM_TYPE_VIDEO_MPEG4   0x10
 
#define STREAM_TYPE_METADATA   0x15
 
#define STREAM_TYPE_VIDEO_H264   0x1b
 
#define STREAM_TYPE_VIDEO_HEVC   0x24
 
#define STREAM_TYPE_VIDEO_CAVS   0x42
 
#define STREAM_TYPE_VIDEO_VC1   0xea
 
#define STREAM_TYPE_VIDEO_DIRAC   0xd1
 
#define STREAM_TYPE_AUDIO_AC3   0x81
 
#define STREAM_TYPE_AUDIO_DTS   0x82
 
#define STREAM_TYPE_AUDIO_TRUEHD   0x83
 
#define STREAM_TYPE_AUDIO_EAC3   0x87
 

Functions

MpegTSContextavpriv_mpegts_parse_open (AVFormatContext *s)
 
int avpriv_mpegts_parse_packet (MpegTSContext *ts, AVPacket *pkt, const uint8_t *buf, int len)
 
void avpriv_mpegts_parse_close (MpegTSContext *ts)
 
int ff_parse_mpeg2_descriptor (AVFormatContext *fc, AVStream *st, int stream_type, 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. More...
 
int ff_check_h264_startcode (AVFormatContext *s, const AVStream *st, const AVPacket *pkt)
 Check presence of H264 startcode. More...
 

Macro Definition Documentation

◆ TS_FEC_PACKET_SIZE

#define TS_FEC_PACKET_SIZE   204

Definition at line 27 of file mpegts.h.

Referenced by get_packet_size(), mpegts_probe(), and reanalyze().

◆ TS_DVHS_PACKET_SIZE

#define TS_DVHS_PACKET_SIZE   192

Definition at line 28 of file mpegts.h.

Referenced by get_packet_size(), mpegts_probe(), and reanalyze().

◆ TS_PACKET_SIZE

#define TS_PACKET_SIZE   188

◆ TS_MAX_PACKET_SIZE

#define TS_MAX_PACKET_SIZE   204

Definition at line 30 of file mpegts.h.

Referenced by analyze().

◆ NB_PID_MAX

#define NB_PID_MAX   8192

Definition at line 32 of file mpegts.h.

Referenced by handle_packets(), m4sl_cb(), mpegts_free(), mpegts_open_filter(), and mpegts_read_packet().

◆ MAX_SECTION_SIZE

#define MAX_SECTION_SIZE   4096

Definition at line 33 of file mpegts.h.

Referenced by mpegts_open_section_filter().

◆ PAT_PID

#define PAT_PID   0x0000

Definition at line 36 of file mpegts.h.

Referenced by avpriv_mpegts_parse_open(), mpegts_init(), and mpegts_read_header().

◆ SDT_PID

#define SDT_PID   0x0011

Definition at line 37 of file mpegts.h.

Referenced by avpriv_mpegts_parse_open(), mpegts_init(), and mpegts_read_header().

◆ PAT_TID

#define PAT_TID   0x00

Definition at line 40 of file mpegts.h.

Referenced by mpegts_write_pat(), and pat_cb().

◆ PMT_TID

#define PMT_TID   0x02

Definition at line 41 of file mpegts.h.

Referenced by mpegts_write_pmt(), and pmt_cb().

◆ M4OD_TID

#define M4OD_TID   0x05

Definition at line 42 of file mpegts.h.

Referenced by m4sl_cb().

◆ SDT_TID

#define SDT_TID   0x42

Definition at line 43 of file mpegts.h.

Referenced by mpegts_write_sdt(), mpegts_write_section1(), and sdt_cb().

◆ STREAM_TYPE_VIDEO_MPEG1

#define STREAM_TYPE_VIDEO_MPEG1   0x01

Definition at line 45 of file mpegts.h.

◆ STREAM_TYPE_VIDEO_MPEG2

#define STREAM_TYPE_VIDEO_MPEG2   0x02

Definition at line 46 of file mpegts.h.

◆ STREAM_TYPE_AUDIO_MPEG1

#define STREAM_TYPE_AUDIO_MPEG1   0x03

Definition at line 47 of file mpegts.h.

◆ STREAM_TYPE_AUDIO_MPEG2

#define STREAM_TYPE_AUDIO_MPEG2   0x04

Definition at line 48 of file mpegts.h.

◆ STREAM_TYPE_PRIVATE_SECTION

#define STREAM_TYPE_PRIVATE_SECTION   0x05

Definition at line 49 of file mpegts.h.

◆ STREAM_TYPE_PRIVATE_DATA

#define STREAM_TYPE_PRIVATE_DATA   0x06

Definition at line 50 of file mpegts.h.

◆ STREAM_TYPE_AUDIO_AAC

#define STREAM_TYPE_AUDIO_AAC   0x0f

Definition at line 51 of file mpegts.h.

◆ STREAM_TYPE_AUDIO_AAC_LATM

#define STREAM_TYPE_AUDIO_AAC_LATM   0x11

Definition at line 52 of file mpegts.h.

Referenced by mpegts_write_pmt().

◆ STREAM_TYPE_VIDEO_MPEG4

#define STREAM_TYPE_VIDEO_MPEG4   0x10

Definition at line 53 of file mpegts.h.

◆ STREAM_TYPE_METADATA

#define STREAM_TYPE_METADATA   0x15

Definition at line 54 of file mpegts.h.

Referenced by mpegts_write_pmt().

◆ STREAM_TYPE_VIDEO_H264

#define STREAM_TYPE_VIDEO_H264   0x1b

Definition at line 55 of file mpegts.h.

◆ STREAM_TYPE_VIDEO_HEVC

#define STREAM_TYPE_VIDEO_HEVC   0x24

Definition at line 56 of file mpegts.h.

Referenced by mpegts_write_pmt().

◆ STREAM_TYPE_VIDEO_CAVS

#define STREAM_TYPE_VIDEO_CAVS   0x42

Definition at line 57 of file mpegts.h.

◆ STREAM_TYPE_VIDEO_VC1

#define STREAM_TYPE_VIDEO_VC1   0xea

Definition at line 58 of file mpegts.h.

Referenced by mpegts_write_pmt().

◆ STREAM_TYPE_VIDEO_DIRAC

#define STREAM_TYPE_VIDEO_DIRAC   0xd1

Definition at line 59 of file mpegts.h.

Referenced by mpegts_write_pmt().

◆ STREAM_TYPE_AUDIO_AC3

#define STREAM_TYPE_AUDIO_AC3   0x81

Definition at line 61 of file mpegts.h.

◆ STREAM_TYPE_AUDIO_DTS

#define STREAM_TYPE_AUDIO_DTS   0x82

Definition at line 62 of file mpegts.h.

Referenced by mpegts_write_pmt().

◆ STREAM_TYPE_AUDIO_TRUEHD

#define STREAM_TYPE_AUDIO_TRUEHD   0x83

Definition at line 63 of file mpegts.h.

Referenced by mpegts_write_pmt().

◆ STREAM_TYPE_AUDIO_EAC3

#define STREAM_TYPE_AUDIO_EAC3   0x87

Definition at line 64 of file mpegts.h.

Referenced by mpegts_write_pmt().

Function Documentation

◆ avpriv_mpegts_parse_open()

MpegTSContext* avpriv_mpegts_parse_open ( AVFormatContext s)

Definition at line 2933 of file mpegts.c.

Referenced by get_sockaddr(), iec61883_read_header(), and mpegts_init().

◆ avpriv_mpegts_parse_packet()

int avpriv_mpegts_parse_packet ( MpegTSContext ts,
AVPacket pkt,
const uint8_t buf,
int  len 
)

◆ avpriv_mpegts_parse_close()

void avpriv_mpegts_parse_close ( MpegTSContext ts)

Definition at line 2977 of file mpegts.c.

Referenced by ff_rtsp_close_streams(), iec61883_close(), and mpegts_close_context().

◆ ff_parse_mpeg2_descriptor()

int ff_parse_mpeg2_descriptor ( AVFormatContext fc,
AVStream st,
int  stream_type,
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.

Parameters
[in]fcFormat context (used for logging only)
stStream
stream_typeSTREAM_TYPE_xxx
ppDescriptor buffer pointer
desc_list_endEnd of buffer
Returns
<0 to stop processing

Definition at line 1647 of file mpegts.c.

Referenced by parse_chunks(), and pmt_cb().

◆ ff_check_h264_startcode()

int ff_check_h264_startcode ( AVFormatContext s,
const AVStream st,
const AVPacket pkt 
)

Check presence of H264 startcode.

Returns
<0 to stop processing

Definition at line 1430 of file mpegtsenc.c.

Referenced by avi_write_packet(), mpegts_write_packet_internal(), and write_packet().