{
public CecSharpClient()
{
- CecDeviceTypeList types = new CecDeviceTypeList();
- types.Types[0] = CecDeviceType.RecordingDevice;
+ Config = new LibCECConfiguration();
+ Config.DeviceTypes.Types[0] = CecDeviceType.RecordingDevice;
+ Config.DeviceName = "CEC Tester";
+ Config.ClientVersion = CecClientVersion.Version1_5_0;
+ Config.SetCallbacks(this);
+ LogLevel = (int)CecLogLevel.All;
- Lib = new LibCecSharp("CEC Tester", types);
- LogLevel = (int) CecLogLevel.All;
+ Lib = new LibCecSharp(Config);
Console.WriteLine("CEC Parser created - libcec version " + Lib.GetLibVersionMajor() + "." + Lib.GetLibVersionMinor());
}
public void MainLoop()
{
- Lib.EnableCallbacks(this);
-
Lib.PowerOnDevices(CecLogicalAddress.Tv);
Lib.SetActiveSource(CecDeviceType.PlaybackDevice);
}
}
- private int LogLevel;
- private LibCecSharp Lib;
+ private int LogLevel;
+ private LibCecSharp Lib;
+ private LibCECConfiguration Config;
}
}