![]() |
das2C
das core C utilities (v3)
|
One decode/encode context, made by new_DasCodex and owned by the DasCodec that made it. More...
#include <das3/codex.h>
Public Member Functions | |
| DAS_API DasCodex * | new_DasCodex (const char *sMime, das_val_type vtStore, int nRank, const ptrdiff_t *pShape) |
| Make a codec extension (codex) instance for a given mime type to a specific output type. | |
| #define | DasCodex_storage(p) ((p)->storage(p)) |
| Get the value type for individual items read from or written to blobs. | |
| #define | DasCodex_path(p, sBuf, uLen) ((p)->path((p), (sBuf), (uLen))) |
| Write this instance's plugin .so file path into a buffer, for diagnostics. | |
| #define | DasCodex_mime(p, sBuf, uLen) ((p)->mime((p), (sBuf), (uLen))) |
| Write this instance's mime/content-type into a buffer, e.g. | |
| #define | DasCodex_properties(p, pOut, pN) ((p)->properties((p), (pOut), (pN))) |
| Append the codec's own properties (image dims, colorspace, ...) to an array. | |
| #define | DasCodex_decode(p, pBlob, uLen, pAry, pN) ((p)->decode((p), (pBlob), (uLen), (pAry), (pN))) |
| Decode one embedded blob, appending its samples to an array. | |
| #define | DasCodex_encode(p, pItems, pLoc, pBuf, pN) ((p)->encode((p), (pItems), (pLoc), (pBuf), (pN))) |
| Encode one record back into an embedded blob byte-run. | |
| #define | del_DasCodex(p) ((p)->del(p)) |
| Free a codec instance and its internal state. | |
One decode/encode context, made by new_DasCodex and owned by the DasCodec that made it.
Private to a single codec/thread, so it may carry mutable decode/encode scratch.
| DAS_API DasCodex * new_DasCodex | ( | const char * | sMime, |
| das_val_type | vtStore, | ||
| int | nRank, | ||
| const ptrdiff_t * | pShape | ||
| ) |
Make a codec extension (codex) instance for a given mime type to a specific output type.
| sMime | the mime type in question, for example 'image/png'. note that sMime can carry parameters. These can be used to configure a loaded codex, but should never be used to select paths, never allocate unbounded, and a codex that ignores the completely still works. Thes must follows the RFC-2045 section 5.1 'media-type parameters' standard. An example: "image/png; gamma=2.2; interlace=adam7" |
| vtStore | a declared value type. For example grayscale pixels may be output as bytes, shorts, floats, etc. this nails it down. Use vtUnknown to let the codex select one. |
| nRank | the number of index dimensions in the full stream output this is each blob's shape plus an over all stream index. |
| pShape | the expected output storage shape in index space. |