TSDuck v3.40-4033
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::AC3Attributes Class Reference

AC-3 (DD) and Enhanced-AC-3 (DD+) audio attributes. More...

#include <tsAC3Attributes.h>

Inheritance diagram for ts::AC3Attributes:
Collaboration diagram for ts::AC3Attributes:

Public Member Functions

 AC3Attributes ()=default
 Default constructor.
 
UString audioCodingDescription () const
 String representation of audio coding mode.
 
int audioCodingMode () const
 Audio coding mode ("acmod").
 
int bitstreamId () const
 Bitstream identification ("bsid").
 
int bitstreamMode () const
 Bitstream mode ("bsmod", metadata info).
 
UString bitstreamModeDescription () const
 String representation of bitstream mode.
 
uint8_t componentType () const
 Rebuild a component_type for AC-3 descriptors.
 
bool dolbySurround () const
 Check if this is Dolby Surround.
 
void invalidate ()
 Invalidate the content of this instance.
 
bool isEnhancedAC3 () const
 Check if this is Enhanced-AC-3.
 
bool isValid () const
 Check if the values in the object are valid.
 
virtual bool moreBinaryData (const uint8_t *, size_t) override
 Provides an audio/video binary data to be analyzed by this instance.
 
int samplingFrequency () const
 Sampling frequency in Hz.
 
virtual UString toString () const override
 Convert to a string object.
 

Protected Attributes

bool _is_valid = false
 A flag which indicates if the content of this object is valid.
 

Detailed Description

AC-3 (DD) and Enhanced-AC-3 (DD+) audio attributes.

See ETSI TS 102 366 for the specification and encoding of AC-3 and Enhanced-AC-3.

An AC3Attributes object is built by transmitting audio frames from PES payloads. Initially, an AC3Attributes object is invalid.

Member Function Documentation

◆ moreBinaryData()

virtual bool ts::AC3Attributes::moreBinaryData ( const uint8_t *  addr,
size_t  size 
)
overridevirtual

Provides an audio/video binary data to be analyzed by this instance.

The type of data (complete PES payload or some type of "frame" or "access unit") depends on the type of audio/video.

Parameters
[in]addrAddress of data to be analyzed.
[in]sizeSize of data to be analyzed.
Returns
True if the attributes object becomes valid or has new values.

Implements ts::AbstractAudioVideoAttributes.

◆ toString()

virtual UString ts::AC3Attributes::toString ( ) const
overridevirtual

Convert to a string object.

Returns
This object, converted as a string.

Implements ts::StringifyInterface.

◆ isEnhancedAC3()

bool ts::AC3Attributes::isEnhancedAC3 ( ) const
inline

Check if this is Enhanced-AC-3.

Returns
True for Enhanced-AC-3, false for AC-3.

◆ bitstreamId()

int ts::AC3Attributes::bitstreamId ( ) const
inline

Bitstream identification ("bsid").

Returns
The bitstream identification ("bsid"), see ETSI TS 102 366.

◆ bitstreamMode()

int ts::AC3Attributes::bitstreamMode ( ) const
inline

Bitstream mode ("bsmod", metadata info).

Returns
The bitstream mode ("bsmod", metadata info), see ETSI TS 102 366.

◆ bitstreamModeDescription()

UString ts::AC3Attributes::bitstreamModeDescription ( ) const

String representation of bitstream mode.

Returns
The string representation of bitstream mode.
See also
bitstreamMode()

◆ audioCodingMode()

int ts::AC3Attributes::audioCodingMode ( ) const
inline

Audio coding mode ("acmod").

Returns
The audio coding mode ("acmod"), see ETSI TS 102 366.

◆ audioCodingDescription()

UString ts::AC3Attributes::audioCodingDescription ( ) const

String representation of audio coding mode.

Returns
The string representation of audio coding mode.
See also
audioCodingMode()

◆ samplingFrequency()

int ts::AC3Attributes::samplingFrequency ( ) const
inline

Sampling frequency in Hz.

Returns
The sampling frequency in Hz.

◆ dolbySurround()

bool ts::AC3Attributes::dolbySurround ( ) const
inline

Check if this is Dolby Surround.

Returns
True if this is Dolby Surround.

◆ componentType()

uint8_t ts::AC3Attributes::componentType ( ) const

Rebuild a component_type for AC-3 descriptors.

Returns
The component_type value for an AC-3 descriptor. See ETSI 300 468 V1.9.1, annex D.1.

◆ isValid()

bool ts::AbstractAudioVideoAttributes::isValid ( ) const
inlineinherited

Check if the values in the object are valid.

Returns
True if the values in the object are valid.

◆ invalidate()

void ts::AbstractAudioVideoAttributes::invalidate ( )
inlineinherited

Invalidate the content of this instance.

It must be rebuilt using audio/video binary data.

Member Data Documentation

◆ _is_valid

bool ts::AbstractAudioVideoAttributes::_is_valid = false
protectedinherited

A flag which indicates if the content of this object is valid.

It is the responsibility of the subclasses to set it.


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