# DIL Properties API

### DIL\_QueryProperty

Obtain a specific named property. This function provides a way of looking up a property by name to observe it's current value, this may be of use for a user to query DIL properties

```cpp
DIL_ReturnCode DIL_QueryProperty(DIL_Decoder decoder, const char* name, DILProperty* output);
```

### DIL\_SetProperty

Set a specific named property. This function provides a way of changing a property by name

```cpp
DIL_ReturnCode DIL_SetProperty(DIL_Decoder decoder, const char* name, DILProperty* value);
```

### DIL\_QueryPropertyGroup

Obtain all the available properties for a named group

```cpp
DIL_ReturnCode DIL_QueryPropertyGroup(DIL_Decoder decoder, const char* name, DILPropertyGroup* output);
```

### DIL\_ReleaseProperty

Release a previously queried property, this function provides a way of releasing any memory allocated by a call to DIL\_QueryProperty. Any data contained in value maybe invalidated after this call

```cpp
DIL_ReturnCode DIL_ReleaseProperty(DIL_Decoder decoder, DILProperty* value);
```

### DIL\_ReleasePropertyGroup

Release a previously queried property group, this function provides a way of releasing any memory allocated by a call to DIL\_QueryPropertyGroup Any data contained in value maybe invalidated after this call

```cpp
DIL_ReturnCode DIL_ReleasePropertyGroup(DIL_Decoder decoder, DILPropertyGroup* value);
```

### DILProperty struct.

This structure contains all relevant information used to query a property or metadata from the DIL.

```cpp
typedef struct DILProperty
{
  const char*     name;        /* The name of the property.  */
  const char*     description; /* A description of the property. */
  DILPropertyType type;        /* The value type for this property. */
  union
  {
    int8_t      i8;
    int16_t     i16;
    int32_t     i32;
    int64_t     i64;
    uint8_t     u8;
    uint16_t    u16;
    uint32_t    u32;
    uint64_t    u64;
    float       f;
    double      d;
    const char* str;
    const void* vptr;
    const void* data;
		const DILPropertyGroup* pgptr;
  } value;                  /* A union representing the value of the property. The user must read the field that match the type enum value. */

  const uint8_t* blob;      /* Special field containing a block of contiguous memory when the type enum is set to DIL_PT_Blob. This is allowed to be NULL. */
  uint32_t       blob_size; /* When the blob is not NULL then the length in bytes of the memory, otherwise 0. */
	uint64_t       data_size; /* size of the "data" buffer in bytes */
	bool           can_free;  /* flag to show if the pointer values should be free'ed when the DIL_ReleaseProperty is called */
} DILProperty;
```

### DILPropertyGroup struct.

This structure contains a logical grouping of properties, this is a convenience feature to assist with providing a "pretty" command line, or GUI.

All properties are assigned to a group, and properties can only appear in one group.

```cpp
typedef struct DILPropertyGroup_t
{
  const char*  name;           /* The name for this group of properties. */
  const char*  description;    /* A description of the property group. */
  DILProperty* properties;     /* An array of properties for this group. */
  uint32_t     property_count; /* The length of the properties array. */
	bool         can_free;       /* flag to show if the properties pointer should be free'ed when the DIL_ReleaseProperty is called */
} DILPropertyGroup;
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.v-nova.com/technologies/mpeg-5.lcevc/decoder/sdk/decoder-integration-layer-dil/dil-properties-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
