Skip to content

Commit ffc5153

Browse files
author
Mark Kendall
committed
libCEC: Updates for libCEC API changes.
1 parent 10273b5 commit ffc5153

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

mythtv/libs/libmythui/cecadapter.cpp

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ class CECAdapterPriv
7070
static QStringList GetDeviceList(void)
7171
{
7272
QStringList results;
73-
ICECAdapter *adapter = LoadLibCec("MythTV");
73+
cec_device_type_list list;
74+
list.Clear();
75+
list.Add(CEC_DEVICE_TYPE_PLAYBACK_DEVICE);
76+
ICECAdapter *adapter = LibCecInit("MythTV", list);
7477
if (!adapter)
7578
return results;
7679
cec_adapter *devices = new cec_adapter[MAX_CEC_DEVICES];
@@ -116,7 +119,10 @@ class CECAdapterPriv
116119
}
117120

118121
// create adapter interface
119-
adapter = LoadLibCec("MythTV", defaultDeviceID, defaultHDMIPort);
122+
cec_device_type_list list;
123+
list.Clear();
124+
list.Add(CEC_DEVICE_TYPE_PLAYBACK_DEVICE);
125+
adapter = LibCecInit("MythTV", list);
120126

121127
if (!adapter)
122128
{
@@ -173,8 +179,20 @@ class CECAdapterPriv
173179

174180
LOG(VB_GENERAL, LOG_INFO, LOC + "Opened CEC device.");
175181

176-
// turn on tv and switch input (if configured)
182+
// turn on tv (if configured)
177183
powerOnTV = powerOnTVOnStart;
184+
HandleActions();
185+
186+
// get the vendor ID (for non-standard implementations)
187+
adapter->GetDeviceVendorId(CECDEVICE_TV);
188+
189+
// set the physical address
190+
adapter->SetPhysicalAddress(defaultHDMIPort);
191+
192+
// set the logical address
193+
adapter->SetLogicalAddress(defaultDeviceID);
194+
195+
// switch input (if configured)
178196
switchInput = true;
179197
HandleActions();
180198

0 commit comments

Comments
 (0)