TSDuck v3.46-4964
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches

Classes

class  ts::TimeSourceSuperTraits< T, typename std::enable_if< T==TimeSource::PCR||T==TimeSource::OPCR >::type >
class  ts::TimeSourceSuperTraits< T, typename std::enable_if< T==TimeSource::PTS||T==TimeSource::DTS >::type >
class  ts::TimeSourceTraits< T >

Namespaces

namespace  ts
 TSDuck namespace, containing all TSDuck classes and functions.

Typedefs

using ts::DTS = DTSTraits::Duration
 DTS units as a std::chrono::duration type.
using ts::DTSTraits = TimeSourceTraits<TimeSource::DTS>
 DTS traits class.
using ts::PacketCounter = uint64_t
using ts::PCR = PCRTraits::Duration
 PCR units as a std::chrono::duration type.
using ts::PCRTraits = TimeSourceTraits<TimeSource::PCR>
 PCR traits class.
using ts::PID = uint16_t
using ts::PIDSet = std::bitset<PID_MAX>
using ts::PTS = PTSTraits::Duration
 PTS units as a std::chrono::duration type.
using ts::PTSTraits = TimeSourceTraits<TimeSource::PTS>
 PTS traits class.

Enumerations

enum  : PID {
  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_SAT = 0x001B ,
  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_IIP = 0x1FF0 ,
  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  : uint8_t {
  ts::AFDID_TIMELINE = 0x04 ,
  ts::AFDID_LOCATION = 0x05 ,
  ts::AFDID_BASEURL = 0x06 ,
  ts::AFDID_CETS_BRANGE = 0x07 ,
  ts::AFDID_3DA_EXTSTREAM = 0x08 ,
  ts::AFDID_3DA_MULTISTREAM = 0x09 ,
  ts::AFDID_3DA_COMMAND = 0x0A ,
  ts::AFDID_BOUNDARY = 0x0B ,
  ts::AFDID_LABELING = 0x0C ,
  ts::AFDID_HEVC_TILE = 0x0D
}
enum  : uint8_t {
  ts::SC_CLEAR = 0 ,
  ts::SC_DVB_RESERVED = 1 ,
  ts::SC_EVEN_KEY = 2 ,
  ts::SC_ODD_KEY = 3
}
enum class  ts::BitRateConfidence {
  ts::LOW ,
  ts::PCR_CONTINUOUS ,
  ts::PCR_AVERAGE ,
  ts::CLOCK ,
  ts::HARDWARE ,
  ts::OVERRIDE
}
enum  ts::PacketProcessStatus {
  ts::TSP_OK = 0 ,
  ts::TSP_END = 1 ,
  ts::TSP_DROP = 2 ,
  ts::TSP_NULL = 3
}
enum class  ts::PIDClass {
  ts::UNDEFINED ,
  ts::PSI ,
  ts::EMM ,
  ts::ECM ,
  ts::VIDEO ,
  ts::AUDIO ,
  ts::SUBTITLES ,
  ts::DATA ,
  ts::PCR_ONLY ,
  ts::STUFFING
}
 Classification of PID's. More...
enum class  ts::TimeSource : uint8_t {
  ts::UNDEFINED = 0 ,
  ts::HARDWARE ,
  ts::KERNEL ,
  ts::TSP ,
  ts::RTP ,
  ts::SRT ,
  ts::M2TS ,
  ts::PCR ,
  ts::OPCR ,
  ts::DTS ,
  ts::PTS ,
  ts::PCAP ,
  ts::RIST
}

Functions

const PIDSet & ts::AllPIDs ()
template<class Rep, class Period>
int64_t ts::BitDistance (size_t bits, const BitRate &bitrate, const cn::duration< Rep, Period > &duration)
template<class Rep, class Period>
int64_t ts::ByteDistance (const BitRate &bitrate, const cn::duration< Rep, Period > &duration)
template<class DURATION = cn::milliseconds>
requires std::integral<typename DURATION::rep>
DURATION ts::ByteInterval (const BitRate &bitrate, std::intmax_t distance)
template<class Rep, class Period>
BitRate ts::BytesBitRate (uint64_t bytes, const cn::duration< Rep, Period > &duration)
bool ts::MonotonicTimeSource (TimeSource source)
const PIDSet & ts::NoPID ()
template<class Rep, class Period>
BitRate ts::PacketBitRate (PacketCounter packets, const cn::duration< Rep, Period > &duration)
template<class Rep, class Period>
PacketCounter ts::PacketDistance (const BitRate &bitrate, const cn::duration< Rep, Period > &duration)
template<class DURATION = cn::milliseconds>
requires std::integral<typename DURATION::rep>
DURATION ts::PacketInterval (const BitRate &bitrate, PacketCounter distance)
const Names & ts::PacketProcessingStatusNames ()
const Names & ts::PIDClassEnum ()
const Names & ts::PIDClassIdentifier ()
PacketCounter ts::SectionPacketCount (size_t section_size)
BitRate ts::SelectBitrate (const BitRate &bitrate1, BitRateConfidence brc1, const BitRate &bitrate2, BitRateConfidence brc2)
const Names & ts::TimeSourceEnum ()
BitRate ts::ToBitrate188 (const BitRate &bitrate204)
BitRate ts::ToBitrate204 (const BitRate &bitrate188)

Variables

constexpr size_t ts::CC_BITS = 4
constexpr uint8_t ts::CC_MASK = 0x0F
constexpr uint8_t ts::CC_MAX = 1 << CC_BITS
constexpr uint8_t ts::INVALID_CC = 0xFF
constexpr uint64_t ts::INVALID_DTS = DTSTraits::INVALID
 An invalid DTS value, can be used as a marker.
constexpr PacketCounter ts::INVALID_PACKET_COUNTER = std::numeric_limits<PacketCounter>::max()
constexpr uint64_t ts::INVALID_PCR = PCRTraits::INVALID
 An invalid PCR value, can be used as a marker.
constexpr uint64_t ts::INVALID_PTS = PTSTraits::INVALID
 An invalid PTS value, can be used as a marker.
constexpr size_t ts::M2TS_HEADER_SIZE = 4
constexpr size_t ts::PID_BITS = 13
constexpr PID ts::PID_MAX = 1 << PID_BITS
constexpr size_t ts::PKT_HEADER_SIZE = 4
constexpr size_t ts::PKT_M2TS_SIZE = M2TS_HEADER_SIZE + PKT_SIZE
constexpr size_t ts::PKT_MAX_AF_SIZE = PKT_SIZE - PKT_HEADER_SIZE - 1
constexpr size_t ts::PKT_MAX_PAYLOAD_SIZE = PKT_SIZE - PKT_HEADER_SIZE
constexpr size_t ts::PKT_RS_SIZE = PKT_SIZE + RS_SIZE
constexpr size_t ts::PKT_RS_SIZE_BITS = 8 * PKT_RS_SIZE
constexpr size_t ts::PKT_SIZE = 188
constexpr size_t ts::PKT_SIZE_BITS = 8 * PKT_SIZE
constexpr uint64_t ts::PTS_DTS_MASK = TimeSourceSuperTraits<TimeSource::PTS>::BIT_MASK
constexpr size_t ts::RS_SIZE = 16
constexpr uint8_t ts::SYNC_BYTE = 0x47
constexpr uint64_t ts::SYSTEM_CLOCK_FREQ = PCRTraits::TICKS
constexpr uint64_t ts::SYSTEM_CLOCK_SUBFACTOR = PCRTraits::TICKS / PTSTraits::TICKS
constexpr uint64_t ts::SYSTEM_CLOCK_SUBFREQ = PTSTraits::TICKS

Detailed Description

Common definitions for MPEG Transport Stream layer.