TSDuck Version 3.29-2562 (TSDuck - The MPEG Transport Stream Toolkit)
tsduck.DuckContext Class Reference

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

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

Public Member Functions

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

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__()

def tsduck.DuckContext.__init__ (   self,
  report 
)

Constructor.

Parameters
reportThe tsduck.Report object to use.

Member Function Documentation

◆ delete()

def 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()

def 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()

def 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()

def 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()

def 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()

def 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()

def 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()

def 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()

def 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: