TSDuck v3.46-4930
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::MPEG2AudioAttributes Class Reference

#include <tsMPEG2AudioAttributes.h>

Inheritance diagram for ts::MPEG2AudioAttributes:
Collaboration diagram for ts::MPEG2AudioAttributes:

Public Member Functions

 MPEG2AudioAttributes ()=default
BitRate bitrate () const
void invalidate ()
bool isValid () const
int layer () const
UString layerName () const
virtual bool moreBinaryData (const uint8_t *, size_t) override
int samplingFrequency () const
UString stereoDescription () const
int stereoMode () const
int stereoModeExtension () const
virtual UString toString () const override

Protected Attributes

bool _is_valid = false

Detailed Description

Audio attributes for MPEG-1 / MPEG-2 audio.

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

Constructor & Destructor Documentation

◆ MPEG2AudioAttributes()

ts::MPEG2AudioAttributes::MPEG2AudioAttributes ( )
default

Default constructor.

Member Function Documentation

◆ moreBinaryData()

virtual bool ts::MPEG2AudioAttributes::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::MPEG2AudioAttributes::toString ( ) const
overridevirtual

Convert to a string object.

Returns
This object, converted as a string.

Implements ts::StringifyInterface.

◆ layer()

int ts::MPEG2AudioAttributes::layer ( ) const
inline

MPEG audio layer.

Returns
The MPEG audio layer (1-3, 0 if unknown).

◆ layerName()

UString ts::MPEG2AudioAttributes::layerName ( ) const

MPEG audio layer name.

Returns
A string describing the MPEG audio layer.

◆ bitrate()

BitRate ts::MPEG2AudioAttributes::bitrate ( ) const
inline

Bitrate in bits/second.

Returns
The bitrate in bits/second (0 if variable bitrate).

◆ samplingFrequency()

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

Sampling frequency in Hz.

Returns
The sampling frequency in Hz.

◆ stereoMode()

int ts::MPEG2AudioAttributes::stereoMode ( ) const
inline

Get the mono/stereo mode.

Returns
The mono/stereo mode (see ISO 11172-3).

◆ stereoModeExtension()

int ts::MPEG2AudioAttributes::stereoModeExtension ( ) const
inline

Get the mono/stereo mode extension.

Returns
The mono/stereo mode extension (see ISO 11172-3).

◆ stereoDescription()

UString ts::MPEG2AudioAttributes::stereoDescription ( ) const

Mono/stereo mode name.

Returns
A string describing the mono/stereo mode .

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