GithubHelp home page GithubHelp logo

cec-dotnet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cec-dotnet's Issues

Windows Away-Mode not supported

Moved from Pulse-Eight/libcec#243

Latest libcec still doesn't support Windows Away-Mode, which has been a part of Windows since XP MCE. This breaks CEC functionality and makes CEC adapter basically useless on Windows machines:

When Windows tries to wake up system in Away-Mode (to perform a schedules Windows Update or tv recording for example), libcec doesn't recognize away-mode call and overwrites it.

Instead of system remaining "silent", libcec sends out CEC command and wakes up connected tv and avr.


Problem applies to official libcec tray application as well as to 3rd party application like Kodi that rely on libcec library.

Unofficial CEC Tray application by CIR21 properly supports Windows Away-Mode, so implementation is possible.


OpenPHT needs to register to receive away-mode status:

RegisterPowerSettingNotification(m_hWnd, &GUID_SYSTEM_AWAYMODE, DEVICE_NOTIFY_WINDOW_HANDLE);

The powermanager then needs to check for the Away-Mode call like this:

case PBT_POWERSETTINGCHANGE:
{
POWERBROADCAST_SETTING* s = (POWERBROADCAST_SETTING*)nEventData;
if( s != NULL && IsEqualGUID( s->PowerSetting, GUID_SYSTEM_AWAYMODE ) )
// The computer is entering "away" mode.

Further technical documentation is available in the attached documents or over on MSDN:
Microsoft documentation

awaymode.pdf
AvailabilityRequests.pdf

Can't find adapter with cec.dll 4.0.0.0

I have compiled the cec.dll 4.0.0.0, but I cant find the adapter, with the cec.dll 3.0.0.0 no problem.
The proyect libcec no longer generates a LibCecSharp.dll, is there any way to generate an updated version of LibCecSharp.dll that works with cec.dll 4.0.0.0?

"sleep" mapping does not work in Windows 10

libCECTray offers options for sleeping and waking other devices. Although the button mapping "sleep" is available, which should sleep the host PC from a remote, this does not work in Windows 10.

Steps to reproduce:

  • Open libCECTray
  • Select the "Foreground application" tab
  • Click the "Up" CEC Button
  • Click "Clear" in the "Button configuration" dialog
  • Choose "sleep" from the "Add key" drop-down, click "+" and then "Close"
  • Select the "Configuration" tab
  • Click "Save configuration"
  • Ensure Windows is configured with sleep enabled
  • Press the "Up" button on the remote

Observed behaviour:

  • Nothing happens

Expected behaviour:

  • PC goes to sleep

"Minimise after connecting to adapter" is cleared when UI is shown

The setting "Minimise after connecting to adapter" should be correctly represented in the UI.

Steps to reproduce:

  • Open libCECTray
  • Check "Minimise after connecting to the adapter"
  • Click "Save configuration"
  • Restart libCECTray
  • Confirm UI is not shown on start, as per the user requested setting
  • Open the libCECTray UI by clicking the tray icon

Observed behaviour:

  • "Minimise after connecting to the adapter" is unchecked
  • Clicking "Save configuration" causes the UI to be shown on next start

Expected behaviour:

  • "Minimise after connecting to the adapter" remains checked, as requested by the user
  • Clicking "Save configuration" causes no change in behaviour, as the user has not requested any change in settings

cec-tray crashes with System.ObjectDisposedException with Kodi

Hello,

cec-tray (6.0.2) crashes with exception when Kodi (https://kodi.tv) application starts. Please mind that I use my own Kodi build with all CEC support disabled and which does not load cec.dll - so there is no conflict here.

System.ObjectDisposedException
   w System.Windows.Forms.Control.CreateHandle()
   w System.Windows.Forms.Form.CreateHandle()
   w LibCECTray.ui.CECTray.SetVisibleCore(Boolean)
   w System.Windows.Forms.Control.Hide()
   w LibCECTray.controller.Actions.ProcessEventHandler(System.Object, LibCECTray.controller.actions.UpdateEvent)
   w System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   w System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   w System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   w System.Threading.ThreadHelper.ThreadStart()

Error information (translated from Event log entry):

Application: cec-tray.exe, version: 6.0.2.0, timestamp: 0x5f0c364a
Name of the module causing error: KERNELBASE.dll, version: 10.0.22621.1635, timestamp: 0x61869dd2
Exception code: 0xe0434352
Error offset: 0x000000000006536c
Path to application causing the error: C:\Program Files (x86)\Pulse-Eight\USB-CEC Adapter\x64\netfx\cec-tray.exe
Path to module causing the error: C:\Windows\System32\KERNELBASE.dll

"Save configuration" crashes if a default button mapping has been cleared

The application should not crash when saving configuration.

Steps to reproduce:

  • Open libCECTray
  • Select the "Foreground application" tab
  • Click the "Select" CEC Button
  • Click "Clear" in the "Button configuration" dialog
  • Click "Close" in the "Button configuration" dialog
  • Select the "Configuration" tab
  • Click "Save configuration"

Observed behaviour:

  • Application crashes with a dialog warning that value cannot be null

Expected behaviour:

  • Configuration is saved, without a mapping for Select

Where is namespace CECSharp?

Trying to build cec-dotnet using Visual Studio on a Window 11 in C#. Most of the classes in cec-dotnet require namespace CecSharp. Seems to find all the other namespaces. I tried finding it in all the libraries and don't see it. Which file is it located in?

Rant update 2 weeks after initial post:
I can't believe how fubar all the Pulse-Eight "open source" Windows project files are. Although the candid or pre-build programs seem to work and I haven't tried linux, all the sample code are missing important files. For example, files like CECSharp for c#, the cpp-example doesn't run without extensive modifications, the files to build cec.lib don't seem to exist anywhere, the python program doesn't run because of missing files, etc. What's even more frustrating the hardware module has no basic instructions on how to use it without the candid programs. There is no hint to what the default baud rate is on the USB, for example. Maybe it works for Kodi and raspberry pi's, but that's not my application. I don't get it, how can they sell such a product with claims there are open source examples but don't work and there is no support. It was only $50 but at this point I feel like sending it back to them.

Pulse Eight CEC adapter + windows 10 + sony 43 x800D standby mode kicks in no matter what?

I decided to give the pulse eight cec adapter a shot, so that it could automatically turn off the 43" uhd after it hit the windows idle time.. it worked out well even in 4k 60 RGB mode (but you need premium monoprice cables and set to blanking mode in the custom resolutions to work correctly).

The issue is... even with windows set to NO standby.. if you run the software for this cec device, it will shut off into standby the pc after so many mins, no matter what.. ie: set screen to go off in 3 minutes, the whole pc is usually in stand by in 30.

If i kill the libCEC v3 or v4 software and test, it doesnt enter standby..

Has anyone used this adapter and ran into this?

Thanks in advance

dotnet core on raspberry pi

More of a query here guys, is it expected that the LibCecSharp library would work with dotnet core, deployed on a raspberry pi.

I know from the docs that libcec will work on the pi, but couldn't work out if LibCecSharp would point to the correct binaries.

Cheers.

CEC-tray 6.0.2 crashes (libcecsharp.dll error message)

Tried to install the pre-made libcec-6.0.2.exe build on a Windows 10 x64 machine that previously was running v 4.0.3. However, when I try to launch the CEC-tray application, it just brings up an "LibCecSharp.dll" error message.

While the new green icon does show up in the system tray, clicking on it brings up a .NET error message also referring to this .dll file.

Already tried un- and re-installing but this didn't result in any change.

EDIT: The tray application starts up fine when you go into the Pulse Eight folder and manually start the x86 version. So it looks like it's related to the 64-bit build somehow.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.