# OBS::SetSavePath



## Shader (Feb 28, 2014)

Hi Jim:

I want to control by a plugin the filename in wich is recording the stream. So I did the following code. I submitted with the hope they can be incorporated in the OBS

```
//APIInterface.h add to class APIInterface
    virtual void SetSavePath(CTSTR lpSavePath) const=0;
//and to the EXPORT group (ie after BASE_EXPORT bool OBSGetRecording();:
BASE_EXPORT void OBSSetSavePath(CTSTR lpSavePath);

//API.cpp add to OBSAPIInterface:
	virtual void SetSavePath(CTSTR lpSavePath) const { App->SetSavePath(lpSavePath); }

//OBS.h add to class OBS
void SetSavePath(CTSTR lpSavePath) ;

//OBS.CPP:
void OBS::SetSavePath(CTSTR lpSavePath) {
	String strSavePath=lpSavePath;
	AppConfig->SetString(TEXT("Publish"), TEXT("SavePath"),   strSavePath);
}

//APIDefs.cpp 
void OBSSetSavePath(CTSTR lpSavePath)        {API->SetSavePath(lpSavePath);}
```

Plugins now can change the destination filename by calling OBSSetSavePath(CTSTR lpSavePath);
When the next recording start it will use the new 'savePath'.

Hope this help and get accepted into the OBS.

Shader.


----------



## dodgepong (Mar 1, 2014)

The correct way to submit code is via a github pull request.


----------

