Add args field to mjResource for decoder and encoder arguments.

Add an optional `const char* args` field to `mjResource` to allow passing
resource arguments/hints (such as requested channel count or encoding options)
to resource decoders and encoders.

PiperOrigin-RevId: 959774058
Change-Id: Icc41a2bb3895fef24f98c5fa9a77cdad092a6bc7
This commit is contained in:
Sam Haves
2026-08-05 11:30:42 -07:00
committed by Copybara-Service
parent 83e621d771
commit 596b6f433d
5 changed files with 74 additions and 0 deletions
+2
View File
@@ -30,6 +30,8 @@ Actuation
- :ref:`mjsActuator` gained ``velrange`` and ``ffrange`` fields, changing its size and layout. The :ref:`mjtGain`
and :ref:`mjtDyn` enums gained ``pid`` members, shifting the values of ``mjGAIN_USER`` and ``mjDYN_USER``.
- :ref:`mjResource` gained an ``args`` field (changing its size and layout), used to hold optional extra encoding and
decoding arguments formatted as URI query parameters (separated by ``&``).
Engine
^^^^^^
+2
View File
@@ -1252,6 +1252,8 @@ typedef struct mjResource_ {
mjVFS* vfs; // pointer to the VFS
char timestamp[512]; // timestamp of the resource
const struct mjpResourceProvider* provider; // pointer to the provider
const char* args; // resource arguments/hints, URI query format key=val&...
// (optional)
} mjResource;
typedef struct mjpResourceProvider {
const char* prefix; // prefix for match against a resource name