project-chip / connectedhomeip

Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
https://buildwithmatter.com
Apache License 2.0
7.5k stars 2.01k forks source link

Look into adding common camera data types #35837

Open andyg-apple opened 1 month ago

andyg-apple commented 1 month ago

Currently we have some common types spread around different clusters, e.g VideoStreamID. Perhaps we should create these as a common type in chip_types.xml

pidarped commented 1 month ago

I was looking into this and have a local change for defining a new derived type for a stream_id that works. I was thinking of defining a single stream_id that is the same type across Video, Audio and Snapshot. I feel we do not need a separate type for each of these streams. We could make it 32 bits instead of 16 bits. Additionally, the type ID needs to be defined in the spec as well. Section 7.20.2 as a discrete derived type.

gmarcosb commented 1 month ago

I think the best bet here is to add support to zap for ~a typedef

The type is already defined in the spec, and lays out what type it is (int16u)

If we do want to change it to 32 bits, should make a comment on spec

I already made changes to Alchemy to support this & properly reference it as the same type - all that's missing now is zap support

I can take that on