OptrisOptrisDocumentation

Documentation/OTC SDK/OTC SDK — C API referencev12.0

optris_sdk_attachment_input

One file to add to a finished recording.

Call optris_sdk_attachment_input_init() first, then fill it in.

Why there is no: Why there is no compress here optris_sdk_attachment_sink_add() has one and ignores it on a recording: an MKV attachment stream is stored verbatim, so there is nothing to deflate. A field that could only ever be ignored is not offered here rather than offered and quietly dropped.

Public attributes

struct_size

uint32_t struct_size

Set to sizeof(optris_sdk_attachment_input), or call optris_sdk_attachment_input_init().

name

const char * name

File name as a reader should see it, UTF-8, non-empty and at most 255 bytes. Names need not be unique: a name the recording already carries gets a second entry rather than replacing the first.

mime

const char * mime

MIME type, UTF-8, at most 255 bytes. NULL or empty is written as "application/octet-stream", exactly as it is for a provider's files.

data

const void * data

The file content. Copied before the call returns.

size

size_t size

Byte count of data, which must be at least 1. Matroska stores no entry for an empty attachment (measured on ffmpeg 7.1.5, the muxer writes nothing at all for one), so a zero-length file is refused rather than accepted and silently dropped.