![]() |
TSDuck v3.46-4930
MPEG Transport Stream Toolkit
|
#include <tsModulationArgs.h>


Classes | |
| class | RegisterBitRateCalculator |
Public Types | |
| using | BitRateCalculator = bool (*)(BitRate& bitrate, const ModulationArgs& args) |
Public Member Functions | |
| ModulationArgs ()=default | |
| virtual void | clear () |
| void | copyLocalReceptionParameters (const ModulationArgs &other) |
| virtual void | defineArgs (Args &args, bool allow_short_options) |
| virtual std::ostream & | display (std::ostream &strm, const UString &margin=UString(), int level=Severity::Info) const override |
| bool | fromDeliveryDescriptor (DuckContext &duck, const Descriptor &desc, uint16_t ts_id, DeliverySystem delsys=DS_UNDEFINED) |
| bool | fromDeliveryDescriptors (DuckContext &duck, const DescriptorList &dlist, uint16_t ts_id, DeliverySystem delsys=DS_UNDEFINED) |
| bool | hasModulationArgs () const |
| virtual bool | loadArgs (DuckContext &duck, Args &args) |
| void | resetLocalReceptionParameters () |
| bool | resolveDeliverySystem (const DeliverySystemSet &systems, Report &report) |
| void | setDefaultValues () |
| UString | shortDescription (DuckContext &duck) const |
| BitRate | theoreticalBitrate () const |
| void | toJSON (json::Object &obj) const |
| UString | toPluginOptions (bool no_local=false) const |
Static Public Member Functions | |
| static bool | IsValidISDBTTimeInterleaving (int ti) |
Public Attributes | |
| bool | allow_emulator_pipes = false |
| std::optional< BandWidth > | bandwidth {} |
| std::optional< DeliverySystem > | delivery_system {} |
| std::optional< InnerFEC > | fec_hp {} |
| std::optional< InnerFEC > | fec_lp {} |
| std::optional< uint64_t > | frequency {} |
| std::optional< GuardInterval > | guard_interval {} |
| std::optional< Hierarchy > | hierarchy {} |
| std::optional< InnerFEC > | inner_fec {} |
| std::optional< SpectralInversion > | inversion {} |
| std::optional< UString > | isdbt_layers {} |
| std::optional< bool > | isdbt_partial_reception {} |
| std::optional< uint32_t > | isi {} |
| std::optional< InnerFEC > | layer_a_fec {} |
| std::optional< Modulation > | layer_a_modulation {} |
| std::optional< int > | layer_a_segment_count {} |
| std::optional< int > | layer_a_time_interleaving {} |
| std::optional< InnerFEC > | layer_b_fec {} |
| std::optional< Modulation > | layer_b_modulation {} |
| std::optional< int > | layer_b_segment_count {} |
| std::optional< int > | layer_b_time_interleaving {} |
| std::optional< InnerFEC > | layer_c_fec {} |
| std::optional< Modulation > | layer_c_modulation {} |
| std::optional< int > | layer_c_segment_count {} |
| std::optional< int > | layer_c_time_interleaving {} |
| std::optional< LNB > | lnb {} |
| std::optional< Modulation > | modulation {} |
| std::optional< Pilot > | pilots {} |
| std::optional< uint32_t > | plp {} |
| std::optional< uint32_t > | pls_code {} |
| std::optional< PLSMode > | pls_mode {} |
| std::optional< Polarization > | polarity {} |
| std::optional< RollOff > | roll_off {} |
| std::optional< size_t > | satellite_number {} |
| std::optional< int > | sb_segment_count {} |
| std::optional< int > | sb_segment_index {} |
| std::optional< int > | sb_subchannel_id {} |
| std::optional< bool > | sound_broadcasting {} |
| std::optional< uint32_t > | stream_id {} |
| std::optional< uint32_t > | symbol_rate {} |
| std::optional< TransmissionMode > | transmission_mode {} |
| std::optional< Unicable > | unicable {} |
Modulation parameters for tuners and their command-line definitions.
All values may be "set" or "unset", depending on command line arguments. All options for all types of tuners are included here.
| using ts::ModulationArgs::BitRateCalculator = bool (*)(BitRate& bitrate, const ModulationArgs& args) |
Function profile to calculate a bitrate from a set modulation arguments. Calculating a bitrate can be complicated and delegated to another library. Therefore, it is possible to register various BitRateCalculator functions.
| [out] | bitrate | Computed bitrate. |
| [in] | args | Modulation arguments. |
|
default |
Default constructor.
|
static |
Check if an ISDB-T time interleaving value is valid.
| [in] | ti | Time interleaving value. Valid values: 0, 1, 2, 4 or -1 (auto). |
|
virtual |
Add command line option definitions in an Args.
| [in,out] | args | Command line arguments to update. |
| [in] | allow_short_options | If true, allow short one-letter options. |
Reimplemented in ts::TunerArgs.
|
virtual |
Load arguments from command line. Args error indicator is set in case of incorrect arguments.
| [in,out] | duck | TSDuck execution context. |
| [in,out] | args | Command line arguments. |
Reimplemented in ts::TunerArgs.
|
overridevirtual |
Display the content of this object to a stream.
| [in,out] | stream | The stream where to print the content. Standard output by default. |
| [in] | margin | The prefix string on each line, empty by default. |
| [in] | level | Severity level (for instance, Severity::Info or Severity::Debug may display more information). |
Implements ts::DisplayInterface.
|
virtual |
Clear content, reset all values, they become "unset"
Reimplemented in ts::TunerArgs.
| bool ts::ModulationArgs::hasModulationArgs | ( | ) | const |
Check if any modulation options is set.
| bool ts::ModulationArgs::resolveDeliverySystem | ( | const DeliverySystemSet & | systems, |
| Report & | report ) |
Check the validity of the delivery system or set a default one.
| [in] | systems | The possible delivery systems, typically from a tuner. If the delivery system is already defined, it must be in this set. If it is not defined, the first delivery system is used. |
| [in,out] | report | Where to report errors. |
| void ts::ModulationArgs::setDefaultValues | ( | ) |
Set the default values for unset parameters, according to the delivery system. Do nothing if the delivery system is unset.
| void ts::ModulationArgs::resetLocalReceptionParameters | ( | ) |
Reset the local reception parameters, they become "unset" The "local reception parameters" configure the receiving equipment (typically the dish) without affecting the received carrier signal.
| void ts::ModulationArgs::copyLocalReceptionParameters | ( | const ModulationArgs & | other | ) |
Copy the local reception parameters from another instance. The "local reception parameters" configure the receiving equipment (typically the dish) without affecting the received carrier signal.
| [in] | other | Another instance from which the local reception parameters are copied. Local reception parameters which are not set in @^a other are left unmodified in this instance. |
| BitRate ts::ModulationArgs::theoreticalBitrate | ( | ) | const |
Theoretical bitrate computation. All registered BitRateCalculator functions are called until one can compute the bitrate.
| bool ts::ModulationArgs::fromDeliveryDescriptor | ( | DuckContext & | duck, |
| const Descriptor & | desc, | ||
| uint16_t | ts_id, | ||
| DeliverySystem | delsys = DS_UNDEFINED ) |
Fill modulation parameters from a delivery system descriptor. This method only sets the modulation parameters from the descriptor. Other parameters are unchanged. This method can be invoked several times, on each descriptor of a descriptor list, to grab incremental values for DVB-S2 for instance.
| [in,out] | duck | TSDuck execution context. |
| [in] | desc | A descriptor. Must be a valid delivery system descriptor. |
| [in] | ts_id | Tranport stream id of the TS which is described by the delivery system descriptor. |
| [in] | delsys | Optional delivery system of the TS from which the descriptor was extracted. In the case of cable_delivery_system_descriptor, it helps to characterize the target delivery system. |
| bool ts::ModulationArgs::fromDeliveryDescriptors | ( | DuckContext & | duck, |
| const DescriptorList & | dlist, | ||
| uint16_t | ts_id, | ||
| DeliverySystem | delsys = DS_UNDEFINED ) |
Fill modulation parameters from delivery system descriptors in a descriptor list.
| [in,out] | duck | TSDuck execution context. |
| [in] | dlist | A descriptor list. |
| [in] | ts_id | Tranport stream id of the TS which is described by the delivery system descriptor. |
| [in] | delsys | Optional delivery system of the TS from which the descriptor list was extracted. In the case of cable_delivery_system_descriptor, it helps to characterize the target delivery system. |
| UString ts::ModulationArgs::shortDescription | ( | DuckContext & | duck | ) | const |
Format a short description (frequency and essential parameters).
| [out] | duck | TSDuck execution context. |
| UString ts::ModulationArgs::toPluginOptions | ( | bool | no_local = false | ) | const |
Format the modulation parameters as command line arguments.
| [in] | no_local | When true, the "local" options are not included. The local options are related to the local equipment (–lnb for instance) and may vary from one system to another for the same transponder. |
| void ts::ModulationArgs::toJSON | ( | json::Object & | obj | ) | const |
Format the modulation parameters in a JSON object.
| [in,out] | obj | JSON object into which the modulation parameters are added. |
| std::optional<DeliverySystem> ts::ModulationArgs::delivery_system {} |
Delivery system (DS_DVB_*). Applies to all tuners. When unset, the default delivery system for that tuner is used.
| std::optional<uint64_t> ts::ModulationArgs::frequency {} |
Frequency in Hz. Applies to all tuners. This is a mandatory parameter.
| std::optional<Polarization> ts::ModulationArgs::polarity {} |
Polarity. Applies to: DVB-S/S2, ISDB-S.
|
staticconstexpr |
Default value for polarity.
| std::optional<LNB> ts::ModulationArgs::lnb {} |
Local dish LNB for frequency adjustment. Applies to: DVB-S/S2, ISDB-S.
| std::optional<Unicable> ts::ModulationArgs::unicable {} |
| std::optional<SpectralInversion> ts::ModulationArgs::inversion {} |
Spectral inversion. Applies to: DVB-T/T2, DVB-S/S2, DVB-C (A,B,C), ATSC, ISDB-T, ISDB-S.
|
staticconstexpr |
Default value for inversion.
| std::optional<uint32_t> ts::ModulationArgs::symbol_rate {} |
Symbol rate in symbols / second. Applies to: DVB-S/S2, DVB-C (A,C), ISDB-S.
|
staticconstexpr |
Default value for symbol_rate on DVB-S.
|
staticconstexpr |
Default value for symbol_rate on DVB-C.
|
staticconstexpr |
Default value for symbol_rate on ISDB-S.
| std::optional<InnerFEC> ts::ModulationArgs::inner_fec {} |
Error correction. Applies to: DVB-S/S2, DVB-C (A,C), ISDB-S.
Default value for inner_fec.
| std::optional<size_t> ts::ModulationArgs::satellite_number {} |
Satellite index for DiSeqC switches. Applies to: DVB-S/S2, ISDB-S.
|
staticconstexpr |
Default value for satellite_number.
| std::optional<Modulation> ts::ModulationArgs::modulation {} |
Constellation or modulation type. Applies to: DVB-T/T2, DVB-S2/Turbo, DVB-C (A,B,C), ATSC.
|
staticconstexpr |
Default value for modulation on satellite.
|
staticconstexpr |
Default value for modulation on terrestrial.
|
staticconstexpr |
Default value for modulation on cable.
|
staticconstexpr |
Default value for modulation on ATSC.
| std::optional<BandWidth> ts::ModulationArgs::bandwidth {} |
Bandwidth in Hz. Applies to: DVB-T/T2, ISDB-T.
|
staticconstexpr |
Default value for bandwidth on DVB-T.
|
staticconstexpr |
Default value for bandwidth on ISDB-T.
| std::optional<InnerFEC> ts::ModulationArgs::fec_hp {} |
High priority stream code rate. Applies to: DVB-T/T2.
| std::optional<InnerFEC> ts::ModulationArgs::fec_lp {} |
Low priority stream code rate. Applies to: DVB-T/T2.
| std::optional<TransmissionMode> ts::ModulationArgs::transmission_mode {} |
Transmission mode. Applies to: DVB-T/T2, ISDB-T.
|
staticconstexpr |
Default value for transmission_mode on DVB-T.
|
staticconstexpr |
Default value for transmission_mode on ISDB-T.
| std::optional<GuardInterval> ts::ModulationArgs::guard_interval {} |
Guard interval. Applies to: DVB-T/T2, ISDB-T.
|
staticconstexpr |
Default value for guard_interval on DVB-T.
|
staticconstexpr |
Default value for guard_interval on ISDB-T.
|
staticconstexpr |
Default value for hierarchy.
| std::optional<Pilot> ts::ModulationArgs::pilots {} |
Presence of pilots. Applies to: DVB-S2.
| std::optional<RollOff> ts::ModulationArgs::roll_off {} |
Roll-off factor. Applies to: DVB-S2.
|
staticconstexpr |
Default value for roll_off. Implied value in DVB-S, default for DVB-S2.
| std::optional<uint32_t> ts::ModulationArgs::plp {} |
Physical Layer Pipe (PLP) identification. Applies to: DVB-T2.
|
staticconstexpr |
Default value for PLP id.
| std::optional<uint32_t> ts::ModulationArgs::isi {} |
Input Stream Id (ISI). Applies to: DVB-S2.
|
staticconstexpr |
Default value for input stream id.
| std::optional<uint32_t> ts::ModulationArgs::pls_code {} |
Physical Layer Scrambling (PLS) code. Applies to: DVB-S2.
|
staticconstexpr |
Default value for PLS code.
| std::optional<PLSMode> ts::ModulationArgs::pls_mode {} |
Physical Layer Scrambling (PLS) mode. Applies to: DVB-S2.
| std::optional<bool> ts::ModulationArgs::sound_broadcasting {} |
Sound broadcasting. When specified to true, the reception is an ISDB-Tsb channel instead of an ISDB-T one. Applies to: ISDB-T.
| std::optional<int> ts::ModulationArgs::sb_subchannel_id {} |
Sound broadcasting sub-channel id. When sound_broadcasting is specified to true, specify the sub-channel ID of the segment to be demodulated in the ISDB-Tsb channel. Possible values: 0 to 41. Applies to: ISDB-T.
|
staticconstexpr |
Default value for ISDB-Tsb sub-channel id.
| std::optional<int> ts::ModulationArgs::sb_segment_count {} |
Sound broadcasting segment count. When sound_broadcasting is specified to true, specify the total count of connected ISDB-Tsb channels. Possible values: 1 to 13. Applies to: ISDB-T.
|
staticconstexpr |
Default value for ISDB-Tsb segment count.
| std::optional<int> ts::ModulationArgs::sb_segment_index {} |
Sound broadcasting segment index. When sound_broadcasting is specified to true, specify the index of the segment to be demodulated for an ISDB-Tsb channel where several of them are transmitted in the connected manner. Possible values: 0 to sb_segment_count - 1. Applies to: ISDB-T.
|
staticconstexpr |
Default value for ISDB-Tsb segment index.
| std::optional<UString> ts::ModulationArgs::isdbt_layers {} |
ISDB-T hierarchical layers ISDB-T channels can be coded hierarchically. As opposed to DVB-T in ISDB-T hierarchical layers can be decoded simultaneously. For that reason a ISDB-T demodulator has 3 viterbi and 3 reed-solomon-decoders. ISDB-T has 3 hierarchical layers which each can use a part of the available segments. The total number of segments over all layers has to 13 in ISDB-T. Hierarchical reception in ISDB-T is achieved by enabling or disabling layers in the decoding process. The specified string contains a combination of characters 'A', 'B', 'C', indicating which layers shall be used. Applies to: ISDB-T.
|
staticconstexpr |
Default value for ISDB-T layers (all layers: "ABC").
| std::optional<bool> ts::ModulationArgs::isdbt_partial_reception {} |
ISDB-T partial reception. When specified to true, the reception of the ISDB-T channel is in partial reception mode. Applies to: ISDB-T.
|
staticconstexpr |
Maximum value for ISDB-T segment count.
| std::optional<InnerFEC> ts::ModulationArgs::layer_a_fec {} |
Layer A code rate. Must be one of FEC_AUTO, FEC_1_2, FEC_2_3, FEC_3_4, FEC_5_6, FEC_7_8. The default is automatically detected. Applies to: ISDB-T.
| std::optional<Modulation> ts::ModulationArgs::layer_a_modulation {} |
Layer A modulation. Must be one of QAM_AUTO, QPSK, QAM_16, QAM_64, DQPSK. The default is automatically detected. Applies to: ISDB-T.
| std::optional<int> ts::ModulationArgs::layer_a_segment_count {} |
Layer A segment count. Possible values: 0 to 13 or -1 (auto). The default is automatically detected. Applies to: ISDB-T.
| std::optional<int> ts::ModulationArgs::layer_a_time_interleaving {} |
Layer A time interleaving. Possible values: 0, 1, 2, 4 or -1 (auto). The default is automatically detected. Applies to: ISDB-T.
| std::optional<InnerFEC> ts::ModulationArgs::layer_b_fec {} |
Layer B code rate. Must be one of FEC_AUTO, FEC_1_2, FEC_2_3, FEC_3_4, FEC_5_6, FEC_7_8. The default is automatically detected. Applies to: ISDB-T.
| std::optional<Modulation> ts::ModulationArgs::layer_b_modulation {} |
Layer B modulation. Must be one of QAM_AUTO, QPSK, QAM_16, QAM_64, DQPSK. The default is automatically detected. Applies to: ISDB-T.
| std::optional<int> ts::ModulationArgs::layer_b_segment_count {} |
Layer B segment count. Possible values: 0 to 13 or -1 (auto). The default is automatically detected. Applies to: ISDB-T.
| std::optional<int> ts::ModulationArgs::layer_b_time_interleaving {} |
Layer B time interleaving. Possible values: 0, 1, 2, 4 or -1 (auto). The default is automatically detected. Applies to: ISDB-T.
| std::optional<InnerFEC> ts::ModulationArgs::layer_c_fec {} |
Layer C code rate. Must be one of FEC_AUTO, FEC_1_2, FEC_2_3, FEC_3_4, FEC_5_6, FEC_7_8. The default is automatically detected. Applies to: ISDB-T.
| std::optional<Modulation> ts::ModulationArgs::layer_c_modulation {} |
Layer C modulation. Must be one of QAM_AUTO, QPSK, QAM_16, QAM_64, DQPSK. The default is automatically detected. Applies to: ISDB-T.
| std::optional<int> ts::ModulationArgs::layer_c_segment_count {} |
Layer C segment count. Possible values: 0 to 13 or -1 (auto). The default is automatically detected. Applies to: ISDB-T.
| std::optional<int> ts::ModulationArgs::layer_c_time_interleaving {} |
Layer C time interleaving. Possible values: 0, 1, 2, 4 or -1 (auto). The default is automatically detected. Applies to: ISDB-T.
| std::optional<uint32_t> ts::ModulationArgs::stream_id {} |
Inner stream id (same as inner transport stream id). Applies to: ISDB-S (multi-stream).
|
staticconstexpr |
Default value for inner stream id.
| bool ts::ModulationArgs::allow_emulator_pipes = false |
Allow the tuner emulator to run processes using pipes. The TSDuck tuner emulator uses XML files to describe transport streams in an emulated network. The content of a transport stream can be read from a file or from the output of a piped command. By default, running commands through the emulator is disabled for security reasons. This option authorizes the creation of processes. Applies to: TSDuck tuner emulator.