MythTV  master
Macros | Enumerations | Variables
eldutils.cpp File Reference
#include <cinttypes>
#include <sys/types.h>
#include <QString>
#include "mythconfig.h"
#include "eldutils.h"
#include "bswap.h"
#include "audiooutputbase.h"
Include dependency graph for eldutils.cpp:

Go to the source code of this file.

Macros

#define LOC   QString("ELDUTILS: ")
 
#define LE_SHORT(v)   (*((uint16_t *)(v)))
 
#define LE_INT(v)   (*((uint32_t *)(v)))
 
#define LE_INT64(v)   (*((uint64_t *)(v)))
 
#define SIZE_ARRAY(x)   (sizeof(x) / sizeof((x)[0]))
 
#define SNDRV_PCM_RATE_5512   (1<<0) /* 5512Hz */
 
#define SNDRV_PCM_RATE_8000   (1<<1) /* 8000Hz */
 
#define SNDRV_PCM_RATE_11025   (1<<2) /* 11025Hz */
 
#define SNDRV_PCM_RATE_16000   (1<<3) /* 16000Hz */
 
#define SNDRV_PCM_RATE_22050   (1<<4) /* 22050Hz */
 
#define SNDRV_PCM_RATE_32000   (1<<5) /* 32000Hz */
 
#define SNDRV_PCM_RATE_44100   (1<<6) /* 44100Hz */
 
#define SNDRV_PCM_RATE_48000   (1<<7) /* 48000Hz */
 
#define SNDRV_PCM_RATE_64000   (1<<8) /* 64000Hz */
 
#define SNDRV_PCM_RATE_88200   (1<<9) /* 88200Hz */
 
#define SNDRV_PCM_RATE_96000   (1<<10) /* 96000Hz */
 
#define SNDRV_PCM_RATE_176400   (1<<11) /* 176400Hz */
 
#define SNDRV_PCM_RATE_192000   (1<<12) /* 192000Hz */
 
#define GRAB_BITS(buf, byte, lowbit, bits)
 

Enumerations

enum  eld_versions { ELD_VER_CEA_861D = 2, ELD_VER_PARTIAL = 31 }
 
enum  cea_edid_versions {
  CEA_EDID_VER_NONE = 0, CEA_EDID_VER_CEA861 = 1, CEA_EDID_VER_CEA861A = 2, CEA_EDID_VER_CEA861BCD = 3,
  CEA_EDID_VER_RESERVED = 4
}
 
enum  cea_audio_coding_xtypes {
  XTYPE_HE_REF_CT = 0, XTYPE_HE_AAC = 1, XTYPE_HE_AAC2 = 2, XTYPE_MPEG_SURROUND = 3,
  XTYPE_FIRST_RESERVED = 4
}
 

Variables

static const char * cea_speaker_allocation_names []
 
static const char * eld_connection_type_names [4]
 
static const char * audiotype_names []
 
static int cea_sampling_frequencies [8]
 

Macro Definition Documentation

◆ LOC

#define LOC   QString("ELDUTILS: ")

Definition at line 36 of file eldutils.cpp.

◆ LE_SHORT

#define LE_SHORT (   v)    (*((uint16_t *)(v)))

Definition at line 43 of file eldutils.cpp.

◆ LE_INT

#define LE_INT (   v)    (*((uint32_t *)(v)))

Definition at line 44 of file eldutils.cpp.

◆ LE_INT64

#define LE_INT64 (   v)    (*((uint64_t *)(v)))

Definition at line 45 of file eldutils.cpp.

◆ SIZE_ARRAY

#define SIZE_ARRAY (   x)    (sizeof(x) / sizeof((x)[0]))

Definition at line 48 of file eldutils.cpp.

◆ SNDRV_PCM_RATE_5512

#define SNDRV_PCM_RATE_5512   (1<<0) /* 5512Hz */

Definition at line 125 of file eldutils.cpp.

◆ SNDRV_PCM_RATE_8000

#define SNDRV_PCM_RATE_8000   (1<<1) /* 8000Hz */

Definition at line 126 of file eldutils.cpp.

◆ SNDRV_PCM_RATE_11025

#define SNDRV_PCM_RATE_11025   (1<<2) /* 11025Hz */

Definition at line 127 of file eldutils.cpp.

◆ SNDRV_PCM_RATE_16000

#define SNDRV_PCM_RATE_16000   (1<<3) /* 16000Hz */

Definition at line 128 of file eldutils.cpp.

◆ SNDRV_PCM_RATE_22050

#define SNDRV_PCM_RATE_22050   (1<<4) /* 22050Hz */

Definition at line 129 of file eldutils.cpp.

◆ SNDRV_PCM_RATE_32000

#define SNDRV_PCM_RATE_32000   (1<<5) /* 32000Hz */

Definition at line 130 of file eldutils.cpp.

◆ SNDRV_PCM_RATE_44100

#define SNDRV_PCM_RATE_44100   (1<<6) /* 44100Hz */

Definition at line 131 of file eldutils.cpp.

◆ SNDRV_PCM_RATE_48000

#define SNDRV_PCM_RATE_48000   (1<<7) /* 48000Hz */

Definition at line 132 of file eldutils.cpp.

◆ SNDRV_PCM_RATE_64000

#define SNDRV_PCM_RATE_64000   (1<<8) /* 64000Hz */

Definition at line 133 of file eldutils.cpp.

◆ SNDRV_PCM_RATE_88200

#define SNDRV_PCM_RATE_88200   (1<<9) /* 88200Hz */

Definition at line 134 of file eldutils.cpp.

◆ SNDRV_PCM_RATE_96000

#define SNDRV_PCM_RATE_96000   (1<<10) /* 96000Hz */

Definition at line 135 of file eldutils.cpp.

◆ SNDRV_PCM_RATE_176400

#define SNDRV_PCM_RATE_176400   (1<<11) /* 176400Hz */

Definition at line 136 of file eldutils.cpp.

◆ SNDRV_PCM_RATE_192000

#define SNDRV_PCM_RATE_192000   (1<<12) /* 192000Hz */

Definition at line 137 of file eldutils.cpp.

◆ GRAB_BITS

#define GRAB_BITS (   buf,
  byte,
  lowbit,
  bits 
)
Value:
( \
((buf)[byte] >> (lowbit)) & ((1 << (bits)) - 1) \
)

Definition at line 150 of file eldutils.cpp.

Enumeration Type Documentation

◆ eld_versions

Enumerator
ELD_VER_CEA_861D 
ELD_VER_PARTIAL 

Definition at line 50 of file eldutils.cpp.

◆ cea_edid_versions

Enumerator
CEA_EDID_VER_NONE 
CEA_EDID_VER_CEA861 
CEA_EDID_VER_CEA861A 
CEA_EDID_VER_CEA861BCD 
CEA_EDID_VER_RESERVED 

Definition at line 56 of file eldutils.cpp.

◆ cea_audio_coding_xtypes

Enumerator
XTYPE_HE_REF_CT 
XTYPE_HE_AAC 
XTYPE_HE_AAC2 
XTYPE_MPEG_SURROUND 
XTYPE_FIRST_RESERVED 

Definition at line 86 of file eldutils.cpp.

Variable Documentation

◆ cea_speaker_allocation_names

const char* cea_speaker_allocation_names[]
static
Initial value:
= {
"FL/FR",
"LFE",
"FC",
"RL/RR",
"RC",
"FLC/FRC",
"RLC/RRC",
"FLW/FRW",
"FLH/FRH",
"TC",
"FCH",
}

Definition at line 65 of file eldutils.cpp.

Referenced by ELD::channel_allocation_desc().

◆ eld_connection_type_names

const char* eld_connection_type_names[4]
static
Initial value:
= {
"HDMI",
"DisplayPort",
"2-reserved",
"3-reserved"
}

Definition at line 79 of file eldutils.cpp.

Referenced by ELD::connection_name().

◆ audiotype_names

const char* audiotype_names[]
static
Initial value:
= {
"undefined",
"LPCM",
"AC3",
"MPEG1",
"MP3",
"MPEG2",
"AAC-LC",
"DTS",
"ATRAC",
"DSD (One Bit Audio)",
"E-AC3",
"DTS-HD",
"TrueHD",
"DST",
"WMAPro",
"HE-AAC",
"HE-AACv2",
"MPEG Surround",
}

Definition at line 95 of file eldutils.cpp.

Referenced by ELD::codecs_desc(), and ELD::sad_desc().

◆ cea_sampling_frequencies

int cea_sampling_frequencies[8]
static
Initial value:
= {
0,
}
#define SNDRV_PCM_RATE_192000
Definition: eldutils.cpp:137
#define SNDRV_PCM_RATE_32000
Definition: eldutils.cpp:130
#define SNDRV_PCM_RATE_176400
Definition: eldutils.cpp:136
#define SNDRV_PCM_RATE_88200
Definition: eldutils.cpp:134
#define SNDRV_PCM_RATE_44100
Definition: eldutils.cpp:131
#define SNDRV_PCM_RATE_96000
Definition: eldutils.cpp:135
#define SNDRV_PCM_RATE_48000
Definition: eldutils.cpp:132

Definition at line 139 of file eldutils.cpp.

Referenced by ELD::update_sad().