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:
committed by
Copybara-Service
parent
83e621d771
commit
596b6f433d
@@ -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
|
||||
^^^^^^
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user