mmstream_set_configuration()

Updated: April 19, 2023

Set the configuration for an instance

Synopsis:

#include <mmstream/mmstream.h>
int mmstream_set_configuration(mmstream_instance_t instance,
                               const char *config)

Arguments:

instance
A handle to the instance whose configuration is being set
config
A pointer to a buffer containing the new configuration as JSON text, or NULL to make mm-stream read the configuration file

Library:

libmmstream

Description:

This function reconfigures the specified instance based on the configuration data in config. The data must be defined as null-terminated JSON text. Or, you can pass in NULL for this parameter to make mm-stream read the configuration file.

When this function is called, the mm-stream server deletes the instance (and hence, stops any media streaming in progress) and recreates it based on the new configuration. If the previous instance was enabled, the new instance is enabled just after it's created.

Returns:

Zero on success, a negative value on failure.