TSDuck Version 3.32-2769 (TSDuck - The MPEG Transport Stream Toolkit)
tsTS.h File Reference

Common definitions for MPEG Transport Stream layer. More...

Namespaces

 ts
 TSDuck namespace, containing all TSDuck classes and functions.
 

Typedefs

typedef uint64_t ts::PacketCounter
 Number of Transport Stream packets. More...
 
typedef uint16_t ts::PID
 PID value (13 bits).
 
typedef std::bitset< PID_MAX > ts::PIDSet
 A bit mask for PID values. More...
 
typedef uint64_t ts::SectionCounter
 Number of sections.
 

Enumerations

enum  : uint8_t {
  ts::ETHERTYPE_IPv4 = 0x0800,
  ts::ETHERTYPE_ARP = 0x0806,
  ts::ETHERTYPE_WOL = 0x0842,
  ts::ETHERTYPE_RARP = 0x8035,
  ts::ETHERTYPE_802_1Q = 0x8100,
  ts::ETHERTYPE_IPv6 = 0x86DD,
  ts::CCHAR_LETTER = 0x0001,
  ts::CCHAR_DIGIT = 0x0002,
  ts::CCHAR_HEXA = 0x0004,
  ts::CCHAR_LATIN = 0x0008,
  ts::CCHAR_GREEK = 0x0010,
  ts::CCHAR_HEBREW = 0x0020,
  ts::CCHAR_ARABIC = 0x0040,
  ts::CCHAR_THAI = 0x0080,
  ts::CCHAR_CYRILLIC = 0x0100,
  ts::CCHAR_CDIACRIT = 0x0200,
  ts::CCHAR_SPACE = 0x0400,
  ts::CCHAR_PRINT = 0x0800,
  ts::AVC_AUT_UNSPECIFIED = 0,
  ts::AVC_AUT_NON_IDR = 1,
  ts::AVC_AUT_SLICE_A = 2,
  ts::AVC_AUT_SLICE_B = 3,
  ts::AVC_AUT_SLICE_C = 4,
  ts::AVC_AUT_IDR = 5,
  ts::AVC_AUT_SEI = 6,
  ts::AVC_AUT_SEQPARAMS = 7,
  ts::AVC_AUT_PICPARAMS = 8,
  ts::AVC_AUT_DELIMITER = 9,
  ts::AVC_AUT_END_SEQUENCE = 10,
  ts::AVC_AUT_END_STREAM = 11,
  ts::AVC_AUT_FILLER = 12,
  ts::AVC_AUT_SEQPARAMSEXT = 13,
  ts::AVC_AUT_PREFIX = 14,
  ts::AVC_AUT_SUBSETPARAMS = 15,
  ts::AVC_AUT_DEPTHPARAMS = 16,
  ts::AVC_AUT_SLICE_NOPART = 19,
  ts::AVC_AUT_SLICE_SCALE = 20,
  ts::AVC_AUT_SLICE_EXTEND = 21,
  ts::AVC_AUT_INVALID = 0xFF,
  ts::HEVC_AUT_TRAIL_N = 0,
  ts::HEVC_AUT_TRAIL_R = 1,
  ts::HEVC_AUT_TSA_N = 2,
  ts::HEVC_AUT_TSA_R = 3,
  ts::HEVC_AUT_STSA_N = 4,
  ts::HEVC_AUT_STSA_R = 5,
  ts::HEVC_AUT_RADL_N = 6,
  ts::HEVC_AUT_RADL_R = 7,
  ts::HEVC_AUT_RASL_N = 8,
  ts::HEVC_AUT_RASL_R = 9,
  ts::HEVC_AUT_RSV_VCL_N10 = 10,
  ts::HEVC_AUT_RSV_VCL_R11 = 11,
  ts::HEVC_AUT_RSV_VCL_N12 = 12,
  ts::HEVC_AUT_RSV_VCL_R13 = 13,
  ts::HEVC_AUT_RSV_VCL_N14 = 14,
  ts::HEVC_AUT_RSV_VCL_R15 = 15,
  ts::HEVC_AUT_BLA_W_LP = 16,
  ts::HEVC_AUT_BLA_W_RADL = 17,
  ts::HEVC_AUT_BLA_N_LP = 18,
  ts::HEVC_AUT_IDR_W_RADL = 19,
  ts::HEVC_AUT_IDR_N_LP = 20,
  ts::HEVC_AUT_CRA_NUT = 21,
  ts::HEVC_AUT_RSV_IRAP_VCL22 = 22,
  ts::HEVC_AUT_RSV_IRAP_VCL23 = 23,
  ts::HEVC_AUT_RSV_VCL24 = 24,
  ts::HEVC_AUT_RSV_VCL25 = 25,
  ts::HEVC_AUT_RSV_VCL26 = 26,
  ts::HEVC_AUT_RSV_VCL27 = 27,
  ts::HEVC_AUT_RSV_VCL28 = 28,
  ts::HEVC_AUT_RSV_VCL29 = 29,
  ts::HEVC_AUT_RSV_VCL30 = 30,
  ts::HEVC_AUT_RSV_VCL31 = 31,
  ts::HEVC_AUT_VPS_NUT = 32,
  ts::HEVC_AUT_SPS_NUT = 33,
  ts::HEVC_AUT_PPS_NUT = 34,
  ts::HEVC_AUT_AUD_NUT = 35,
  ts::HEVC_AUT_EOS_NUT = 36,
  ts::HEVC_AUT_EOB_NUT = 37,
  ts::HEVC_AUT_FD_NUT = 38,
  ts::HEVC_AUT_PREFIX_SEI_NUT = 39,
  ts::HEVC_AUT_SUFFIX_SEI_NUT = 40,
  ts::HEVC_AUT_RSV_NVCL41 = 41,
  ts::HEVC_AUT_RSV_NVCL42 = 42,
  ts::HEVC_AUT_RSV_NVCL43 = 43,
  ts::HEVC_AUT_RSV_NVCL44 = 44,
  ts::HEVC_AUT_RSV_NVCL45 = 45,
  ts::HEVC_AUT_RSV_NVCL46 = 46,
  ts::HEVC_AUT_RSV_NVCL47 = 47,
  ts::HEVC_AUT_UNSPEC48 = 48,
  ts::HEVC_AUT_UNSPEC63 = 63,
  ts::HEVC_AUT_INVALID = 0xFF,
  ts::PST_PICTURE = 0x00,
  ts::PST_SLICE_MIN = 0x01,
  ts::PST_SLICE_MAX = 0xAF,
  ts::PST_RESERVED_B0 = 0xB0,
  ts::PST_RESERVED_B1 = 0xB1,
  ts::PST_USER_DATA = 0xB2,
  ts::PST_SEQUENCE_HEADER = 0xB3,
  ts::PST_SEQUENCE_ERROR = 0xB4,
  ts::PST_EXTENSION = 0xB5,
  ts::PST_RESERVED_B6 = 0xB6,
  ts::PST_SEQUENCE_END = 0xB7,
  ts::PST_GROUP = 0xB8,
  ts::PST_SYSTEM_MIN = 0xB9,
  ts::PST_SYSTEM_MAX = 0xFF,
  ts::VVC_AUT_TRAIL_NUT = 0,
  ts::VVC_AUT_STSA_NUT = 1,
  ts::VVC_AUT_RADL_NUT = 2,
  ts::VVC_AUT_RASL_NUT = 3,
  ts::VVC_AUT_RSV_VCL_4 = 4,
  ts::VVC_AUT_RSV_VCL_5 = 5,
  ts::VVC_AUT_RSV_VCL_6 = 6,
  ts::VVC_AUT_IDR_W_RADL = 7,
  ts::VVC_AUT_IDR_N_LP = 8,
  ts::VVC_AUT_CRA_NUT = 9,
  ts::VVC_AUT_GDR_NUT = 10,
  ts::VVC_AUT_RSV_IRAP_11 = 11,
  ts::VVC_AUT_OPI_NUT = 12,
  ts::VVC_AUT_DCI_NUT = 13,
  ts::VVC_AUT_VPS_NUT = 14,
  ts::VVC_AUT_SPS_NUT = 15,
  ts::VVC_AUT_PPS_NUT = 16,
  ts::VVC_AUT_PREFIX_APS_NUT = 17,
  ts::VVC_AUT_SUFFIX_APS_NUT = 18,
  ts::VVC_AUT_PH_NUT = 19,
  ts::VVC_AUT_AUD_NUT = 20,
  ts::VVC_AUT_EOS_NUT = 21,
  ts::VVC_AUT_EOB_NUT = 22,
  ts::VVC_AUT_PREFIX_SEI_NUT = 23,
  ts::VVC_AUT_SUFFIX_SEI_NUT = 24,
  ts::VVC_AUT_FD_NUT = 25,
  ts::VVC_AUT_RSV_NVCL_26 = 26,
  ts::VVC_AUT_RSV_NVCL_27 = 27,
  ts::VVC_AUT_UNSPEC_28 = 28,
  ts::VVC_AUT_UNSPEC_31 = 31,
  ts::VVC_AUT_INVALID = 0xFF,
  ts::SID_PSMAP = 0xBC,
  ts::SID_PRIV1 = 0xBD,
  ts::SID_PAD = 0xBE,
  ts::SID_PRIV2 = 0xBF,
  ts::SID_AUDIO = 0xC0,
  ts::SID_AUDIO_MASK = 0x1F,
  ts::SID_VIDEO = 0xE0,
  ts::SID_VIDEO_MASK = 0x0F,
  ts::SID_ECM = 0xF0,
  ts::SID_EMM = 0xF1,
  ts::SID_DSMCC = 0xF2,
  ts::SID_ISO13522 = 0xF3,
  ts::SID_H222_1_A = 0xF4,
  ts::SID_H222_1_B = 0xF5,
  ts::SID_H222_1_C = 0xF6,
  ts::SID_H222_1_D = 0xF7,
  ts::SID_H222_1_E = 0xF8,
  ts::SID_ANCILLARY = 0xF9,
  ts::SID_MP4_SLPACK = 0xFA,
  ts::SID_MP4_FLEXM = 0xFB,
  ts::SID_METADATA = 0xFC,
  ts::SID_EXTENDED = 0xFD,
  ts::SID_RESERVED = 0xFE,
  ts::SID_PSDIR = 0xFF,
  ts::TID_PAT = 0x00,
  ts::TID_CAT = 0x01,
  ts::TID_PMT = 0x02,
  ts::TID_TSDT = 0x03,
  ts::TID_MP4SDT = 0x04,
  ts::TID_MP4ODT = 0x05,
  ts::TID_MDT = 0x06,
  ts::TID_IPMP_CT = 0x07,
  ts::TID_ISO_14496 = 0x08,
  ts::TID_ISO_23001_11 = 0x09,
  ts::TID_ISO_23001_10 = 0x0A,
  ts::TID_DSMCC_MPE = 0x3A,
  ts::TID_DSMCC_UNM = 0x3B,
  ts::TID_DSMCC_DDM = 0x3C,
  ts::TID_DSMCC_SD = 0x3D,
  ts::TID_DSMCC_PD = 0x3E,
  ts::TID_NULL = 0xFF,
  ts::TID_NIT_ACT = 0x40,
  ts::TID_NIT_OTH = 0x41,
  ts::TID_SDT_ACT = 0x42,
  ts::TID_SDT_OTH = 0x46,
  ts::TID_BAT = 0x4A,
  ts::TID_UNT = 0x4B,
  ts::TID_INT = 0x4C,
  ts::TID_EIT_PF_ACT = 0x4E,
  ts::TID_EIT_PF_OTH = 0x4F,
  ts::TID_EIT_S_ACT_MIN = 0x50,
  ts::TID_EIT_S_ACT_MAX = 0x5F,
  ts::TID_EIT_S_OTH_MIN = 0x60,
  ts::TID_EIT_S_OTH_MAX = 0x6F,
  ts::TID_TDT = 0x70,
  ts::TID_RST = 0x71,
  ts::TID_ST = 0x72,
  ts::TID_TOT = 0x73,
  ts::TID_AIT = 0x74,
  ts::TID_CT = 0x75,
  ts::TID_RCT = 0x76,
  ts::TID_CIT = 0x77,
  ts::TID_MPE_FEC = 0x78,
  ts::TID_RNT = 0x79,
  ts::TID_MPE_IFEC = 0x7A,
  ts::TID_DIT = 0x7E,
  ts::TID_SIT = 0x7F,
  ts::TID_ECM_80 = 0x80,
  ts::TID_ECM_81 = 0x81,
  ts::TID_EMM_FIRST = 0x82,
  ts::TID_EMM_82 = 0x82,
  ts::TID_EMM_83 = 0x83,
  ts::TID_EMM_84 = 0x84,
  ts::TID_EMM_85 = 0x85,
  ts::TID_EMM_86 = 0x86,
  ts::TID_EMM_87 = 0x87,
  ts::TID_EMM_88 = 0x88,
  ts::TID_EMM_89 = 0x89,
  ts::TID_EMM_8A = 0x8A,
  ts::TID_EMM_8B = 0x8B,
  ts::TID_EMM_8C = 0x8C,
  ts::TID_EMM_8D = 0x8D,
  ts::TID_EMM_8E = 0x8E,
  ts::TID_EMM_8F = 0x8F,
  ts::TID_EMM_LAST = 0x8F,
  ts::TID_EIT_MIN = 0x4E,
  ts::TID_EIT_MAX = 0x6F,
  ts::TID_CAS_FIRST = 0x80,
  ts::TID_CAS_LAST = 0x8F,
  ts::TID_SA_CECM_82 = 0x82,
  ts::TID_SA_CECM_83 = 0x83,
  ts::TID_SA_EMM_STB_U = 0x84,
  ts::TID_SA_EMM_STB_G = 0x85,
  ts::TID_SA_EMM_A = 0x86,
  ts::TID_SA_EMM_U = 0x87,
  ts::TID_SA_EMM_S = 0x88,
  ts::TID_SA_EMM_CAM_G = 0x89,
  ts::TID_SA_RECM_8A = 0x8A,
  ts::TID_SA_RECM_8B = 0x8B,
  ts::TID_SA_EMM_T = 0x8F,
  ts::TID_LW_DMT = 0x90,
  ts::TID_LW_BDT = 0x91,
  ts::TID_LW_VIT = 0x92,
  ts::TID_LW_VCT = 0x93,
  ts::TID_VIA_EMM_FT_E = 0x86,
  ts::TID_VIA_EMM_FT_O = 0x87,
  ts::TID_VIA_EMM_U = 0x88,
  ts::TID_VIA_EMM_GA_E = 0x8A,
  ts::TID_VIA_EMM_GA_O = 0x8B,
  ts::TID_VIA_EMM_GH_E = 0x8C,
  ts::TID_VIA_EMM_GH_O = 0x8D,
  ts::TID_VIA_EMM_S = 0x8E,
  ts::TID_MG_EMM_U = 0x82,
  ts::TID_MG_EMM_A = 0x83,
  ts::TID_MG_EMM_G = 0x84,
  ts::TID_MG_EMM_I = 0x85,
  ts::TID_MG_EMM_C = 0x86,
  ts::TID_MG_EMM_CG = 0x89,
  ts::TID_MGT = 0xC7,
  ts::TID_TVCT = 0xC8,
  ts::TID_CVCT = 0xC9,
  ts::TID_RRT = 0xCA,
  ts::TID_ATSC_EIT = 0xCB,
  ts::TID_ETT = 0xCC,
  ts::TID_STT = 0xCD,
  ts::TID_DCCT = 0xD3,
  ts::TID_DCCSCT = 0xD4,
  ts::TID_SCTE18_EAS = 0xD8,
  ts::TID_SCTE35_SIT = 0xFC,
  ts::TID_DCT = 0xC0,
  ts::TID_DLT = 0xC1,
  ts::TID_PCAT = 0xC2,
  ts::TID_SDTT = 0xC3,
  ts::TID_BIT = 0xC4,
  ts::TID_NBIT_BODY = 0xC5,
  ts::TID_NBIT_REF = 0xC6,
  ts::TID_LDT = 0xC7,
  ts::TID_CDT = 0xC8,
  ts::TID_LIT = 0xD0,
  ts::TID_ERT = 0xD1,
  ts::TID_ITT = 0xD2,
  ts::TID_AMT = 0xFE,
  ts::CUE_INSERT_NULL_SCHEDULE = 0x00,
  ts::CUE_ALL_COMMANDS = 0x01,
  ts::CUE_SEGMENTATION = 0x02,
  ts::CUE_TIERED_SPLICING = 0x03,
  ts::CUE_TIERED_SEGMENTATION = 0x04,
  ts::SC_CLEAR = 0,
  ts::SC_DVB_RESERVED = 1,
  ts::SC_EVEN_KEY = 2,
  ts::SC_ODD_KEY = 3
}
 Scrambling_control values (used in TS and PES packets headers) More...
 
enum  : PID {
  ts::IPv4_PROTO_ICMP = 1,
  ts::IPv4_PROTO_IGMP = 2,
  ts::IPv4_PROTO_TCP = 6,
  ts::IPv4_PROTO_UDP = 17,
  ts::IPv4_PROTO_V6_ENCAP = 41,
  ts::IPv4_PROTO_OSPF = 89,
  ts::IPv4_PROTO_SCTP = 132,
  ts::AVC_SEI_BUF_PERIOD = 0,
  ts::AVC_SEI_PIC_TIMING = 1,
  ts::AVC_SEI_PAN_SCAN_RECT = 2,
  ts::AVC_SEI_FILLER_PAYLOAD = 3,
  ts::AVC_SEI_USER_DATA_REG = 4,
  ts::AVC_SEI_USER_DATA_UNREG = 5,
  ts::AVC_SEI_RECOVERY_POINT = 6,
  ts::AVC_SEI_DEC_REF_PIC_MAR_REP = 7,
  ts::AVC_SEI_SPARE_PIC = 8,
  ts::AVC_SEI_SCENE_INFO = 9,
  ts::AVC_SEI_SUB_SEQ_INFO = 10,
  ts::AVC_SEI_SUB_SEQ_LAYER_CHARS = 11,
  ts::AVC_SEI_SUB_SEQ_CHARS = 12,
  ts::AVC_SEI_FFRAME_FREEZE = 13,
  ts::AVC_SEI_FFRAME_FREEZE_RELEASE = 14,
  ts::AVC_SEI_FFRAME_SNAPSHOT = 15,
  ts::AVC_SEI_PROG_REF_SEG_START = 16,
  ts::AVC_SEI_PROG_REF_SEG_END = 17,
  ts::AVC_SEI_MOTION_CSLICE_GROUP_SET = 18,
  ts::AVC_SEI_FILM_GRAIN_CHARS = 19,
  ts::AVC_SEI_DEBLOCK_FILTER_DISP_PREF = 20,
  ts::AVC_SEI_STEREO_VIDEO_INFO = 21,
  ts::AVC_SEI_POST_FILTER_HINT = 22,
  ts::AVC_SEI_TONE_MAPPING_INFO = 23,
  ts::AVC_SEI_SCALABILITY_INFO = 24,
  ts::AVC_SEI_SUB_PIC_SCALABLE_LAYER = 25,
  ts::AVC_SEI_NON_REQUIRED_LAYER_REP = 26,
  ts::AVC_SEI_PRIORITY_LAYER_INFO = 27,
  ts::AVC_SEI_LAYERS_NOT_PRESENT = 28,
  ts::AVC_SEI_LAYER_DEP_CHANGE = 29,
  ts::AVC_SEI_SCALABLE_NESTING = 30,
  ts::AVC_SEI_BASE_LAYER_TEMPORAL_HRD = 31,
  ts::AVC_SEI_QUALITY_LAYER_INTEG_CHECK = 32,
  ts::AVC_SEI_REDUNDANT_PIC_PROPERTY = 33,
  ts::AVC_SEI_TL0_PICTURE_INDEX = 34,
  ts::AVC_SEI_TL_SWITCHING_POINT = 35,
  ts::AVC_SEI_PARALLEL_DECODING_INFO = 36,
  ts::AVC_SEI_MVC_SCALABLE_NESTING = 37,
  ts::AVC_SEI_VIEW_SCALABILITY_INFO = 38,
  ts::AVC_SEI_MULTIVIEW_SCENE_INFO = 39,
  ts::AVC_SEI_MULTIVIEW_ACQUISITION = 40,
  ts::AVC_SEI_NON_REQUIRED_VIEW_COMP = 41,
  ts::AVC_SEI_VIEW_DEPENDENCY_CHANGE = 42,
  ts::AVC_SEI_OP_POINTS_NOT_PRESENT = 43,
  ts::AVC_SEI_BASE_VIEW_TEMPORAL_HRD = 44,
  ts::AVC_SEI_FRAME_PACKING_ARRANG = 45,
  ts::AVC_SEI_MULTIVIEW_VIEW_POSITION = 46,
  ts::AVC_SEI_DISPLAY_ORIENTATION = 47,
  ts::AVC_SEI_MVCD_SCALABLE_NESTING = 48,
  ts::AVC_SEI_MVCD_VIEW_SCALABILITY = 49,
  ts::AVC_SEI_DEPTH_REPRESENTATION = 50,
  ts::AVC_SEI_3D_REF_DISPLAYS_INFO = 51,
  ts::AVC_SEI_DEPTH_TIMING = 52,
  ts::AVC_SEI_DEPTH_SAMPLING_INFO = 53,
  ts::AVC_SEI_CONSTR_DEPTH_PARAMSET_ID = 54,
  ts::AVC_SEI_GREEN_METADATA = 56,
  ts::AVC_SEI_MASTER_DISP_COLOUR_VOLUME = 137,
  ts::AVC_SEI_COLOUR_REMAPPING_INFO = 142,
  ts::AVC_SEI_CONTENT_LIGHT_LEVEL_INFO = 144,
  ts::AVC_SEI_ALT_TRANSFER_CHARS = 147,
  ts::AVC_SEI_AMBIENT_VIEWING_ENV = 148,
  ts::AVC_SEI_CONTENT_COLOUR_VOLUME = 149,
  ts::AVC_SEI_EQUIRECTANGULAR_PROJECT = 150,
  ts::AVC_SEI_CUBEMAP_PROJECTION = 151,
  ts::AVC_SEI_SPHERE_ROTATION = 154,
  ts::AVC_SEI_REGIONWISE_PACKING = 155,
  ts::AVC_SEI_OMNI_VIEWPORT = 156,
  ts::AVC_SEI_ALTERNATIVE_DEPTH_INFO = 181,
  ts::AVC_SEI_MANIFEST = 200,
  ts::AVC_SEI_PREFIX_INDICATION = 201,
  ts::HEVC_PIC_TYPE_I = 0,
  ts::HEVC_PIC_TYPE_IP = 1,
  ts::HEVC_PIC_TYPE_IPB = 2,
  ts::FPS_23_976 = 0x01,
  ts::FPS_24 = 0x02,
  ts::FPS_25 = 0x03,
  ts::FPS_29_97 = 0x04,
  ts::FPS_30 = 0x05,
  ts::FPS_50 = 0x06,
  ts::FPS_59_94 = 0x07,
  ts::FPS_60 = 0x08,
  ts::VVC_PIC_TYPE_I = 0,
  ts::VVC_PIC_TYPE_IP = 1,
  ts::VVC_PIC_TYPE_IPB = 2,
  ts::PDS_BSKYB = 0x00000002,
  ts::PDS_BSKYB_2 = 0x00000003,
  ts::PDS_BSKYB_3 = 0x00000004,
  ts::PDS_NAGRA = 0x00000009,
  ts::PDS_NAGRA_2 = 0x0000000A,
  ts::PDS_NAGRA_3 = 0x0000000B,
  ts::PDS_NAGRA_4 = 0x0000000C,
  ts::PDS_NAGRA_5 = 0x0000000D,
  ts::PDS_TPS = 0x00000010,
  ts::PDS_EACEM = 0x00000028,
  ts::PDS_EICTA = PDS_EACEM,
  ts::PDS_NORDIG = 0x00000029,
  ts::PDS_LOGIWAYS = 0x000000A2,
  ts::PDS_CANALPLUS = 0x000000C0,
  ts::PDS_EUTELSAT = 0x0000055F,
  ts::PDS_OFCOM = 0x0000233A,
  ts::PDS_ATSC = 0x41545343,
  ts::PDS_ISDB = 0x49534442,
  ts::PDS_NULL = 0xFFFFFFFF,
  ts::SPLICE_NULL = 0x00,
  ts::SPLICE_SCHEDULE = 0x04,
  ts::SPLICE_INSERT = 0x05,
  ts::SPLICE_TIME_SIGNAL = 0x06,
  ts::SPLICE_BANDWIDTH_RESERVATION = 0x07,
  ts::SPLICE_PRIVATE_COMMAND = 0xFF,
  ts::PID_PAT = 0x0000,
  ts::PID_CAT = 0x0001,
  ts::PID_TSDT = 0x0002,
  ts::PID_MPEG_LAST = 0x000F,
  ts::PID_DVB_FIRST = 0x0010,
  ts::PID_NIT = 0x0010,
  ts::PID_SDT = 0x0011,
  ts::PID_BAT = 0x0011,
  ts::PID_EIT = 0x0012,
  ts::PID_CIT = 0x0012,
  ts::PID_RST = 0x0013,
  ts::PID_TDT = 0x0014,
  ts::PID_TOT = 0x0014,
  ts::PID_NETSYNC = 0x0015,
  ts::PID_RNT = 0x0016,
  ts::PID_INBSIGN = 0x001C,
  ts::PID_MEASURE = 0x001D,
  ts::PID_DIT = 0x001E,
  ts::PID_SIT = 0x001F,
  ts::PID_DVB_LAST = 0x001F,
  ts::PID_DCT = 0x0017,
  ts::PID_ISDB_FIRST = 0x0020,
  ts::PID_LIT = 0x0020,
  ts::PID_ERT = 0x0021,
  ts::PID_PCAT = 0x0022,
  ts::PID_SDTT = 0x0023,
  ts::PID_BIT = 0x0024,
  ts::PID_NBIT = 0x0025,
  ts::PID_LDT = 0x0025,
  ts::PID_ISDB_EIT_2 = 0x0026,
  ts::PID_ISDB_EIT_3 = 0x0027,
  ts::PID_SDTT_TER = 0x0028,
  ts::PID_CDT = 0x0029,
  ts::PID_AMT = 0x002E,
  ts::PID_ISDB_LAST = 0x002F,
  ts::PID_ATSC_FIRST = 0x1FF0,
  ts::PID_ATSC_PAT_E = 0x1FF7,
  ts::PID_PSIP_TS_E = 0x1FF9,
  ts::PID_PSIP = 0x1FFB,
  ts::PID_ATSC_LAST = 0x1FFE,
  ts::PID_NULL = 0x1FFF
}
 Predefined PID values. More...
 
enum  ts::BitRateConfidence {
  ts::BitRateConfidence::LOW,
  ts::BitRateConfidence::PCR_CONTINUOUS,
  ts::BitRateConfidence::PCR_AVERAGE,
  ts::BitRateConfidence::CLOCK,
  ts::BitRateConfidence::HARDWARE,
  ts::BitRateConfidence::OVERRIDE
}
 Confidence in a bitrate value. More...
 
enum  ts::PIDClass {
  ts::PIDClass::UNDEFINED,
  ts::PIDClass::PSI,
  ts::PIDClass::EMM,
  ts::PIDClass::ECM,
  ts::PIDClass::VIDEO,
  ts::PIDClass::AUDIO,
  ts::PIDClass::SUBTITLES,
  ts::PIDClass::DATA,
  ts::PIDClass::STUFFING
}
 Classification of PID's. More...
 

Functions

uint64_t ts::AbsDiffPCR (uint64_t pcr1, uint64_t pcr2)
 Compute the absolute value of the difference between two PCR's, regardless of their order. More...
 
uint64_t ts::DiffPCR (uint64_t pcr1, uint64_t pcr2)
 Compute the difference between PCR2 and PCR1. More...
 
uint64_t ts::DiffPTS (uint64_t pts1, uint64_t pts2)
 Compute the difference between PTS2 and PTS1. More...
 
uint64_t ts::NextPCR (uint64_t last_pcr, PacketCounter distance, const BitRate &bitrate)
 Compute the PCR of a packet, based on the PCR of a previous packet. More...
 
BitRate ts::PacketBitRate (PacketCounter packets, MilliSecond duration)
 Compute the bitrate from a number of packets transmitted during a given duration in milliseconds. More...
 
PacketCounter ts::PacketDistance (const BitRate &bitrate, MilliSecond duration)
 Compute the number of packets transmitted during a given duration in milliseconds. More...
 
PacketCounter ts::PacketDistanceFromPCR (BitRate bitrate, uint64_t pcr)
 Compute the number of packets transmitted during a given duration in PCR units. More...
 
MilliSecond ts::PacketInterval (const BitRate &bitrate, PacketCounter distance=1)
 Compute the interval, in milliseconds, between two packets. More...
 
MilliSecond ts::PCRToMilliSecond (uint64_t pcr)
 Convert a PCR value to milliseconds. More...
 
UString ts::PCRToString (uint64_t pcr, bool hexa=true, bool decimal=true, bool ms=true)
 Convert a PCR value to a string. More...
 
MilliSecond ts::PTSToMilliSecond (uint64_t pts)
 Convert a PTS or DTS value to milliseconds. More...
 
UString ts::PTSToString (uint64_t pts, bool hexa=true, bool decimal=true, bool ms=true)
 Convert a PTS or DTS value to a string. More...
 
PacketCounter ts::SectionPacketCount (size_t section_size)
 Compute the minimum number of TS packets required to transport a section. More...
 
BitRate ts::SelectBitrate (const BitRate &bitrate1, BitRateConfidence brc1, const BitRate &bitrate2, BitRateConfidence brc2)
 Select a bitrate from two input values with potentially different levels of confidence. More...
 
bool ts::SequencedPTS (uint64_t pts1, uint64_t pts2)
 Check if two Presentation Time Stamps are in sequence. More...
 
BitRate ts::ToBitrate188 (const BitRate &bitrate204)
 Convert 204-byte packet bitrate into 188-byte packet bitrate. More...
 
BitRate ts::ToBitrate204 (const BitRate &bitrate188)
 Convert 188-byte packet bitrate into 204-byte packet bitrate. More...
 
bool ts::WrapUpPCR (uint64_t pcr1, uint64_t pcr2)
 Check if PCR2 follows PCR1 after wrap up. More...
 
bool ts::WrapUpPTS (uint64_t pts1, uint64_t pts2)
 Check if PTS2 follows PTS1 after wrap up. More...
 

Variables

const PIDSet ts::AllPIDs
 PIDSet constant with all PID's set.
 
constexpr size_t ts::CC_BITS = 4
 Size (in bits) of a Continuity Counter (CC) field.
 
constexpr uint8_t ts::CC_MASK = 0x0F
 Mask to wrap a Continuity Counter (CC) value. More...
 
constexpr uint8_t ts::CC_MAX = 1 << CC_BITS
 Maximum value of a Continuity Counter (CC).
 
constexpr uint8_t ts::INVALID_CC = 0xFF
 An invalid Continuity Counter (CC) value, typically meaning "undefined".
 
constexpr uint64_t ts::INVALID_DTS =
 An invalid DTS value, can be used as a marker.
 
constexpr PacketCounter ts::INVALID_PACKET_COUNTER = std::numeric_limits<PacketCounter>::max()
 A impossible value for PacketCounter, meaning "undefined".
 
constexpr uint64_t ts::INVALID_PCR =
 An invalid PCR (Program Clock Reference) value, can be used as a marker.
 
constexpr uint64_t ts::INVALID_PTS =
 An invalid PTS value, can be used as a marker.
 
constexpr size_t ts::M2TS_HEADER_SIZE = 4
 Size in bytes of a timestamp preceeding a TS packet in M2TS files (Blu-ray disc).
 
constexpr uint64_t ts::MAX_PCR = PCR_SCALE - 1
 The maximum value possible for a PCR (Program Clock Reference) value.
 
constexpr uint64_t ts::MAX_PTS_DTS = PTS_DTS_SCALE - 1
 The maximum value possible for a PTS/DTS value.
 
const PIDSet ts::NoPID
 PIDSet constant with no PID set.
 
constexpr size_t ts::PCR_BIT_SIZE = 42
 Size in bits of a PCR (Program Clock Reference). More...
 
constexpr uint64_t ts::PCR_SCALE = PTS_DTS_SCALE * SYSTEM_CLOCK_SUBFACTOR
 Scale factor for PCR values. More...
 
constexpr size_t ts::PID_BITS = 13
 Size (in bits) of a PID field.
 
constexpr PID ts::PID_MAX = 1 << PID_BITS
 Maximum number of PID's (8192).
 
const Enumeration ts::PIDClassEnum
 Enumeration description of ts::PIDClass.
 
constexpr size_t ts::PKT_HEADER_SIZE = 4
 MPEG TS packet header size in bytes.
 
constexpr size_t ts::PKT_M2TS_SIZE = M2TS_HEADER_SIZE + PKT_SIZE
 Size in bytes of an TS packet in M2TS files (Blu-ray disc). More...
 
constexpr size_t ts::PKT_MAX_PAYLOAD_SIZE = PKT_SIZE - PKT_HEADER_SIZE
 MPEG TS packet maximum payload size in bytes.
 
constexpr size_t ts::PKT_RS_SIZE = PKT_SIZE + RS_SIZE
 Size in bytes of a TS packet with trailing Reed-Solomon outer FEC.
 
constexpr size_t ts::PKT_RS_SIZE_BITS = 8 * PKT_RS_SIZE
 Size in bits of a TS packet with trailing Reed-Solomon outer FEC.
 
constexpr size_t ts::PKT_SIZE = 188
 MPEG TS packet size in bytes.
 
constexpr size_t ts::PKT_SIZE_BITS = 8 * PKT_SIZE
 MPEG TS packet size in bits.
 
constexpr size_t ts::PTS_DTS_BIT_SIZE = 33
 Size in bits of a PTS (Presentation Time Stamp) or DTS (Decoding Time Stamp). More...
 
constexpr uint64_t ts::PTS_DTS_MASK = PTS_DTS_SCALE - 1
 Mask for PTS and DTS values (wrap up at 2^33).
 
constexpr uint64_t ts::PTS_DTS_SCALE = << PTS_DTS_BIT_SIZE
 Scale factor for PTS and DTS values (wrap up at 2^33).
 
constexpr size_t ts::RS_SIZE = 16
 Size in bytes of a Reed-Solomon outer FEC.
 
constexpr uint8_t ts::SYNC_BYTE = 0x47
 Value of a sync byte (first byte in a TS packet).
 
constexpr uint32_t ts::SYSTEM_CLOCK_FREQ = 27000000
 MPEG-2 System Clock frequency in Hz, used by PCR (27 Mb/s).
 
constexpr uint32_t ts::SYSTEM_CLOCK_SUBFACTOR = 300
 Subfactor of MPEG-2 System Clock subfrequency, used by PTS and DTS.
 
constexpr uint32_t ts::SYSTEM_CLOCK_SUBFREQ = SYSTEM_CLOCK_FREQ / SYSTEM_CLOCK_SUBFACTOR
 MPEG-2 System Clock subfrequency in Hz, used by PTS and DTS (90 Kb/s).
 

Detailed Description

Common definitions for MPEG Transport Stream layer.