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 @@ 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;
// callback for opening a resource, returns zero on failure.