ssalonen / cec-rs

GNU General Public License v2.0
10 stars 8 forks source link

Add get_logical_addresses #34

Closed micolous closed 1 year ago

micolous commented 1 year ago

This adds a wrapper for libcec_get_logical_addresses().

This is necessary to allow a device to know its own identity. The alternative is to hard code a logical address, and hope that it hasn't been reassigned to other CEC devices... which isn't reliable when you have more than one HDMI device of the same type.

Other API additions:

Tested with a P8 USB adapter running on macOS, where my code is acting as a Recorder device, and there's another Recorder device also attached to another HDMI port on my TV.

ssalonen commented 1 year ago

Hi @micolous , have you had time to look into the review comments?

micolous commented 1 year ago

Done. clippy findings appear to be unrelated to this change, https://github.com/ssalonen/cec-rs/pull/36 fixes that.

ssalonen commented 1 year ago

Thank you!