Updated: October 28, 2024 |
Set the configuration for an instance
#include <mmstream/mmstream.h>
int mmstream_set_configuration(mmstream_instance_t instance, const char *config)
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.
Zero on success, a negative value on failure.