TSDuck v3.40-3963
MPEG Transport Stream Toolkit
|
Options to update the language of an audio stream in a PMT. More...
#include <tsAudioLanguageOptions.h>
Public Member Functions | |
AudioLanguageOptions ()=default | |
Default constructor. | |
uint8_t | getAudioStreamNumber () const |
Get the audio stream number in PMT. | |
uint8_t | getAudioType () const |
Get the audio type. | |
bool | getFromArgs (Args &args, const UChar *option_name, size_t index=0) |
Assign from a command-line option. | |
UString | getLanguageCode () const |
Get the language code. | |
PID | getPID () const |
Get audio PID. | |
bool | locateByPID () const |
Check how to locate the audio stream. | |
operator ISO639LanguageDescriptor () const | |
Build an ISO-639_language_descriptor from this object (cast operator). | |
void | setAudioStreamNumber (uint8_t n) |
Set the audio stream number in PMT. | |
void | setAudioType (uint8_t t) |
Set the audio type. | |
void | setLanguageCode (const UString &s) |
Set the language code. | |
void | setPID (PID p) |
Set audio PID. | |
Static Public Member Functions | |
static UString | GetHelpString () |
Return a help string for the parameter syntax. | |
static UString | GetSyntaxString () |
Return a short parameter syntax. | |
Options to update the language of an audio stream in a PMT.
This class is a helper for commands and tools which manipulate languages in a PMT.
On a command line, the value of an audion option is "language-code[:audio-type[:location]]".
The "language-code" is a 3-character string. The audio-type is optional, its default value is zero. The "location" indicates how to locate the audio stream. Its format is either "Pn" or "An". In the first case, "n" designates a PID value and in the second case the audio stream number. inside the PMT, starting with 1. The default location is "A1", ie. the first audio stream inside the PMT. Audio streams are numbered in increasing order of PID value.
|
inline |
Get the language code.
|
inline |
Set the language code.
[in] | s | The language code, must be a 3-character string. |
|
inline |
Get the audio type.
|
inline |
Set the audio type.
[in] | t | The audio type. |
|
inline |
Check how to locate the audio stream.
|
inline |
|
inline |
Set audio PID.
[in] | p | The audio PID number. |
|
inline |
|
inline |
|
inline |
Build an ISO-639_language_descriptor from this object (cast operator).
bool ts::AudioLanguageOptions::getFromArgs | ( | Args & | args, |
const UChar * | option_name, | ||
size_t | index = 0 |
||
) |
Assign from a command-line option.
Syntax of the option value: language-code[:audio-type[:location]]
[in,out] | args | Command line arguments. Errors are also reported through the args object. |
[in] | option_name | The full name of the option. If the parameter is a null pointer or an empty string, this specifies a parameter, not an option. If the specified option was not declared in the syntax of the command or declared as a non-string type, a fatal error is reported. |
[in] | index | The occurence of the option to return. Zero designates the first occurence. |
|
inlinestatic |
Return a short parameter syntax.
|
static |
Return a help string for the parameter syntax.