LibCecSharp 8.1.6
dotnet add package LibCecSharp --version 8.1.6
NuGet\Install-Package LibCecSharp -Version 8.1.6
<PackageReference Include="LibCecSharp" Version="8.1.6" />
<PackageVersion Include="LibCecSharp" Version="8.1.6" />
<PackageReference Include="LibCecSharp" />
paket add LibCecSharp --version 8.1.6
#r "nuget: LibCecSharp, 8.1.6"
#:package LibCecSharp@8.1.6
#addin nuget:?package=LibCecSharp&version=8.1.6
#tool nuget:?package=LibCecSharp&version=8.1.6
LibCecSharp
The managed binding for libCEC: control CEC-capable HDMI devices — power a TV on or to standby, become the active source, send remote keys, read device state — and receive bus events.
LibCecSharp (namespace CecSharp) is a pure C# assembly that binds the native
library through its C API (P/Invoke over cecc.h), targeting net8.0. It runs
anywhere the native library does: Windows, Linux, macOS and Raspberry Pi.
Requirements
- A Pulse-Eight USB-CEC adapter, or a supported SoC-native CEC backend.
- The native libCEC library on the loader path at runtime —
cec.dllon Windows,libcec.soon Linux,libcec.dylibon macOS. This package is managed IL only; it does not carry the native library.
Install the native library with the Windows USB-CEC Adapter
software, with apt-get install libcec8 on Debian/Ubuntu, or build it from source.
Usage
Derive from CecCallbackMethods to receive events, describe yourself in a
LibCECConfiguration, then construct LibCecSharp.
using CecSharp;
class CecClient : CecCallbackMethods
{
public override int ReceiveLogMessage(CecLogMessage message)
{
Console.WriteLine($"log: {message.Message}");
return 1;
}
}
var config = new LibCECConfiguration();
config.DeviceTypes.Types[0] = CecDeviceType.RecordingDevice;
config.DeviceName = "example";
config.ClientVersion = LibCECConfiguration.CurrentVersion;
using var lib = new LibCecSharp(new CecClient(), config);
// a null port opens the first adapter that opens, skipping any that another
// process is using
if (lib.Open(null, 10000))
{
lib.PowerOnDevices(CecLogicalAddress.Tv);
lib.Close();
}
Full API reference: https://pulse-eight.github.io/libcec/dotnet/
Licence
GPL-2.0-or-later, or a commercial licence from Pulse-Eight — the same dual licence as libCEC itself.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 8.1.6 | 35 | 8/7/2026 |