TSDuck Version 3.32-2820 (TSDuck - The MPEG Transport Stream Toolkit)
ts::SpliceTime Class Reference

Representation of an SCTE 35 splice_time() structure. More...

Inheritance diagram for ts::SpliceTime:
Collaboration diagram for ts::SpliceTime:

Public Member Functions

void clear ()
 Clear the value. More...
 
int deserialize (const uint8_t *data, size_t size)
 Deserialize a SpliceTime structure from binary data. More...
 
bool identical (const Variable< uint64_t > &other) const
 Identity. More...
 
bool operator!= (const uint64_t &obj) const
 Unequality operator with a T instance. More...
 
bool operator!= (const Variable< uint64_t > &other) const
 Unequality operator. More...
 
bool operator== (const uint64_t &obj) const
 Equality operator with a T instance. More...
 
bool operator== (const Variable< uint64_t > &other) const
 Equality operator. More...
 
void serialize (ByteBlock &data) const
 Serialize the SpliceTime structure. More...
 
bool set () const
 Check the presence of a value. More...
 
bool setDefault (const uint64_t &def)
 Set a value if the variable is currently unset. More...
 
UString toString () const
 Convert the SpliceTime structure to string. More...
 
uint64_t & value ()
 Access the T value inside the variable. More...
 
const uint64_t & value () const
 Access the constant T value inside the variable. More...
 
uint64_t value (const uint64_t &def) const
 Get a copy of the T value inside the variable or a default value. More...
 

Detailed Description

Representation of an SCTE 35 splice_time() structure.

This is a 33-bit PTS value which can be set or unset.

Member Function Documentation

◆ deserialize()

int ts::SpliceTime::deserialize ( const uint8_t *  data,
size_t  size 
)

Deserialize a SpliceTime structure from binary data.

Parameters
[in]dataAddress of data to deserialize.
[in]sizeSize of data buffer, possibly larger than the SpliceTime structure.
Returns
Deserialized size, -1 on incorrect data.

◆ serialize()

void ts::SpliceTime::serialize ( ByteBlock data) const

Serialize the SpliceTime structure.

Parameters
[in,out]dataThe SpliceTime structure is serialized at the end of this byte block.

◆ toString()

UString ts::SpliceTime::toString ( ) const

Convert the SpliceTime structure to string.

Returns
The representation string.

◆ set()

bool ts::Variable< uint64_t >::set ( ) const
inlineinherited

Check the presence of a value.

Returns
True if the variable is initialized, false otherwise.

◆ setDefault()

bool ts::Variable< uint64_t >::setDefault ( const uint64_t &  def)
inherited

Set a value if the variable is currently unset.

Do nothing if the variable is already initialized.

Parameters
[in]defA default T value if the variable is uninitialized.
Returns
True if the variable was not initialized and the default value was set, false if the variable was already initialized.

◆ clear()

void ts::Variable< uint64_t >::clear ( )
inherited

Clear the value.

This object becomes uninitialized if it was not already.

◆ value() [1/3]

const uint64_t & ts::Variable< uint64_t >::value ( ) const
inherited

Access the constant T value inside the variable.

Returns
A constant reference to the T value inside the variable.
Exceptions
UninitializedVariableIf the variable is uninitialized.

◆ value() [2/3]

uint64_t & ts::Variable< uint64_t >::value ( )
inherited

Access the T value inside the variable.

Returns
A reference to the T value inside the variable.
Exceptions
UninitializedVariableIf the variable is uninitialized.

◆ value() [3/3]

uint64_t ts::Variable< uint64_t >::value ( const uint64_t &  def) const
inherited

Get a copy of the T value inside the variable or a default value.

Parameters
[in]defA default T value if the variable is uninitialized.
Returns
A copy the T value inside the variable if the variable is initialized, def otherwise.

◆ operator==() [1/2]

bool ts::Variable< uint64_t >::operator== ( const Variable< uint64_t > &  other) const
inherited

Equality operator.

Parameters
[in]otherAn other instance to compare with.
Returns
True if both instances are initialized and contain equal values.

◆ operator==() [2/2]

bool ts::Variable< uint64_t >::operator== ( const uint64_t &  obj) const
inherited

Equality operator with a T instance.

Parameters
[in]objAn object to compare with.
Returns
True if this object is initialized and its value is equal to obj.

◆ operator!=() [1/2]

bool ts::Variable< uint64_t >::operator!= ( const Variable< uint64_t > &  other) const
inherited

Unequality operator.

Parameters
[in]otherAn other instance to compare with.
Returns
True if any instance is uninitialized or both are initialized with unequal values.

◆ operator!=() [2/2]

bool ts::Variable< uint64_t >::operator!= ( const uint64_t &  obj) const
inherited

Unequality operator with a T instance.

Parameters
[in]objAn object to compare with.
Returns
True if this object is uninitialized or its value is not equal to obj.

◆ identical()

bool ts::Variable< uint64_t >::identical ( const Variable< uint64_t > &  other) const
inherited

Identity.

Parameters
[in]otherAn other instance to compare with.
Returns
True if both instances are initialized and contain equal values or if both instance and not initialized.

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