![]() |
TSDuck v3.45-4777
MPEG Transport Stream Toolkit
|
Common definitions for MPEG Transport Stream layer. More...
Classes | |
| class | ts::TimeSourceSuperTraits< T, typename std::enable_if< T==TimeSource::PCR||T==TimeSource::OPCR >::type > |
| TimeSourceSuperTraits specialization for PCR and OPCR. More... | |
| class | ts::TimeSourceSuperTraits< T, typename std::enable_if< T==TimeSource::PTS||T==TimeSource::DTS >::type > |
| TimeSourceSuperTraits specialization for PTS and DTS. More... | |
| class | ts::TimeSourceTraits< T > |
| Traits class for TimeSource values. More... | |
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 |
| Number of Transport Stream packets. | |
| 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 |
| PID value (13 bits). | |
| using | ts::PIDSet = std::bitset< PID_MAX > |
| A bit mask for PID values. | |
| using | ts::PTS = PTSTraits::Duration |
| PTS units as a std::chrono::duration type. | |
| using | ts::PTSTraits = TimeSourceTraits< TimeSource::PTS > |
| PTS traits class. | |
Functions | |
| const PIDSet & | ts::AllPIDs () |
| PIDSet constant with all PID's set. | |
| template<class Rep , class Period > | |
| int64_t | ts::BitDistance (size_t bits, const BitRate &bitrate, const cn::duration< Rep, Period > &duration) |
| Compute the number of "data structures" (bytes, packets, etc) transmitted during a given duration. | |
| template<class Rep , class Period > | |
| int64_t | ts::ByteDistance (const BitRate &bitrate, const cn::duration< Rep, Period > &duration) |
| Compute the number of bytes transmitted during a given duration. | |
| template<class DURATION = cn::milliseconds> requires std::integral<typename DURATION::rep> | |
| DURATION | ts::ByteInterval (const BitRate &bitrate, std::intmax_t distance) |
| Compute the interval, in duration, between two bytes in the transport stream. | |
| template<class Rep , class Period > | |
| BitRate | ts::BytesBitRate (uint64_t bytes, const cn::duration< Rep, Period > &duration) |
| Compute the bitrate from a number of bytes transmitted during a given duration. | |
| bool | ts::MonotonicTimeSource (TimeSource source) |
| Check if a ts::TimeSource value is a monotonic clock. | |
| const PIDSet & | ts::NoPID () |
| PIDSet constant with no PID set. | |
| template<class Rep , class Period > | |
| BitRate | ts::PacketBitRate (PacketCounter packets, const cn::duration< Rep, Period > &duration) |
| Compute the bitrate from a number of packets transmitted during a given duration. | |
| template<class Rep , class Period > | |
| PacketCounter | ts::PacketDistance (const BitRate &bitrate, const cn::duration< Rep, Period > &duration) |
| Compute the number of packets transmitted during a given duration. | |
| template<class DURATION = cn::milliseconds> requires std::integral<typename DURATION::rep> | |
| DURATION | ts::PacketInterval (const BitRate &bitrate, PacketCounter distance) |
| Compute the interval, in duration, between two packets. | |
| const Names & | ts::PacketProcessingStatusNames () |
| Names of packet procesing status values. | |
| const Names & | ts::PIDClassEnum () |
| Enumeration description of ts::PIDClass with meaningful names. | |
| const Names & | ts::PIDClassIdentifier () |
| Enumeration description of ts::PIDClass with simple lowercase identifiers. | |
| PacketCounter | ts::SectionPacketCount (size_t section_size) |
| Compute the minimum number of TS packets required to transport a section. | |
| 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. | |
| const Names & | ts::TimeSourceEnum () |
| Enumeration description of ts::TimeSource. | |
| BitRate | ts::ToBitrate188 (const BitRate &bitrate204) |
| Convert 204-byte packet bitrate into 188-byte packet bitrate. | |
| BitRate | ts::ToBitrate204 (const BitRate &bitrate188) |
| Convert 188-byte packet bitrate into 204-byte packet bitrate. | |
Variables | |
| 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. | |
| 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 = DTSTraits::INVALID |
| 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 = 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 |
| Size in bytes of a timestamp preceeding a TS packet in M2TS files (Blu-ray disc). | |
| constexpr uint64_t | ts::PCR_SCALE = PCRTraits::SCALE |
| Scale factor for PCR values. | |
| 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). | |
| 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). | |
| 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 uint64_t | ts::PTS_DTS_MASK = PTSTraits::SCALE - 1 |
| Mask for PTS and DTS values (wrap up at 2^33). | |
| constexpr uint64_t | ts::PTS_DTS_SCALE = PTSTraits::SCALE |
| 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 uint64_t | ts::SYSTEM_CLOCK_FREQ = PCRTraits::TICKS |
| MPEG-2 System Clock frequency in Hz, used by PCR (27 Mb/s). | |
| constexpr uint64_t | ts::SYSTEM_CLOCK_SUBFACTOR = PCRTraits::TICKS / PTSTraits::TICKS |
| Subfactor of MPEG-2 System Clock subfrequency, used by PTS and DTS. | |
| constexpr uint64_t | ts::SYSTEM_CLOCK_SUBFREQ = PTSTraits::TICKS |
| MPEG-2 System Clock subfrequency in Hz, used by PTS and DTS (90 Kb/s). | |
Common definitions for MPEG Transport Stream layer.