# Programmatically changing the settings from a plugin (change the save path of replay buffer)



## myopia (Mar 10, 2015)

I'm trying to set the save path for the replay buffer from a plugin. I'm not really familiar with the code base but after working with OBS for about 1.5 weeks or so I can't seem to find a way how to do this. I can figure out which profile is active by reading the global config file and thus open and the file programmatically in my plugin. However, since the ConfigFile caches values, it doesn't really matter. In this case I would need to get a reference to the AppConfig pointer in Main.cpp or be able to invoke ReloadIniSettings() from the context of a plugin. Unfortunately neither seem possible without changing the OBS API (which involves recompiling a now custom version of OBS).

Is there something I'm missing here? Or is this just not possible? Btw, I know you can run OBS with command line vars to load a specific config file. I'm looking for a way to do this dynamically from within the context of my plugin.

Thanks for the help!


----------



## dodgepong (Mar 10, 2015)

Perhaps it would help if you described what you were actually trying to do.


----------



## myopia (Mar 10, 2015)

I'm trying to create a plugin that allows me to control OBS via a TCP socket (commands and arguments are sent as text). Here are things that I want to do.

Setup a scene with a game capture for a specific window
Start/stop recording and replay buffer
Save the replay buffer
Change the name and location of save files
I can do #1-3 already. I'm having trouble with the #4.

Does this explanation help?

Thanks for any help!


----------



## myopia (Mar 13, 2015)

Bump.

Is the functionality I'm referring to possible? I've continued to look through the code and it seems like this isn't possible. However if someone who is more knowledgeable about the code base could confirm this I would greatly appreciate it.

Thanks!


----------



## dodgepong (Mar 13, 2015)

As far as I know, there isn't a way to do it via the API. You'd have to add such API functionality and send a pull request for it.


----------

