diff options
| author | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
| commit | ffc62c792c9a5196cb4ce7a353287dfe20db6524 (patch) | |
| tree | 1269efa852935b183daae4bb33a58d1b4d2ffb53 /commons.h | |
| parent | 059831534c7e884f0a607ed86b582fd00d821731 (diff) | |
New upstream version 3.3.0~beta1+dfsgupstream/3.3.0_beta1+dfsg
Diffstat (limited to 'commons.h')
| -rw-r--r-- | commons.h | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -6,10 +6,10 @@ #define RX_SAMPLE_RATE 12000 #include "DecoderIpcProtocol.h" +#include "lib/decoder_ipc_layout.h" #ifdef __cplusplus #include <cstddef> -#include <QString> #else #include <stdbool.h> #endif @@ -114,7 +114,9 @@ typedef struct dec_data { typedef struct shared_dec_data { decoder_ipc_control_t control; + decoder_ipc_layout_t layout; dec_data_t payload; + decoder_input_metadata_t metadata; } shared_dec_data_t; #ifdef __cplusplus @@ -123,10 +125,18 @@ static_assert (sizeof (decoder_ipc_control_t) == 16, "decoder IPC control header must remain 16 bytes"); static_assert (offsetof (decoder_ipc_control_t, state) == 4, "decoder IPC state must remain at the legacy shutdown offset"); -static_assert (offsetof (shared_dec_data_t, payload) == 16, - "decoder payload must immediately follow the control header"); +static_assert (offsetof (shared_dec_data_t, layout) == sizeof (decoder_ipc_control_t), + "decoder layout descriptor must immediately follow the control header"); +static_assert (offsetof (shared_dec_data_t, payload) == + sizeof (decoder_ipc_control_t) + sizeof (decoder_ipc_layout_t), + "decoder payload must immediately follow the layout descriptor"); +static_assert (sizeof (decoder_input_metadata_t) == 24, + "decoder input metadata layout must remain stable"); +static_assert (offsetof (shared_dec_data_t, metadata) >= + offsetof (shared_dec_data_t, payload) + sizeof (dec_data_t), + "decoder input metadata must follow the payload"); static_assert (sizeof (shared_dec_data_t) == - sizeof (decoder_ipc_control_t) + sizeof (dec_data_t), + offsetof (shared_dec_data_t, metadata) + sizeof (decoder_input_metadata_t), "decoder shared-memory layout must not contain trailing padding"); #endif |
