TSDuck v3.40-3963
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
tsduck.DuckContext Class Reference

A wrapper class for C++ DuckContext. More...

Inheritance diagram for tsduck.DuckContext:
Collaboration diagram for tsduck.DuckContext:

Public Member Functions

 __init__ (self, report)
 Constructor.
 
 addStandards (self, mask)
 Add a list of standards which are present in the transport stream or context.
 
 delete (self)
 Explicitly free the underlying C++ object.
 
 resetStandards (self, mask=NONE)
 Reset the list of standards which are present in the transport stream or context.
 
 setDefaultCASId (self, cas)
 Set the default CAS id to use.
 
 setDefaultCharset (self, charset)
 Set the default character set for strings.
 
 setDefaultPDS (self, pds)
 Set the default private data specifier to use in the absence of explicit private_data_specifier_descriptor.
 
 setTimeReference (self, name)
 Set a non-standard time reference offset using a name.
 
 setTimeReferenceOffset (self, offset)
 Set a non-standard time reference offset.
 
 standards (self)
 Get the list of standards which are present in the transport stream or context.
 

Static Public Attributes

int ABNT = 0x40;
 Defined by ABNT (Brazil, typically in addition to ISDB).
 
int ATSC = 0x08;
 Defined by ATSC.
 
int DVB = 0x02;
 Defined by ETSI/DVB.
 
int ISDB = 0x10;
 Defined by ISDB.
 
int JAPAN = 0x20;
 Defined in Japan only (typically in addition to ISDB).
 
int MPEG = 0x01;
 Defined by MPEG, common to all standards.
 
int NONE = 0x00;
 No known standard.
 
int SCTE = 0x04;
 Defined by ANSI/SCTE.
 

Detailed Description

A wrapper class for C++ DuckContext.

Constructor & Destructor Documentation

◆ __init__()

tsduck.DuckContext.__init__ (   self,
  report 
)

Constructor.

Parameters
reportThe tsduck.Report object to use.

Reimplemented from tsduck.NativeObject.

Member Function Documentation

◆ delete()

tsduck.DuckContext.delete (   self)

Explicitly free the underlying C++ object.

After this call, the object becomes unusable. Most usages are unpredictable but most likely will do nothing.

Returns
None.

Reimplemented from tsduck.NativeObject.

◆ setDefaultCharset()

tsduck.DuckContext.setDefaultCharset (   self,
  charset 
)

Set the default character set for strings.

The default should be the DVB superset of ISO/IEC 6937 as defined in ETSI EN 300 468. Use another default in the context of an operator using an incorrect signalization, assuming another default character set (usually from its own country) or in the context of mixed standards (ISBD/DVB for instance).

Parameters
charsetThe new default character set name or an empty string to revert to the default.
Returns
True on success, False if charset is invalid.

◆ setDefaultCASId()

tsduck.DuckContext.setDefaultCASId (   self,
  cas 
)

Set the default CAS id to use.

Parameters
casDefault CAS id to be used when the CAS is unknown.
Returns
None.

◆ setDefaultPDS()

tsduck.DuckContext.setDefaultPDS (   self,
  pds 
)

Set the default private data specifier to use in the absence of explicit private_data_specifier_descriptor.

Parameters
pdsDefault PDS. Use zero to revert to no default.
Returns
None.

◆ addStandards()

tsduck.DuckContext.addStandards (   self,
  mask 
)

Add a list of standards which are present in the transport stream or context.

Parameters
maskA bit mask of standards.
Returns
None.

◆ standards()

tsduck.DuckContext.standards (   self)

Get the list of standards which are present in the transport stream or context.

Returns
A bit mask of standards.

◆ resetStandards()

tsduck.DuckContext.resetStandards (   self,
  mask = NONE 
)

Reset the list of standards which are present in the transport stream or context.

Parameters
maskA bit mask of standards.
Returns
None.

◆ setTimeReferenceOffset()

tsduck.DuckContext.setTimeReferenceOffset (   self,
  offset 
)

Set a non-standard time reference offset.

In DVB SI, reference times are UTC. These SI can be reused in non-standard ways where the stored times use another reference. This is the case with ARIB and ABNT variants of ISDB which reuse TOT, TDT and EIT but with another local time reference.

Parameters
offsetOffset from UTC in milli-seconds. Can be positive or negative. The default offset is zero, meaning plain UTC time.
Returns
None.

◆ setTimeReference()

tsduck.DuckContext.setTimeReference (   self,
  name 
)

Set a non-standard time reference offset using a name.

Parameters
nameTime reference name. The non-standard time reference offset is computed from this name which can be "JST" or "UTC[[+|-]hh[:mm]]".
Returns
True on success, False if name is invalid.

The documentation for this class was generated from the following file: