TSDuck v3.40-3963
MPEG Transport Stream Toolkit
|
Parameters for tuners and their command-line definitions. More...
#include <tsTunerArgs.h>
Public Member Functions | |
TunerArgs (bool info_only=false) | |
Default constructor. | |
virtual void | clear () override |
Clear content, reset all values, they become "unset". | |
bool | configureTuner (Tuner &tuner) const |
Open a tuner and configure it according to the parameters in this object. | |
bool | convertToDektecModulation (int &modulation_type, int ¶m0, int ¶m1, int ¶m2) const |
Attempt to convert the tuning parameters in modulation parameters for Dektec modulator cards. | |
void | copyLocalReceptionParameters (const ModulationArgs &other) |
Copy the local reception parameters from another instance. | |
virtual void | defineArgs (Args &args, bool allow_short_options) override |
Add command line option definitions in an Args. | |
virtual std::ostream & | display (std::ostream &strm, const UString &margin=UString(), int level=Severity::Info) const override |
Display the content of this object to a stream. | |
bool | fromDeliveryDescriptor (DuckContext &duck, const Descriptor &desc, uint16_t ts_id, DeliverySystem delsys=DS_UNDEFINED) |
Fill modulation parameters from a delivery system descriptor. | |
bool | 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. | |
bool | getDektecCodeRate (int &fec) const |
Attempt to get a "FEC type" for Dektec modulator cards. | |
bool | getDektecModulationType (int &type) const |
Attempt to get a "modulation type" for Dektec modulator cards. | |
bool | hasModulationArgs () const |
Check if any modulation options is set. | |
virtual bool | loadArgs (DuckContext &duck, Args &args) override |
Load arguments from command line. | |
void | 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. | |
bool | resolveDeliverySystem (const DeliverySystemSet &systems, Report &report) |
Check the validity of the delivery system or set a default one. | |
void | setDefaultValues () |
Set the default values for unset parameters, according to the delivery system. | |
UString | shortDescription (DuckContext &duck) const |
Format a short description (frequency and essential parameters). | |
BitRate | theoreticalBitrate () const |
Theoretical bitrate computation. | |
void | toJSON (json::Object &obj) const |
Format the modulation parameters in a JSON object. | |
UString | toPluginOptions (bool no_local=false) const |
Format the modulation parameters as command line arguments. | |
Static Public Member Functions | |
static bool | IsValidISDBTTimeInterleaving (int ti) |
Check if an ISDB-T time interleaving value is valid. | |
static bool | ToDektecCodeRate (int &out, InnerFEC in) |
Convert a InnerFEC value into a "FEC type" for Dektec modulator cards. | |
Public Attributes | |
std::optional< BandWidth > | bandwidth {} |
Bandwidth in Hz. | |
std::optional< DeliverySystem > | delivery_system {} |
Delivery system (DS_DVB_*). | |
size_t | demux_buffer_size = Tuner::DEFAULT_DEMUX_BUFFER_SIZE |
Demux buffer size in bytes (Linux-specific). | |
size_t | demux_queue_size = Tuner::DEFAULT_SINK_QUEUE_SIZE |
Max number of queued media samples (Windows-specific). | |
UString | device_name {} |
Name of tuner device. | |
std::optional< InnerFEC > | fec_hp {} |
High priority stream code rate. | |
std::optional< InnerFEC > | fec_lp {} |
Low priority stream code rate. | |
std::optional< uint64_t > | frequency {} |
Frequency in Hz. | |
std::optional< GuardInterval > | guard_interval {} |
Guard interval. | |
std::optional< Hierarchy > | hierarchy {} |
Hierarchy. | |
std::optional< InnerFEC > | inner_fec {} |
Error correction. | |
std::optional< SpectralInversion > | inversion {} |
Spectral inversion. | |
std::optional< UString > | isdbt_layers {} |
ISDB-T hierarchical layers ISDB-T channels can be coded hierarchically. | |
std::optional< bool > | isdbt_partial_reception {} |
ISDB-T partial reception. | |
std::optional< uint32_t > | isi {} |
Input Stream Id (ISI). | |
std::optional< InnerFEC > | layer_a_fec {} |
Layer A code rate. | |
std::optional< Modulation > | layer_a_modulation {} |
Layer A modulation. | |
std::optional< int > | layer_a_segment_count {} |
Layer A segment count. | |
std::optional< int > | layer_a_time_interleaving {} |
Layer A time interleaving. | |
std::optional< InnerFEC > | layer_b_fec {} |
Layer B code rate. | |
std::optional< Modulation > | layer_b_modulation {} |
Layer B modulation. | |
std::optional< int > | layer_b_segment_count {} |
Layer B segment count. | |
std::optional< int > | layer_b_time_interleaving {} |
Layer B time interleaving. | |
std::optional< InnerFEC > | layer_c_fec {} |
Layer C code rate. | |
std::optional< Modulation > | layer_c_modulation {} |
Layer C modulation. | |
std::optional< int > | layer_c_segment_count {} |
Layer C segment count. | |
std::optional< int > | layer_c_time_interleaving {} |
Layer C time interleaving. | |
std::optional< LNB > | lnb {} |
Local dish LNB for frequency adjustment. | |
std::optional< Modulation > | modulation {} |
Constellation or modulation type. | |
std::optional< Pilot > | pilots {} |
Presence of pilots. | |
std::optional< uint32_t > | plp {} |
Physical Layer Pipe (PLP) identification. | |
std::optional< uint32_t > | pls_code {} |
Physical Layer Scrambling (PLS) code. | |
std::optional< PLSMode > | pls_mode {} |
Physical Layer Scrambling (PLS) mode. | |
std::optional< Polarization > | polarity {} |
Polarity. | |
cn::milliseconds | receive_timeout {} |
Packet received timeout in milliseconds. | |
UString | receiver_name {} |
Name of the DirectShow receiver to use (Windows-specific). | |
std::optional< RollOff > | roll_off {} |
Roll-off factor. | |
std::optional< size_t > | satellite_number {} |
Satellite index for DiSeqC switches. | |
std::optional< int > | sb_segment_count {} |
Sound broadcasting segment count. | |
std::optional< int > | sb_segment_index {} |
Sound broadcasting segment index. | |
std::optional< int > | sb_subchannel_id {} |
Sound broadcasting sub-channel id. | |
cn::milliseconds | signal_timeout = Tuner::DEFAULT_SIGNAL_TIMEOUT |
Signal locking timeout in milliseconds. | |
std::optional< bool > | sound_broadcasting {} |
Sound broadcasting. | |
std::optional< uint32_t > | stream_id {} |
Inner stream id (same as inner transport stream id). | |
std::optional< uint32_t > | symbol_rate {} |
Symbol rate in symbols / second. | |
std::optional< TransmissionMode > | transmission_mode {} |
Transmission mode. | |
Static Public Attributes | |
static constexpr BandWidth | DEFAULT_BANDWIDTH_DVBT = 8000000 |
Default value for bandwidth on DVB-T. | |
static constexpr BandWidth | DEFAULT_BANDWIDTH_ISDBT = 6000000 |
Default value for bandwidth on ISDB-T. | |
static constexpr InnerFEC | DEFAULT_FEC_HP = FEC_AUTO |
Default value for fec_hp. | |
static constexpr InnerFEC | DEFAULT_FEC_LP = FEC_AUTO |
Default value for fec_lp. | |
static constexpr GuardInterval | DEFAULT_GUARD_INTERVAL_DVBT = GUARD_1_32 |
Default value for guard_interval on DVB-T. | |
static constexpr GuardInterval | DEFAULT_GUARD_INTERVAL_ISDBT = GUARD_1_32 |
Default value for guard_interval on ISDB-T. | |
static constexpr Hierarchy | DEFAULT_HIERARCHY = HIERARCHY_NONE |
Default value for hierarchy. | |
static constexpr InnerFEC | DEFAULT_INNER_FEC = FEC_AUTO |
Default value for inner_fec. | |
static constexpr SpectralInversion | DEFAULT_INVERSION = SPINV_AUTO |
Default value for inversion. | |
static const UString | DEFAULT_ISDBT_LAYERS |
Default value for ISDB-T layers (all layers: "ABC"). | |
static constexpr uint32_t | DEFAULT_ISI = ISI_DISABLE |
Default value for input stream id. | |
static constexpr Modulation | DEFAULT_MODULATION_ATSC = VSB_8 |
Default value for modulation on ATSC. | |
static constexpr Modulation | DEFAULT_MODULATION_DVBC = QAM_64 |
Default value for modulation on cable. | |
static constexpr Modulation | DEFAULT_MODULATION_DVBS = QPSK |
Default value for modulation on satellite. | |
static constexpr Modulation | DEFAULT_MODULATION_DVBT = QAM_64 |
Default value for modulation on terrestrial. | |
static constexpr Pilot | DEFAULT_PILOTS = PILOT_OFF |
Default value for pilots. | |
static constexpr uint32_t | DEFAULT_PLP = PLP_DISABLE |
Default value for PLP id. | |
static constexpr uint32_t | DEFAULT_PLS_CODE = 0 |
Default value for PLS code. | |
static constexpr PLSMode | DEFAULT_PLS_MODE = PLS_GOLD |
Default value for PLS mode. | |
static constexpr Polarization | DEFAULT_POLARITY = POL_VERTICAL |
Default value for polarity. | |
static constexpr RollOff | DEFAULT_ROLL_OFF = ROLLOFF_35 |
Default value for roll_off. | |
static constexpr size_t | DEFAULT_SATELLITE_NUMBER = 0 |
Default value for satellite_number. | |
static constexpr int | DEFAULT_SB_SEGMENT_COUNT = 13 |
Default value for ISDB-Tsb segment count. | |
static constexpr int | DEFAULT_SB_SEGMENT_INDEX = 0 |
Default value for ISDB-Tsb segment index. | |
static constexpr int | DEFAULT_SB_SUBCHANNEL_ID = 0 |
Default value for ISDB-Tsb sub-channel id. | |
static constexpr uint32_t | DEFAULT_STREAM_ID = STREAM_ID_DISABLE |
Default value for inner stream id. | |
static constexpr uint32_t | DEFAULT_SYMBOL_RATE_DVBC = 6900000 |
Default value for symbol_rate on DVB-C. | |
static constexpr uint32_t | DEFAULT_SYMBOL_RATE_DVBS = 27500000 |
Default value for symbol_rate on DVB-S. | |
static constexpr uint32_t | DEFAULT_SYMBOL_RATE_ISDBS = 28860000 |
Default value for symbol_rate on ISDB-S. | |
static constexpr TransmissionMode | DEFAULT_TRANSMISSION_MODE_DVBT = TM_8K |
Default value for transmission_mode on DVB-T. | |
static constexpr TransmissionMode | DEFAULT_TRANSMISSION_MODE_ISDBT = TM_8K |
Default value for transmission_mode on ISDB-T. | |
static constexpr int | MAX_ISDBT_SEGMENT_COUNT = 13 |
Maximum value for ISDB-T segment count. | |
Static Protected Member Functions | |
static BitRate | TheoreticalBitrateForModulation (Modulation mod, InnerFEC fec, uint32_t symbol_rate) |
Theoretical useful bitrate for QPSK or QAM 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.
ts::TunerArgs::TunerArgs | ( | bool | info_only = false | ) |
Default constructor.
[in] | info_only | If true, the tuner will not be used to tune, just to get information. |
|
overridevirtual |
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 from ts::ModulationArgs.
|
overridevirtual |
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 from ts::ModulationArgs.
|
overridevirtual |
Clear content, reset all values, they become "unset".
Reimplemented from ts::ModulationArgs.
bool ts::TunerArgs::configureTuner | ( | Tuner & | tuner | ) | const |
Open a tuner and configure it according to the parameters in this object.
[in,out] | tuner | The tuner to open and configure. |
|
staticinherited |
Check if an ISDB-T time interleaving value is valid.
[in] | ti | Time interleaving value. Valid values: 0, 1, 2, 4 or -1 (auto). |
|
overridevirtualinherited |
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.
|
inherited |
Check if any modulation options is set.
|
inherited |
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. |
|
inherited |
Set the default values for unset parameters, according to the delivery system.
Do nothing if the delivery system is unset.
|
inherited |
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. |
|
inherited |
Theoretical bitrate computation.
|
inherited |
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. |
|
inherited |
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. |
|
inherited |
Attempt to get a "modulation type" for Dektec modulator cards.
[out] | type | Modulation type (DTAPI_MOD_* value). Unchanged in case of error. |
|
inherited |
Attempt to get a "FEC type" for Dektec modulator cards.
[out] | fec | FEC type (DTAPI_MOD_* value). Unchanged in case of error. |
|
staticinherited |
Convert a InnerFEC value into a "FEC type" for Dektec modulator cards.
[out] | out | Returned FEC type (DTAPI_MOD_* value). Unchanged in case of error. |
[out] | in | Input FEC type (enum type). |
|
inherited |
Attempt to convert the tuning parameters in modulation parameters for Dektec modulator cards.
[out] | modulation_type | Modulation type (DTAPI_MOD_* value). |
[out] | param0 | Modulation-specific parameter 0. |
[out] | param1 | Modulation-specific parameter 1. |
[out] | param2 | Modulation-specific parameter 2. |
|
inherited |
Format a short description (frequency and essential parameters).
[out] | duck | TSDuck execution context. |
|
inherited |
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. |
|
inherited |
Format the modulation parameters in a JSON object.
[in,out] | obj | JSON object into which the modulation parameters are added. |
|
staticprotectedinherited |
Theoretical useful bitrate for QPSK or QAM modulation.
This protected static method computes the theoretical useful bitrate of a transponder, based on 188-bytes packets, for QPSK or QAM modulation.
[in] | mod | Modulation type. |
[in] | fec | Inner FEC. |
[in] | symbol_rate | Symbol rate. |
|
inherited |
Delivery system (DS_DVB_*).
Applies to all tuners. When unset, the default delivery system for that tuner is used.
|
inherited |
Frequency in Hz.
Applies to all tuners. This is a mandatory parameter.
|
inherited |
Polarity.
Applies to: DVB-S/S2, ISDB-S.
|
inherited |
Local dish LNB for frequency adjustment.
Applies to: DVB-S/S2, ISDB-S.
|
inherited |
Spectral inversion.
Applies to: DVB-T/T2, DVB-S/S2, DVB-C (A,B,C), ATSC, ISDB-T, ISDB-S.
|
inherited |
Symbol rate in symbols / second.
Applies to: DVB-S/S2, DVB-C (A,C), ISDB-S.
|
inherited |
Error correction.
Applies to: DVB-S/S2, DVB-C (A,C), ISDB-S.
|
inherited |
Satellite index for DiSeqC switches.
Applies to: DVB-S/S2, ISDB-S.
|
inherited |
Constellation or modulation type.
Applies to: DVB-T/T2, DVB-S2/Turbo, DVB-C (A,B,C), ATSC.
|
inherited |
Bandwidth in Hz.
Applies to: DVB-T/T2, ISDB-T.
|
inherited |
High priority stream code rate.
Applies to: DVB-T/T2.
|
inherited |
Low priority stream code rate.
Applies to: DVB-T/T2.
|
inherited |
Transmission mode.
Applies to: DVB-T/T2, ISDB-T.
|
inherited |
Guard interval.
Applies to: DVB-T/T2, ISDB-T.
|
inherited |
Hierarchy.
Applies to: DVB-T/T2.
|
inherited |
Presence of pilots.
Applies to: DVB-S2.
|
inherited |
Roll-off factor.
Applies to: DVB-S2.
|
staticconstexprinherited |
Default value for roll_off.
Implied value in DVB-S, default for DVB-S2.
|
inherited |
Physical Layer Pipe (PLP) identification.
Applies to: DVB-T2.
|
inherited |
Input Stream Id (ISI).
Applies to: DVB-S2.
|
inherited |
Physical Layer Scrambling (PLS) code.
Applies to: DVB-S2.
|
inherited |
Physical Layer Scrambling (PLS) mode.
Applies to: DVB-S2.
|
inherited |
Sound broadcasting.
When specified to true, the reception is an ISDB-Tsb channel instead of an ISDB-T one. Applies to: ISDB-T.
|
inherited |
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.
|
inherited |
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.
|
inherited |
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.
|
inherited |
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.
|
inherited |
ISDB-T partial reception.
When specified to true, the reception of the ISDB-T channel is in partial reception mode. Applies to: ISDB-T.
|
inherited |
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.
|
inherited |
Layer A modulation.
Must be one of QAM_AUTO, QPSK, QAM_16, QAM_64, DQPSK. The default is automatically detected. Applies to: ISDB-T.
|
inherited |
Layer A segment count.
Possible values: 0 to 13 or -1 (auto). The default is automatically detected. Applies to: ISDB-T.
|
inherited |
Layer A time interleaving.
Possible values: 0, 1, 2, 4 or -1 (auto). The default is automatically detected. Applies to: ISDB-T.
|
inherited |
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.
|
inherited |
Layer B modulation.
Must be one of QAM_AUTO, QPSK, QAM_16, QAM_64, DQPSK. The default is automatically detected. Applies to: ISDB-T.
|
inherited |
Layer B segment count.
Possible values: 0 to 13 or -1 (auto). The default is automatically detected. Applies to: ISDB-T.
|
inherited |
Layer B time interleaving.
Possible values: 0, 1, 2, 4 or -1 (auto). The default is automatically detected. Applies to: ISDB-T.
|
inherited |
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.
|
inherited |
Layer C modulation.
Must be one of QAM_AUTO, QPSK, QAM_16, QAM_64, DQPSK. The default is automatically detected. Applies to: ISDB-T.
|
inherited |
Layer C segment count.
Possible values: 0 to 13 or -1 (auto). The default is automatically detected. Applies to: ISDB-T.
|
inherited |
Layer C time interleaving.
Possible values: 0, 1, 2, 4 or -1 (auto). The default is automatically detected. Applies to: ISDB-T.
|
inherited |
Inner stream id (same as inner transport stream id).
Applies to: ISDB-S (multi-stream).