kodi
AEDeviceInfo.h
1 /*
2  * Copyright (C) 2012-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "cores/AudioEngine/Utils/AEChannelInfo.h"
12 #include "cores/AudioEngine/Utils/AEStreamInfo.h"
13 
14 #include <string>
15 #include <vector>
16 
17 typedef std::vector<unsigned int> AESampleRateList;
18 typedef std::vector<enum AEDataFormat> AEDataFormatList;
19 typedef std::vector<CAEStreamInfo::DataType> AEDataTypeList;
20 
21 enum AEDeviceType {
22  AE_DEVTYPE_PCM,
23  AE_DEVTYPE_IEC958,
24  AE_DEVTYPE_HDMI,
25  AE_DEVTYPE_DP
26 };
27 
32 {
33 public:
34  std::string m_deviceName; /* the driver device name */
35  std::string m_displayName; /* the friendly display name */
36  std::string m_displayNameExtra; /* additional display name info, ie, monitor name from ELD */
37  enum AEDeviceType m_deviceType; /* the device type, PCM, IEC958 or HDMI */
38  CAEChannelInfo m_channels; /* the channels the device is capable of rendering */
39  AESampleRateList m_sampleRates; /* the samplerates the device is capable of rendering */
40  AEDataFormatList m_dataFormats; /* the dataformats the device is capable of rendering */
41  AEDataTypeList m_streamTypes;
42 
43  bool m_wantsIECPassthrough; /* if sink supports passthrough encapsulation is done when set to true */
44 
45  bool m_onlyPassthrough{false}; // sink only only should be used for passthrough (audio PT device)
46  bool m_onlyPCM{false}; // sink only should be used for PCM (audio device)
47 
48  operator std::string();
49  static std::string DeviceTypeToString(enum AEDeviceType deviceType);
50  std::string GetFriendlyName() const;
51  std::string ToDeviceString(const std::string& driver) const;
52 };
53 
54 typedef std::vector<CAEDeviceInfo> AEDeviceInfoList;
This classt provides the details of what the audio output hardware is capable of. ...
Definition: AEDeviceInfo.h:31
Definition: AEChannelInfo.h:19