Rename scale → scale_mode in protocol/struct layer; add control grouping future note

- `Proto_Display_Device_Info.scale` → `scale_mode`
- `Proto_Start_Display.scale` → `scale_mode`
- `PROTO_DISPLAY_CTRL_SCALE` → `PROTO_DISPLAY_CTRL_SCALE_MODE`
- `proto_write_start_display` param and all callers updated
- `on_display` callback param and all sites updated
- `Display_Slot.scale` → `scale_mode` in node
- Control name "Scale" → "Scale Mode"
- planning.md: add control grouping deferred decision

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-30 00:54:22 +00:00
parent 7777292dfd
commit 8fa2f33bad
5 changed files with 32 additions and 31 deletions

View File

@@ -157,7 +157,7 @@ struct Proto_Display_Device_Info {
uint16_t stream_id;
int16_t win_x, win_y;
uint16_t win_w, win_h;
uint8_t scale;
uint8_t scale_mode;
uint8_t anchor;
};
@@ -166,7 +166,7 @@ struct Proto_Display_Device_Info {
* SET_CONTROL for display device indices returned by ENUM_DEVICES.
* ------------------------------------------------------------------------- */
#define PROTO_DISPLAY_CTRL_SCALE 0x00D00001u /* int 0-3: stretch/fit/fill/1:1 */
#define PROTO_DISPLAY_CTRL_SCALE_MODE 0x00D00001u /* int 0-3: stretch/fit/fill/1:1 */
#define PROTO_DISPLAY_CTRL_ANCHOR 0x00D00002u /* int 0-1: center/topleft */
#define PROTO_DISPLAY_CTRL_NO_SIGNAL_FPS 0x00D00003u /* int 1-60: no-signal animation fps */
@@ -262,7 +262,7 @@ struct Proto_Stop_Ingest {
* display incoming VIDEO_FRAME messages for the given stream_id.
* win_x/win_y are screen-space window position (signed: multi-monitor).
* win_w/win_h of 0 mean use a default size.
* scale: 0=stretch 1=fit 2=fill 3=1:1 (PROTO_DISPLAY_SCALE_*)
* scale_mode: 0=stretch 1=fit 2=fill 3=1:1 (PROTO_DISPLAY_SCALE_*)
* anchor: 0=center 1=topleft (PROTO_DISPLAY_ANCHOR_*)
*/
struct Proto_Start_Display {
@@ -272,7 +272,7 @@ struct Proto_Start_Display {
int16_t win_y;
uint16_t win_w;
uint16_t win_h;
uint8_t scale;
uint8_t scale_mode;
uint8_t anchor;
uint8_t no_signal_fps; /* 0 = default (15); no-signal animation frame rate */
/* 1 byte reserved */
@@ -365,7 +365,7 @@ struct App_Error proto_write_stop_ingest(struct Transport_Conn *conn,
struct App_Error proto_write_start_display(struct Transport_Conn *conn,
uint16_t request_id, uint16_t stream_id,
int16_t win_x, int16_t win_y, uint16_t win_w, uint16_t win_h,
uint8_t scale, uint8_t anchor, uint8_t no_signal_fps);
uint8_t scale_mode, uint8_t anchor, uint8_t no_signal_fps);
/* CONTROL_REQUEST: STOP_DISPLAY */
struct App_Error proto_write_stop_display(struct Transport_Conn *conn,
@@ -510,7 +510,7 @@ struct App_Error proto_read_enum_devices_response(
uint16_t stream_id,
int16_t win_x, int16_t win_y,
uint16_t win_w, uint16_t win_h,
uint8_t scale, uint8_t anchor,
uint8_t scale_mode, uint8_t anchor,
void *userdata),
void *userdata);