Skip to content
pekkanikander edited this page Oct 20, 2012 · 9 revisions

Goal

The goal of this project is to produce a minimal CEC software adapter for Mac OS X, allowing the remote control keys to be used to control a MacMini. Probably also some functions related to power managements etc. The primary hardware is Pulse-Eight CEC-USB adapter.

Thoughts of code

Unfortunately the Pulse-Eight libcec lower layers are horrendous code. C++ object spaghetti, with lots of interdependencies between classes and control jumping from an object to another and back. This applies especially to the src/lib/platform, but also to src/lib/adapter. The upper level code is slightly better, so that may be of reuse. However, at the moment I'm looking at replacing the lower layers altogether. I'm not inclined to refactor poorly written C++.

The actual code that reads and writes data is in /src/lib/platform/posix/os-socket.h. Go figure. But that's where I can snoop.

Christian König's (deathsimple@vodafone.de) CEC code is very clean and nice, but it is also a very partial implementation.

The arduino CEC implementation remains to be seen.

Clone this wiki locally