UI: Add obs_frontend_get_current_record_output_path()
Returns the current path of the record output.
This commit is contained in:
parent
293b7951ed
commit
22fa8f8bb0
@ -618,6 +618,13 @@ struct OBSStudioAPI : obs_frontend_callbacks {
|
||||
Q_ARG(OBSSource, OBSSource(source)));
|
||||
}
|
||||
|
||||
char *obs_frontend_get_current_record_output_path(void) override
|
||||
{
|
||||
const char *recordOutputPath = main->GetCurrentOutputPath();
|
||||
|
||||
return bstrdup(recordOutputPath);
|
||||
}
|
||||
|
||||
void on_load(obs_data_t *settings) override
|
||||
{
|
||||
for (size_t i = saveCallbacks.size(); i > 0; i--) {
|
||||
|
@ -546,3 +546,10 @@ void obs_frontend_open_source_filters(obs_source_t *source)
|
||||
if (callbacks_valid())
|
||||
c->obs_frontend_open_source_filters(source);
|
||||
}
|
||||
|
||||
char *obs_frontend_get_current_record_output_path(void)
|
||||
{
|
||||
return !!callbacks_valid()
|
||||
? c->obs_frontend_get_current_record_output_path()
|
||||
: nullptr;
|
||||
}
|
||||
|
@ -220,6 +220,8 @@ EXPORT void obs_frontend_reset_video(void);
|
||||
EXPORT void obs_frontend_open_source_properties(obs_source_t *source);
|
||||
EXPORT void obs_frontend_open_source_filters(obs_source_t *source);
|
||||
|
||||
EXPORT char *obs_frontend_get_current_record_output_path(void);
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -138,6 +138,8 @@ struct obs_frontend_callbacks {
|
||||
virtual void
|
||||
obs_frontend_open_source_properties(obs_source_t *source) = 0;
|
||||
virtual void obs_frontend_open_source_filters(obs_source_t *source) = 0;
|
||||
|
||||
virtual char *obs_frontend_get_current_record_output_path(void) = 0;
|
||||
};
|
||||
|
||||
EXPORT void
|
||||
|
Loading…
x
Reference in New Issue
Block a user