FFmpeg
Loading...
Searching...
No Matches
mpegts.c File Reference
#include "config_components.h"
#include "libavutil/attributes_internal.h"
#include "libavutil/buffer.h"
#include "libavutil/crc.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "libavutil/dict.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/avassert.h"
#include "libavutil/dovi_meta.h"
#include "libavcodec/bytestream.h"
#include "libavcodec/defs.h"
#include "libavcodec/get_bits.h"
#include "libavcodec/opus/opus.h"
#include "avformat.h"
#include "mpegts.h"
#include "internal.h"
#include "avio_internal.h"
#include "demux.h"
#include "mpeg.h"
#include "isom.h"
#include "id3v2.h"

Go to the source code of this file.

Data Structures

struct  MpegTSPESFilter
 
struct  MpegTSSectionFilter
 
struct  MpegTSFilter
 
struct  Stream
 
struct  StreamGroup
 
struct  Program
 
struct  MpegTSContext
 
struct  PESContext
 
struct  SectionHeader
 
struct  StreamType
 
struct  MP4DescrParseContext
 

Macros

#define MAX_RESYNC_SIZE   65536
 
#define TS_PAYLOAD_SIZE   (TS_PACKET_SIZE - 4)
 
#define MAX_MP4_DESCR_COUNT   16
 
#define MOD_UNLIKELY(modulus, dividend, divisor, prev_dividend)
 
#define PROBE_PACKET_MAX_BUF   8192
 
#define PROBE_PACKET_MARGIN   5
 
#define MAX_STREAMS_PER_PROGRAM   128
 
#define MAX_PIDS_PER_PROGRAM   (MAX_STREAMS_PER_PROGRAM + 2)
 
#define MPEGTS_OPTIONS
 
#define PES_START_SIZE   6
 
#define PES_HEADER_SIZE   9
 
#define MAX_PES_HEADER_SIZE   (9 + 255)
 
#define MAX_LEVEL   4
 
#define R8_CHECK_CLIP_MAX(dst, maxv)
 
#define CHECK_COUNT   10
 
#define CHECK_BLOCK   100
 
#define MAX_PACKET_READAHEAD   ((128 * 1024) / 188)
 

Typedefs

typedef int PESCallback(MpegTSFilter *f, const uint8_t *buf, int len, int is_start, int64_t pos)
 
typedef void SectionCallback(MpegTSFilter *f, const uint8_t *buf, int len)
 
typedef void SetServiceCallback(void *opaque, int ret)
 

Enumerations

enum  MpegTSFilterType { MPEGTS_PES , MPEGTS_SECTION , MPEGTS_PCR }
 
enum  MpegTSState {
  MPEGTS_HEADER = 0 , MPEGTS_PESHEADER , MPEGTS_PESHEADER_FILL , MPEGTS_PAYLOAD ,
  MPEGTS_SKIP
}
 

Functions

static struct Programget_program (MpegTSContext *ts, unsigned int programid)
 
static void clear_avprogram (MpegTSContext *ts, unsigned int programid)
 
static void clear_program (struct Program *p)
 
static void clear_programs (MpegTSContext *ts)
 
static struct Programadd_program (MpegTSContext *ts, unsigned int programid)
 
static void add_pid_to_program (struct Program *p, unsigned int pid)
 
static void update_av_program_info (AVFormatContext *s, unsigned int programid, unsigned int pid, int version)
 
static int discard_pid (MpegTSContext *ts, unsigned int pid)
 discard_pid() decides if the pid is to be discarded according to caller's programs selection
 
static void write_section_data (MpegTSContext *ts, MpegTSFilter *tss1, const uint8_t *buf, int buf_size, int is_start)
 Assemble PES packets out of TS packets, and then call the "section_cb" function when they are complete.
 
static MpegTSFiltermpegts_open_filter (MpegTSContext *ts, unsigned int pid, enum MpegTSFilterType type)
 
static MpegTSFiltermpegts_open_section_filter (MpegTSContext *ts, unsigned int pid, SectionCallback *section_cb, void *opaque, int check_crc)
 
static MpegTSFiltermpegts_open_pes_filter (MpegTSContext *ts, unsigned int pid, PESCallback *pes_cb, void *opaque)
 
static MpegTSFiltermpegts_open_pcr_filter (MpegTSContext *ts, unsigned int pid)
 
static void mpegts_close_filter (MpegTSContext *ts, MpegTSFilter *filter)
 
static int analyze (const uint8_t *buf, int size, int packet_size, int probe)
 
static int get_packet_size (AVFormatContext *s)
 
static int skip_identical (const SectionHeader *h, MpegTSSectionFilter *tssf)
 
static int get8 (const uint8_t **pp, const uint8_t *p_end)
 
static int get16 (const uint8_t **pp, const uint8_t *p_end)
 
static char * getstr8 (const uint8_t **pp, const uint8_t *p_end)
 
static int parse_section_header (SectionHeader *h, const uint8_t **pp, const uint8_t *p_end)
 
static void mpegts_find_stream_type (AVStream *st, uint32_t stream_type, const StreamType *types)
 
static int mpegts_set_stream_info (AVStream *st, PESContext *pes, uint32_t stream_type, uint32_t prog_reg_desc)
 
static void reset_pes_packet_state (PESContext *pes)
 
static void new_data_packet (const uint8_t *buffer, int len, AVPacket *pkt)
 
static int timed_id3_update_metadata (AVStream *s, AVPacket *pkt)
 
static int new_pes_packet (PESContext *pes, AVPacket *pkt)
 
static uint64_t get_ts64 (GetBitContext *gb, int bits)
 
static int read_sl_header (PESContext *pes, SLConfigDescr *sl, const uint8_t *buf, int buf_size)
 
static AVBufferRefbuffer_pool_get (MpegTSContext *ts, int size)
 
static int mpegts_push_data (MpegTSFilter *filter, const uint8_t *buf, int buf_size, int is_start, int64_t pos)
 
static PESContextadd_pes_stream (MpegTSContext *ts, int pid, int pcr_pid)
 
static int init_MP4DescrParseContext (MP4DescrParseContext *d, AVFormatContext *s, const uint8_t *buf, unsigned size, Mp4Descr *descr, int max_descr_count)
 
static void update_offsets (AVIOContext *pb, int64_t *off, int *len)
 
static int parse_mp4_descr (MP4DescrParseContext *d, int64_t off, int len, int target_tag)
 
static int parse_mp4_descr_arr (MP4DescrParseContext *d, int64_t off, int len)
 
static int parse_MP4IODescrTag (MP4DescrParseContext *d, int64_t off, int len)
 
static int parse_MP4ODescrTag (MP4DescrParseContext *d, int64_t off, int len)
 
static int parse_MP4ESDescrTag (MP4DescrParseContext *d, int64_t off, int len)
 
static int parse_MP4DecConfigDescrTag (MP4DescrParseContext *d, int64_t off, int len)
 
static int parse_MP4SLDescrTag (MP4DescrParseContext *d, int64_t off, int len)
 
static int mp4_read_iods (AVFormatContext *s, const uint8_t *buf, unsigned size, Mp4Descr *descr, int *descr_count, int max_descr_count)
 
static int mp4_read_od (AVFormatContext *s, const uint8_t *buf, unsigned size, Mp4Descr *descr, int *descr_count, int max_descr_count)
 
static void m4sl_cb (MpegTSFilter *filter, const uint8_t *section, int section_len)
 
static void scte_data_cb (MpegTSFilter *filter, const uint8_t *section, int section_len)
 
static int parse_mpeg2_extension_descriptor (AVFormatContext *fc, AVStream *st, int prg_id, const uint8_t **pp, const uint8_t *desc_end, 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.
 
static AVStreamfind_matching_stream (MpegTSContext *ts, int pid, unsigned int programid, int stream_identifier, int pmt_stream_idx, struct Program *p)
 
static int parse_stream_identifier_desc (const uint8_t *p, const uint8_t *p_end)
 
static int is_pes_stream (int stream_type, uint32_t prog_reg_desc)
 
static void detect_bdmv_dovi_group (MpegTSContext *ts, struct Program *prg, uint32_t prog_reg_desc)
 
static void create_stream_groups (MpegTSContext *ts, struct Program *prg)
 
static void pmt_cb (MpegTSFilter *filter, const uint8_t *section, int section_len)
 
static void pat_cb (MpegTSFilter *filter, const uint8_t *section, int section_len)
 
static void eit_cb (MpegTSFilter *filter, const uint8_t *section, int section_len)
 
static void sdt_cb (MpegTSFilter *filter, const uint8_t *section, int section_len)
 
static int parse_pcr (int64_t *ppcr_high, int *ppcr_low, const uint8_t *packet)
 
static int handle_packet (MpegTSContext *ts, const uint8_t *packet, int64_t pos)
 
static int mpegts_resync (AVFormatContext *s, int seekback, const uint8_t *current_packet)
 
static int read_packet (AVFormatContext *s, uint8_t *buf, int raw_packet_size, const uint8_t **data)
 
static void finished_reading_packet (AVFormatContext *s, int raw_packet_size)
 
static int handle_packets (MpegTSContext *ts, int64_t nb_packets)
 
static int mpegts_probe (const AVProbeData *p)
 
static void seek_back (AVFormatContext *s, AVIOContext *pb, int64_t pos)
 
static int mpegts_read_header (AVFormatContext *s)
 
static int mpegts_raw_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int mpegts_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static void mpegts_free (MpegTSContext *ts)
 
static int mpegts_read_close (AVFormatContext *s)
 
static av_unused int64_t mpegts_get_pcr (AVFormatContext *s, int stream_index, int64_t *ppos, int64_t pos_limit)
 
static int64_t mpegts_get_dts (AVFormatContext *s, int stream_index, int64_t *ppos, int64_t pos_limit)
 
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)
 

Variables

static const AVOption options []
 
static const AVClass mpegts_class
 
static const AVOption raw_options []
 
static const AVClass mpegtsraw_class
 
EXTERN const FFInputFormat ff_mpegts_demuxer
 
static const StreamType ISO_types []
 
static const StreamType HDMV_types []
 
static const StreamType SCTE_types []
 
static const StreamType MISC_types []
 
static const StreamType HLS_SAMPLE_ENC_types []
 
static const StreamType REGD_types []
 
static const StreamType METADATA_types []
 
static const StreamType DESC_types []
 
static const uint8_t opus_coupled_stream_cnt [9]
 
static const uint8_t opus_stream_cnt [9]
 
static const uint8_t opus_channel_map [8][8]
 
const FFInputFormat ff_mpegtsraw_demuxer
 

Macro Definition Documentation

◆ MAX_RESYNC_SIZE

#define MAX_RESYNC_SIZE   65536

Definition at line 53 of file mpegts.c.

◆ TS_PAYLOAD_SIZE

#define TS_PAYLOAD_SIZE   (TS_PACKET_SIZE - 4)

Definition at line 56 of file mpegts.c.

◆ MAX_MP4_DESCR_COUNT

#define MAX_MP4_DESCR_COUNT   16

Definition at line 58 of file mpegts.c.

Referenced by m4sl_cb(), and pmt_cb().

◆ MOD_UNLIKELY

#define MOD_UNLIKELY ( modulus,
dividend,
divisor,
prev_dividend )
Value:
do { \
if ((prev_dividend) == 0 || (dividend) - (prev_dividend) != (divisor)) \
(modulus) = (dividend) % (divisor); \
(prev_dividend) = (dividend); \
} while (0)

Definition at line 60 of file mpegts.c.

◆ PROBE_PACKET_MAX_BUF

#define PROBE_PACKET_MAX_BUF   8192

Definition at line 67 of file mpegts.c.

Referenced by get_packet_size(), mpegts_read_header(), and mpegts_resync().

◆ PROBE_PACKET_MARGIN

#define PROBE_PACKET_MARGIN   5

Definition at line 68 of file mpegts.c.

Referenced by get_packet_size().

◆ MAX_STREAMS_PER_PROGRAM

#define MAX_STREAMS_PER_PROGRAM   128

◆ MAX_PIDS_PER_PROGRAM

#define MAX_PIDS_PER_PROGRAM   (MAX_STREAMS_PER_PROGRAM + 2)

Definition at line 122 of file mpegts.c.

Referenced by add_pid_to_program().

◆ MPEGTS_OPTIONS

#define MPEGTS_OPTIONS
Value:
{ "resync_size", "set size limit for looking up a new synchronization", \
offsetof(MpegTSContext, resync_size), AV_OPT_TYPE_INT, \
{ .i64 = MAX_RESYNC_SIZE}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, \
{ "ts_id", "transport stream id", \
offsetof(MpegTSContext, id), AV_OPT_TYPE_INT, \
{ .i64 = 0 }, 0, INT_MAX, AV_OPT_FLAG_EXPORT | AV_OPT_FLAG_READONLY }, \
{ "ts_packetsize", "output option carrying the raw packet size", \
offsetof(MpegTSContext, raw_packet_size), AV_OPT_TYPE_INT, \
{ .i64 = 0 }, 0, INT_MAX, AV_OPT_FLAG_EXPORT | AV_OPT_FLAG_READONLY }
#define AV_OPT_FLAG_READONLY
The option may not be set through the AVOptions API, only read.
Definition opt.h:367
#define AV_OPT_FLAG_DECODING_PARAM
A generic parameter which can be set by the user for demuxing or decoding.
Definition opt.h:355
#define AV_OPT_FLAG_EXPORT
The option is intended for exporting values to the caller.
Definition opt.h:362
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
#define MAX_RESYNC_SIZE
Definition mpegts.c:53

Definition at line 203 of file mpegts.c.

◆ PES_START_SIZE

#define PES_START_SIZE   6

Definition at line 266 of file mpegts.c.

Referenced by mpegts_push_data(), and new_pes_packet().

◆ PES_HEADER_SIZE

#define PES_HEADER_SIZE   9

Definition at line 267 of file mpegts.c.

Referenced by mpegts_push_data().

◆ MAX_PES_HEADER_SIZE

#define MAX_PES_HEADER_SIZE   (9 + 255)

Definition at line 268 of file mpegts.c.

◆ MAX_LEVEL

#define MAX_LEVEL   4

Definition at line 1545 of file mpegts.c.

◆ R8_CHECK_CLIP_MAX

#define R8_CHECK_CLIP_MAX ( dst,
maxv )
Value:
do { \
descr->sl.dst = avio_r8(pb); \
if (descr->sl.dst > maxv) { \
descr->sl.dst = maxv; \
} \
} while (0)
int avio_r8(AVIOContext *s)
Definition aviobuf.c:606
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition error.h:61

Referenced by parse_MP4SLDescrTag().

◆ CHECK_COUNT

#define CHECK_COUNT   10

◆ CHECK_BLOCK

#define CHECK_BLOCK   100

◆ MAX_PACKET_READAHEAD

#define MAX_PACKET_READAHEAD   ((128 * 1024) / 188)

Definition at line 3649 of file mpegts.c.

Referenced by mpegts_raw_read_packet().

Typedef Documentation

◆ PESCallback

typedef int PESCallback(MpegTSFilter *f, const uint8_t *buf, int len, int is_start, int64_t pos)

Definition at line 78 of file mpegts.c.

◆ SectionCallback

typedef void SectionCallback(MpegTSFilter *f, const uint8_t *buf, int len)

Definition at line 86 of file mpegts.c.

◆ SetServiceCallback

typedef void SetServiceCallback(void *opaque, int ret)

Definition at line 88 of file mpegts.c.

Enumeration Type Documentation

◆ MpegTSFilterType

Enumerator
MPEGTS_PES 
MPEGTS_SECTION 
MPEGTS_PCR 

Definition at line 70 of file mpegts.c.

◆ MpegTSState

Enumerator
MPEGTS_HEADER 
MPEGTS_PESHEADER 
MPEGTS_PESHEADER_FILL 
MPEGTS_PAYLOAD 
MPEGTS_SKIP 

Definition at line 257 of file mpegts.c.

Function Documentation

◆ get_program()

static struct Program * get_program ( MpegTSContext * ts,
unsigned int programid )
static

◆ clear_avprogram()

static void clear_avprogram ( MpegTSContext * ts,
unsigned int programid )
static

Definition at line 309 of file mpegts.c.

Referenced by pat_cb(), and pmt_cb().

◆ clear_program()

static void clear_program ( struct Program * p)
static

Definition at line 324 of file mpegts.c.

Referenced by add_program(), pat_cb(), and pmt_cb().

◆ clear_programs()

static void clear_programs ( MpegTSContext * ts)
static

Definition at line 335 of file mpegts.c.

Referenced by mpegts_free().

◆ add_program()

static struct Program * add_program ( MpegTSContext * ts,
unsigned int programid )
static

Definition at line 342 of file mpegts.c.

Referenced by pat_cb().

◆ add_pid_to_program()

static void add_pid_to_program ( struct Program * p,
unsigned int pid )
static

Definition at line 366 of file mpegts.c.

Referenced by pat_cb(), and pmt_cb().

◆ update_av_program_info()

static void update_av_program_info ( AVFormatContext * s,
unsigned int programid,
unsigned int pid,
int version )
static

Definition at line 382 of file mpegts.c.

Referenced by pmt_cb().

◆ discard_pid()

static int discard_pid ( MpegTSContext * ts,
unsigned int pid )
static

discard_pid() decides if the pid is to be discarded according to caller's programs selection

Parameters
ts: - TS context
pid: - pid
Returns
1 if the pid is only comprised in programs that have .discard=AVDISCARD_ALL 0 otherwise

Definition at line 412 of file mpegts.c.

Referenced by handle_packet().

◆ write_section_data()

static void write_section_data ( MpegTSContext * ts,
MpegTSFilter * tss1,
const uint8_t * buf,
int buf_size,
int is_start )
static

Assemble PES packets out of TS packets, and then call the "section_cb" function when they are complete.

Definition at line 453 of file mpegts.c.

Referenced by handle_packet().

◆ mpegts_open_filter()

static MpegTSFilter * mpegts_open_filter ( MpegTSContext * ts,
unsigned int pid,
enum MpegTSFilterType type )
static

◆ mpegts_open_section_filter()

static MpegTSFilter * mpegts_open_section_filter ( MpegTSContext * ts,
unsigned int pid,
SectionCallback * section_cb,
void * opaque,
int check_crc )
static

◆ mpegts_open_pes_filter()

static MpegTSFilter * mpegts_open_pes_filter ( MpegTSContext * ts,
unsigned int pid,
PESCallback * pes_cb,
void * opaque )
static

Definition at line 570 of file mpegts.c.

Referenced by add_pes_stream().

◆ mpegts_open_pcr_filter()

static MpegTSFilter * mpegts_open_pcr_filter ( MpegTSContext * ts,
unsigned int pid )
static

Definition at line 586 of file mpegts.c.

Referenced by pmt_cb().

◆ mpegts_close_filter()

static void mpegts_close_filter ( MpegTSContext * ts,
MpegTSFilter * filter )
static

Definition at line 591 of file mpegts.c.

Referenced by mpegts_free(), pat_cb(), and pmt_cb().

◆ analyze()

static int analyze ( const uint8_t * buf,
int size,
int packet_size,
int probe )
static

Definition at line 612 of file mpegts.c.

Referenced by get_packet_size(), and mpegts_probe().

◆ get_packet_size()

static int get_packet_size ( AVFormatContext * s)
static

Definition at line 641 of file mpegts.c.

Referenced by mpegts_read_header(), and mpegts_resync().

◆ skip_identical()

static int skip_identical ( const SectionHeader * h,
MpegTSSectionFilter * tssf )
static

Definition at line 688 of file mpegts.c.

Referenced by m4sl_cb(), pat_cb(), pmt_cb(), and sdt_cb().

◆ get8()

static int get8 ( const uint8_t ** pp,
const uint8_t * p_end )
inlinestatic

◆ get16()

static int get16 ( const uint8_t ** pp,
const uint8_t * p_end )
inlinestatic

◆ getstr8()

static char * getstr8 ( const uint8_t ** pp,
const uint8_t * p_end )
static

Definition at line 727 of file mpegts.c.

Referenced by sdt_cb().

◆ parse_section_header()

static int parse_section_header ( SectionHeader * h,
const uint8_t ** pp,
const uint8_t * p_end )
static

Definition at line 794 of file mpegts.c.

Referenced by eit_cb(), m4sl_cb(), pat_cb(), pmt_cb(), and sdt_cb().

◆ mpegts_find_stream_type()

static void mpegts_find_stream_type ( AVStream * st,
uint32_t stream_type,
const StreamType * types )
static

Definition at line 931 of file mpegts.c.

Referenced by ff_parse_mpeg2_descriptor(), mpegts_set_stream_info(), and pmt_cb().

◆ mpegts_set_stream_info()

static int mpegts_set_stream_info ( AVStream * st,
PESContext * pes,
uint32_t stream_type,
uint32_t prog_reg_desc )
static

Definition at line 949 of file mpegts.c.

Referenced by mpegts_push_data(), and pmt_cb().

◆ reset_pes_packet_state()

static void reset_pes_packet_state ( PESContext * pes)
static

Definition at line 1030 of file mpegts.c.

Referenced by mpegts_push_data(), and new_pes_packet().

◆ new_data_packet()

static void new_data_packet ( const uint8_t * buffer,
int len,
AVPacket * pkt )
static

Definition at line 1039 of file mpegts.c.

Referenced by eit_cb(), and scte_data_cb().

◆ timed_id3_update_metadata()

static int timed_id3_update_metadata ( AVStream * s,
AVPacket * pkt )
static

Definition at line 1046 of file mpegts.c.

Referenced by new_pes_packet().

◆ new_pes_packet()

static int new_pes_packet ( PESContext * pes,
AVPacket * pkt )
static

Definition at line 1070 of file mpegts.c.

Referenced by mpegts_push_data(), and mpegts_read_packet().

◆ get_ts64()

static uint64_t get_ts64 ( GetBitContext * gb,
int bits )
static

Definition at line 1133 of file mpegts.c.

Referenced by read_sl_header().

◆ read_sl_header()

static int read_sl_header ( PESContext * pes,
SLConfigDescr * sl,
const uint8_t * buf,
int buf_size )
static

Definition at line 1140 of file mpegts.c.

Referenced by mpegts_push_data().

◆ buffer_pool_get()

static AVBufferRef * buffer_pool_get ( MpegTSContext * ts,
int size )
static

Definition at line 1211 of file mpegts.c.

Referenced by mpegts_push_data().

◆ mpegts_push_data()

static int mpegts_push_data ( MpegTSFilter * filter,
const uint8_t * buf,
int buf_size,
int is_start,
int64_t pos )
static

Definition at line 1224 of file mpegts.c.

Referenced by add_pes_stream().

◆ add_pes_stream()

static PESContext * add_pes_stream ( MpegTSContext * ts,
int pid,
int pcr_pid )
static

Definition at line 1521 of file mpegts.c.

Referenced by handle_packet(), and pmt_cb().

◆ init_MP4DescrParseContext()

static int init_MP4DescrParseContext ( MP4DescrParseContext * d,
AVFormatContext * s,
const uint8_t * buf,
unsigned size,
Mp4Descr * descr,
int max_descr_count )
static

Definition at line 1557 of file mpegts.c.

Referenced by mp4_read_iods(), and mp4_read_od().

◆ update_offsets()

static void update_offsets ( AVIOContext * pb,
int64_t * off,
int * len )
static

◆ parse_mp4_descr()

static int parse_mp4_descr ( MP4DescrParseContext * d,
int64_t off,
int len,
int target_tag )
static

Definition at line 1703 of file mpegts.c.

Referenced by mp4_read_iods(), parse_mp4_descr_arr(), and parse_MP4ESDescrTag().

◆ parse_mp4_descr_arr()

static int parse_mp4_descr_arr ( MP4DescrParseContext * d,
int64_t off,
int len )
static

Definition at line 1586 of file mpegts.c.

Referenced by mp4_read_od(), parse_MP4IODescrTag(), and parse_MP4ODescrTag().

◆ parse_MP4IODescrTag()

static int parse_MP4IODescrTag ( MP4DescrParseContext * d,
int64_t off,
int len )
static

Definition at line 1597 of file mpegts.c.

Referenced by parse_mp4_descr().

◆ parse_MP4ODescrTag()

static int parse_MP4ODescrTag ( MP4DescrParseContext * d,
int64_t off,
int len )
static

Definition at line 1610 of file mpegts.c.

Referenced by parse_mp4_descr().

◆ parse_MP4ESDescrTag()

static int parse_MP4ESDescrTag ( MP4DescrParseContext * d,
int64_t off,
int len )
static

Definition at line 1624 of file mpegts.c.

Referenced by parse_mp4_descr().

◆ parse_MP4DecConfigDescrTag()

static int parse_MP4DecConfigDescrTag ( MP4DescrParseContext * d,
int64_t off,
int len )
static

Definition at line 1646 of file mpegts.c.

Referenced by parse_mp4_descr().

◆ parse_MP4SLDescrTag()

static int parse_MP4SLDescrTag ( MP4DescrParseContext * d,
int64_t off,
int len )
static

Definition at line 1660 of file mpegts.c.

Referenced by parse_mp4_descr().

◆ mp4_read_iods()

static int mp4_read_iods ( AVFormatContext * s,
const uint8_t * buf,
unsigned size,
Mp4Descr * descr,
int * descr_count,
int max_descr_count )
static

Definition at line 1757 of file mpegts.c.

Referenced by pmt_cb().

◆ mp4_read_od()

static int mp4_read_od ( AVFormatContext * s,
const uint8_t * buf,
unsigned size,
Mp4Descr * descr,
int * descr_count,
int max_descr_count )
static

Definition at line 1775 of file mpegts.c.

Referenced by m4sl_cb().

◆ m4sl_cb()

static void m4sl_cb ( MpegTSFilter * filter,
const uint8_t * section,
int section_len )
static

Definition at line 1791 of file mpegts.c.

Referenced by ff_parse_mpeg2_descriptor().

◆ scte_data_cb()

static void scte_data_cb ( MpegTSFilter * filter,
const uint8_t * section,
int section_len )
static

In case we receive an SCTE-35 packet before mpegts context is fully initialized.

Definition at line 1855 of file mpegts.c.

Referenced by pmt_cb().

◆ parse_mpeg2_extension_descriptor()

static int parse_mpeg2_extension_descriptor ( AVFormatContext * fc,
AVStream * st,
int prg_id,
const uint8_t ** pp,
const uint8_t * desc_end,
MpegTSContext * ts )
static

Definition at line 1903 of file mpegts.c.

Referenced by ff_parse_mpeg2_descriptor().

◆ ff_parse_mpeg2_descriptor()

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.

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 2077 of file mpegts.c.

Referenced by parse_chunks(), and pmt_cb().

◆ find_matching_stream()

static AVStream * find_matching_stream ( MpegTSContext * ts,
int pid,
unsigned int programid,
int stream_identifier,
int pmt_stream_idx,
struct Program * p )
static

Definition at line 2547 of file mpegts.c.

Referenced by pmt_cb().

◆ parse_stream_identifier_desc()

static int parse_stream_identifier_desc ( const uint8_t * p,
const uint8_t * p_end )
static

Definition at line 2573 of file mpegts.c.

Referenced by pmt_cb().

◆ is_pes_stream()

static int is_pes_stream ( int stream_type,
uint32_t prog_reg_desc )
static

Definition at line 2609 of file mpegts.c.

Referenced by pmt_cb().

◆ detect_bdmv_dovi_group()

static void detect_bdmv_dovi_group ( MpegTSContext * ts,
struct Program * prg,
uint32_t prog_reg_desc )
static

Definition at line 2632 of file mpegts.c.

Referenced by pmt_cb().

◆ create_stream_groups()

static void create_stream_groups ( MpegTSContext * ts,
struct Program * prg )
static

Definition at line 2674 of file mpegts.c.

Referenced by pmt_cb().

◆ pmt_cb()

static void pmt_cb ( MpegTSFilter * filter,
const uint8_t * section,
int section_len )
static

Definition at line 2740 of file mpegts.c.

Referenced by pat_cb().

◆ pat_cb()

static void pat_cb ( MpegTSFilter * filter,
const uint8_t * section,
int section_len )
static

Definition at line 2966 of file mpegts.c.

Referenced by avpriv_mpegts_parse_open(), and mpegts_read_header().

◆ eit_cb()

static void eit_cb ( MpegTSFilter * filter,
const uint8_t * section,
int section_len )
static

Service_id 0xFFFF is reserved, it indicates that the current EIT table is scrambled.

In case we receive an EPG packet before mpegts context is fully initialized.

Definition at line 3057 of file mpegts.c.

Referenced by avpriv_mpegts_parse_open(), and mpegts_read_header().

◆ sdt_cb()

static void sdt_cb ( MpegTSFilter * filter,
const uint8_t * section,
int section_len )
static

Definition at line 3111 of file mpegts.c.

Referenced by avpriv_mpegts_parse_open(), and mpegts_read_header().

◆ parse_pcr()

static int parse_pcr ( int64_t * ppcr_high,
int * ppcr_low,
const uint8_t * packet )
static

◆ handle_packet()

static int handle_packet ( MpegTSContext * ts,
const uint8_t * packet,
int64_t pos )
static

Definition at line 3201 of file mpegts.c.

Referenced by avpriv_mpegts_parse_packet(), and handle_packets().

◆ mpegts_resync()

static int mpegts_resync ( AVFormatContext * s,
int seekback,
const uint8_t * current_packet )
static

Definition at line 3331 of file mpegts.c.

Referenced by mpegts_get_pcr(), and read_packet().

◆ read_packet()

static int read_packet ( AVFormatContext * s,
uint8_t * buf,
int raw_packet_size,
const uint8_t ** data )
static

Definition at line 3374 of file mpegts.c.

Referenced by handle_packets(), mpegts_raw_read_packet(), and mpegts_read_header().

◆ finished_reading_packet()

static void finished_reading_packet ( AVFormatContext * s,
int raw_packet_size )
static

Definition at line 3405 of file mpegts.c.

Referenced by handle_packets(), mpegts_raw_read_packet(), and mpegts_read_header().

◆ handle_packets()

static int handle_packets ( MpegTSContext * ts,
int64_t nb_packets )
static

Definition at line 3417 of file mpegts.c.

Referenced by mpegts_read_header(), and mpegts_read_packet().

◆ mpegts_probe()

static int mpegts_probe ( const AVProbeData * p)
static

Definition at line 3470 of file mpegts.c.

◆ seek_back()

static void seek_back ( AVFormatContext * s,
AVIOContext * pb,
int64_t pos )
static

Definition at line 3541 of file mpegts.c.

Referenced by dhav_read_header(), get_duration(), and mpegts_read_header().

◆ mpegts_read_header()

static int mpegts_read_header ( AVFormatContext * s)
static

Definition at line 3550 of file mpegts.c.

◆ mpegts_raw_read_packet()

static int mpegts_raw_read_packet ( AVFormatContext * s,
AVPacket * pkt )
static

Definition at line 3651 of file mpegts.c.

◆ mpegts_read_packet()

static int mpegts_read_packet ( AVFormatContext * s,
AVPacket * pkt )
static

Definition at line 3698 of file mpegts.c.

◆ mpegts_free()

static void mpegts_free ( MpegTSContext * ts)
static

Definition at line 3728 of file mpegts.c.

Referenced by avpriv_mpegts_parse_close(), and mpegts_read_close().

◆ mpegts_read_close()

static int mpegts_read_close ( AVFormatContext * s)
static

Definition at line 3742 of file mpegts.c.

◆ mpegts_get_pcr()

static av_unused int64_t mpegts_get_pcr ( AVFormatContext * s,
int stream_index,
int64_t * ppos,
int64_t pos_limit )
static

Definition at line 3749 of file mpegts.c.

◆ mpegts_get_dts()

static int64_t mpegts_get_dts ( AVFormatContext * s,
int stream_index,
int64_t * ppos,
int64_t pos_limit )
static

Definition at line 3783 of file mpegts.c.

◆ avpriv_mpegts_parse_open()

MpegTSContext * avpriv_mpegts_parse_open ( AVFormatContext * s)

Definition at line 3824 of file mpegts.c.

Referenced by 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 )

Definition at line 3846 of file mpegts.c.

Referenced by iec61883_parse_queue_hdv(), and mpegts_handle_packet().

◆ avpriv_mpegts_parse_close()

void avpriv_mpegts_parse_close ( MpegTSContext * ts)

Definition at line 3871 of file mpegts.c.

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

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{"fix_teletext_pts", "try to fix pts values of dvb teletext streams", 0x42 , AV_OPT_TYPE_BOOL,
{.i64 = 1}, 0, 1, AV_OPT_FLAG_DECODING_PARAM },
{"scan_all_pmts", "scan and combine all PMTs", 0x42 , AV_OPT_TYPE_BOOL,
{.i64 = -1}, -1, 1, AV_OPT_FLAG_DECODING_PARAM },
{"skip_unknown_pmt", "skip PMTs for programs not advertised in the PAT", 0x42 , AV_OPT_TYPE_BOOL,
{.i64 = 0}, 0, 1, AV_OPT_FLAG_DECODING_PARAM },
{"merge_pmt_versions", "reuse streams when PMT's version/pids change", 0x42 , AV_OPT_TYPE_BOOL,
{.i64 = 0}, 0, 1, AV_OPT_FLAG_DECODING_PARAM },
{"skip_changes", "skip changing / adding streams / programs", 0x42 , AV_OPT_TYPE_BOOL,
{.i64 = 0}, 0, 1, 0 },
{"skip_clear", "skip clearing programs", 0x42 , AV_OPT_TYPE_BOOL,
{.i64 = 0}, 0, 1, 0 },
{"max_packet_size", "maximum size of emitted packet", 0x42 , AV_OPT_TYPE_INT,
{.i64 = 204800}, TS_PAYLOAD_SIZE, INT_MAX/2, AV_OPT_FLAG_DECODING_PARAM },
{ NULL },
}
#define NULL
Definition coverity.c:32
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
Definition opt.h:326
#define TS_PAYLOAD_SIZE
Definition mpegts.c:56
#define MPEGTS_OPTIONS
Definition mpegts.c:203

Definition at line 214 of file mpegts.c.

◆ mpegts_class

const AVClass mpegts_class
static
Initial value:
= {
.class_name = "mpegts demuxer",
.item_name = av_default_item_name,
.option = options,
}
const char * av_default_item_name(void *ptr)
Return the context name.
Definition log.c:241
#define LIBAVUTIL_VERSION_INT
Definition version.h:85

Definition at line 233 of file mpegts.c.

◆ raw_options

const AVOption raw_options[]
static
Initial value:
= {
{ "compute_pcr", "compute exact PCR for each transport stream packet",
{ .i64 = 0 }, 0, 1, AV_OPT_FLAG_DECODING_PARAM },
{ NULL },
}

Definition at line 240 of file mpegts.c.

◆ mpegtsraw_class

const AVClass mpegtsraw_class
static
Initial value:
= {
.class_name = "mpegtsraw demuxer",
.item_name = av_default_item_name,
.option = raw_options,
}
static const AVOption raw_options[]
Definition mpegts.c:240

Definition at line 248 of file mpegts.c.

◆ ff_mpegts_demuxer

const FFInputFormat ff_mpegts_demuxer
Initial value:
= {
.p.name = "mpegts",
.p.long_name = NULL_IF_CONFIG_SMALL("MPEG-TS (MPEG-2 Transport Stream)"),
.p.priv_class = &mpegts_class,
.priv_data_size = sizeof(MpegTSContext),
}
#define AVFMT_TS_DISCONT
Format allows timestamp discontinuities.
Definition avformat.h:500
#define AVFMT_SHOW_IDS
Show format stream IDs numbers.
Definition avformat.h:496
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
static int read_probe(const AVProbeData *p)
Definition cdg.c:30
#define FF_INFMT_FLAG_PREFER_CODEC_FRAMERATE
Definition demux.h:40
static int read_header(FFV1Context *f, RangeCoder *c)
Definition ffv1dec.c:578
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88
static av_cold int read_close(AVFormatContext *ctx)
Definition libcdio.c:143
static int mpegts_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition mpegts.c:3698
static const AVClass mpegts_class
Definition mpegts.c:233
static int mpegts_read_header(AVFormatContext *s)
Definition mpegts.c:3550
static int64_t mpegts_get_dts(AVFormatContext *s, int stream_index, int64_t *ppos, int64_t pos_limit)
Definition mpegts.c:3783
static int mpegts_read_close(AVFormatContext *s)
Definition mpegts.c:3742
static int mpegts_probe(const AVProbeData *p)
Definition mpegts.c:3470
static int64_t read_timestamp(AVFormatContext *s, int stream_index, int64_t *ppos, int64_t pos_limit, int64_t(*read_timestamp)(struct AVFormatContext *, int, int64_t *, int64_t))
Definition seek.c:281

Definition at line 294 of file mpegts.c.

Referenced by mpegts_read_header().

◆ ISO_types

const StreamType ISO_types[]
static
Initial value:
= {
{ 0 },
}
@ AV_CODEC_ID_DIRAC
Definition codec_id.h:166
@ AV_CODEC_ID_AVS3
Definition codec_id.h:245
@ AV_CODEC_ID_LCEVC
Definition codec_id.h:609
@ AV_CODEC_ID_H264
Definition codec_id.h:77
@ AV_CODEC_ID_JPEG2000
Definition codec_id.h:138
@ AV_CODEC_ID_VVC
Definition codec_id.h:247
@ AV_CODEC_ID_JPEGXS
Definition codec_id.h:325
@ AV_CODEC_ID_VC1
Definition codec_id.h:120
@ AV_CODEC_ID_CAVS
Definition codec_id.h:137
@ AV_CODEC_ID_HEVC
Definition codec_id.h:223
@ AV_CODEC_ID_AAC
Definition codec_id.h:455
@ AV_CODEC_ID_MPEG4
Definition codec_id.h:62
@ AV_CODEC_ID_AVS2
Definition codec_id.h:243
@ AV_CODEC_ID_MP3
preferred ID for decoding MPEG audio layer 1, 2 or 3
Definition codec_id.h:454
@ AV_CODEC_ID_AAC_LATM
Definition codec_id.h:502
@ AV_CODEC_ID_MPEG2VIDEO
preferred ID for MPEG-1/2 video decoding
Definition codec_id.h:52
@ AVMEDIA_TYPE_AUDIO
Definition avutil.h:201
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
#define STREAM_TYPE_VIDEO_MPEG4
Definition mpeg.h:56
#define STREAM_TYPE_VIDEO_CAVS
Definition mpeg.h:60
#define STREAM_TYPE_AUDIO_MPEG2
Definition mpeg.h:52
#define STREAM_TYPE_VIDEO_HEVC
Definition mpeg.h:58
#define STREAM_TYPE_VIDEO_VVC
Definition mpeg.h:59
#define STREAM_TYPE_VIDEO_MPEG1
Definition mpeg.h:49
#define STREAM_TYPE_AUDIO_AAC
Definition mpeg.h:55
#define STREAM_TYPE_VIDEO_H264
Definition mpeg.h:57
#define STREAM_TYPE_AUDIO_MPEG1
Definition mpeg.h:51
#define STREAM_TYPE_VIDEO_MPEG2
Definition mpeg.h:50
#define STREAM_TYPE_VIDEO_AVS3
Definition mpegts.h:153
#define STREAM_TYPE_VIDEO_MVC
Definition mpegts.h:145
#define STREAM_TYPE_VIDEO_DIRAC
Definition mpegts.h:155
#define STREAM_TYPE_AUDIO_MPEG4
ISO/IEC 14496-3 Audio, without using any additional transport syntax, such as DST,...
Definition mpegts.h:144
#define STREAM_TYPE_VIDEO_VC1
Definition mpegts.h:154
#define STREAM_TYPE_VIDEO_JPEGXS
Definition mpegts.h:148
#define STREAM_TYPE_AUDIO_AAC_LATM
Definition mpegts.h:132
#define STREAM_TYPE_VIDEO_LCEVC
Definition mpegts.h:150
#define STREAM_TYPE_VIDEO_JPEG2000
Definition mpegts.h:146
#define STREAM_TYPE_VIDEO_AVS2
Definition mpegts.h:152

Definition at line 830 of file mpegts.c.

Referenced by mpegts_set_stream_info().

◆ HDMV_types

const StreamType HDMV_types[]
static
Initial value:
= {
{ 0 },
}
@ AV_CODEC_ID_HDMV_PGS_SUBTITLE
Definition codec_id.h:572
@ AV_CODEC_ID_EAC3
Definition codec_id.h:493
@ AV_CODEC_ID_PCM_BLURAY
Definition codec_id.h:354
@ AV_CODEC_ID_HDMV_TEXT_SUBTITLE
Definition codec_id.h:589
@ AV_CODEC_ID_DTS
Definition codec_id.h:457
@ AV_CODEC_ID_TRUEHD
Definition codec_id.h:497
@ AV_CODEC_ID_AC3
Definition codec_id.h:456
@ AVMEDIA_TYPE_SUBTITLE
Definition avutil.h:203
#define STREAM_TYPE_BLURAY_SUBTITLE_TEXT
Definition mpegts.h:168
#define STREAM_TYPE_BLURAY_AUDIO_EAC3
Definition mpegts.h:162
#define STREAM_TYPE_BLURAY_SUBTITLE_PGS
Definition mpegts.h:167
#define STREAM_TYPE_BLURAY_AUDIO_DTS_EXPRESS_SECONDARY
Definition mpegts.h:166
#define STREAM_TYPE_BLURAY_AUDIO_TRUEHD
Definition mpegts.h:161
#define STREAM_TYPE_BLURAY_AUDIO_DTS
Definition mpegts.h:160
#define STREAM_TYPE_BLURAY_AUDIO_EAC3_SECONDARY
Definition mpegts.h:165
#define STREAM_TYPE_BLURAY_AUDIO_PCM_BLURAY
Definition mpegts.h:158
#define STREAM_TYPE_BLURAY_AUDIO_AC3
Definition mpegts.h:159
#define STREAM_TYPE_BLURAY_AUDIO_DTS_HD
Definition mpegts.h:163
#define STREAM_TYPE_BLURAY_AUDIO_DTS_HD_MASTER
Definition mpegts.h:164

Definition at line 858 of file mpegts.c.

Referenced by mpegts_set_stream_info().

◆ SCTE_types

const StreamType SCTE_types[]
static
Initial value:
= {
{ 0 },
}
@ AV_CODEC_ID_SCTE_35
Contain timestamp estimated through PCR of program stream.
Definition codec_id.h:598
@ AVMEDIA_TYPE_DATA
Opaque data information usually continuous.
Definition avutil.h:202
#define STREAM_TYPE_SCTE_DATA_SCTE_35
Definition mpegts.h:170

Definition at line 874 of file mpegts.c.

Referenced by pmt_cb().

◆ MISC_types

const StreamType MISC_types[]
static
Initial value:

Definition at line 880 of file mpegts.c.

Referenced by mpegts_set_stream_info().

◆ HLS_SAMPLE_ENC_types

const StreamType HLS_SAMPLE_ENC_types[]
static
Initial value:

Definition at line 888 of file mpegts.c.

Referenced by mpegts_set_stream_info().

◆ REGD_types

const StreamType REGD_types[]
static
Initial value:
= {
{ MKTAG('d', 'r', 'a', 'c'), AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_DIRAC },
{ MKTAG('A', 'C', '-', '3'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AC3 },
{ MKTAG('A', 'C', '-', '4'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AC4 },
{ MKTAG('B', 'S', 'S', 'D'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_S302M },
{ MKTAG('D', 'T', 'S', '1'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS },
{ MKTAG('D', 'T', 'S', '2'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS },
{ MKTAG('D', 'T', 'S', '3'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS },
{ MKTAG('E', 'A', 'C', '3'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_EAC3 },
{ MKTAG('H', 'E', 'V', 'C'), AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_HEVC },
{ MKTAG('V', 'V', 'C', ' '), AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_VVC },
{ MKTAG('K', 'L', 'V', 'A'), AVMEDIA_TYPE_DATA, AV_CODEC_ID_SMPTE_KLV },
{ MKTAG('V', 'A', 'N', 'C'), AVMEDIA_TYPE_DATA, AV_CODEC_ID_SMPTE_2038 },
{ MKTAG('I', 'D', '3', ' '), AVMEDIA_TYPE_DATA, AV_CODEC_ID_TIMED_ID3 },
{ MKTAG('V', 'C', '-', '1'), AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_VC1 },
{ MKTAG('O', 'p', 'u', 's'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_OPUS },
{ 0 },
}
@ AV_CODEC_ID_TIMED_ID3
Definition codec_id.h:606
@ AV_CODEC_ID_S302M
Definition codec_id.h:356
@ AV_CODEC_ID_SMPTE_2038
Definition codec_id.h:608
@ AV_CODEC_ID_SMPTE_KLV
Definition codec_id.h:604
@ AV_CODEC_ID_AC4
Definition codec_id.h:556
@ AV_CODEC_ID_OPUS
Definition codec_id.h:513
#define MKTAG(a, b, c, d)
Definition macros.h:55

Definition at line 896 of file mpegts.c.

Referenced by ff_parse_mpeg2_descriptor().

◆ METADATA_types

const StreamType METADATA_types[]
static
Initial value:
= {
{ 0 },
}

Definition at line 915 of file mpegts.c.

Referenced by ff_parse_mpeg2_descriptor().

◆ DESC_types

const StreamType DESC_types[]
static
Initial value:

Definition at line 922 of file mpegts.c.

Referenced by ff_parse_mpeg2_descriptor().

◆ opus_coupled_stream_cnt

const uint8_t opus_coupled_stream_cnt[9]
static
Initial value:
= {
1, 0, 1, 1, 2, 2, 2, 3, 3
}

Definition at line 1884 of file mpegts.c.

Referenced by ff_parse_mpeg2_descriptor().

◆ opus_stream_cnt

const uint8_t opus_stream_cnt[9]
static
Initial value:
= {
1, 1, 1, 2, 2, 3, 4, 4, 5,
}

Definition at line 1888 of file mpegts.c.

Referenced by ff_parse_mpeg2_descriptor().

◆ opus_channel_map

const uint8_t opus_channel_map[8][8]
static
Initial value:
= {
{ 0 },
{ 0,1 },
{ 0,2,1 },
{ 0,1,2,3 },
{ 0,4,1,2,3 },
{ 0,4,1,2,3,5 },
{ 0,4,1,2,3,5,6 },
{ 0,6,1,2,3,4,5,7 },
}

Definition at line 1892 of file mpegts.c.

Referenced by ff_parse_mpeg2_descriptor().

◆ ff_mpegtsraw_demuxer

const FFInputFormat ff_mpegtsraw_demuxer
Initial value:
= {
.p.name = "mpegtsraw",
.p.long_name = NULL_IF_CONFIG_SMALL("raw MPEG-TS (MPEG-2 Transport Stream)"),
.p.priv_class = &mpegtsraw_class,
.priv_data_size = sizeof(MpegTSContext),
}
static int mpegts_raw_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition mpegts.c:3651
static const AVClass mpegtsraw_class
Definition mpegts.c:248

Definition at line 3891 of file mpegts.c.