Merge pull request #1873 from Palakis/feature/frontend-api-studio-mode-transition
obs-frontend-api: Add method to trigger a Studio Mode transitionmaster
commit
3a3cfce29d
|
@ -450,6 +450,11 @@ struct OBSStudioAPI : obs_frontend_callbacks {
|
||||||
main->SetPreviewProgramMode(enable);
|
main->SetPreviewProgramMode(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void obs_frontend_preview_program_trigger_transition(void) override
|
||||||
|
{
|
||||||
|
QMetaObject::invokeMethod(main, "TransitionClicked");
|
||||||
|
}
|
||||||
|
|
||||||
bool obs_frontend_preview_enabled(void) override
|
bool obs_frontend_preview_enabled(void) override
|
||||||
{
|
{
|
||||||
return main->previewEnabled;
|
return main->previewEnabled;
|
||||||
|
|
|
@ -408,6 +408,12 @@ void obs_frontend_set_preview_program_mode(bool enable)
|
||||||
c->obs_frontend_set_preview_program_mode(enable);
|
c->obs_frontend_set_preview_program_mode(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void obs_frontend_preview_program_trigger_transition(void)
|
||||||
|
{
|
||||||
|
if (callbacks_valid())
|
||||||
|
c->obs_frontend_preview_program_trigger_transition();
|
||||||
|
}
|
||||||
|
|
||||||
void obs_frontend_set_preview_enabled(bool enable)
|
void obs_frontend_set_preview_enabled(bool enable)
|
||||||
{
|
{
|
||||||
if (callbacks_valid())
|
if (callbacks_valid())
|
||||||
|
|
|
@ -171,6 +171,7 @@ EXPORT void obs_frontend_save_streaming_service(void);
|
||||||
|
|
||||||
EXPORT bool obs_frontend_preview_program_mode_active(void);
|
EXPORT bool obs_frontend_preview_program_mode_active(void);
|
||||||
EXPORT void obs_frontend_set_preview_program_mode(bool enable);
|
EXPORT void obs_frontend_set_preview_program_mode(bool enable);
|
||||||
|
EXPORT void obs_frontend_preview_program_trigger_transition(void);
|
||||||
|
|
||||||
EXPORT void obs_frontend_set_preview_enabled(bool enable);
|
EXPORT void obs_frontend_set_preview_enabled(bool enable);
|
||||||
EXPORT bool obs_frontend_preview_enabled(void);
|
EXPORT bool obs_frontend_preview_enabled(void);
|
||||||
|
|
|
@ -89,6 +89,8 @@ struct obs_frontend_callbacks {
|
||||||
|
|
||||||
virtual bool obs_frontend_preview_program_mode_active(void)=0;
|
virtual bool obs_frontend_preview_program_mode_active(void)=0;
|
||||||
virtual void obs_frontend_set_preview_program_mode(bool enable)=0;
|
virtual void obs_frontend_set_preview_program_mode(bool enable)=0;
|
||||||
|
virtual void obs_frontend_preview_program_trigger_transition(void)=0;
|
||||||
|
|
||||||
virtual bool obs_frontend_preview_enabled(void)=0;
|
virtual bool obs_frontend_preview_enabled(void)=0;
|
||||||
virtual void obs_frontend_set_preview_enabled(bool enable)=0;
|
virtual void obs_frontend_set_preview_enabled(bool enable)=0;
|
||||||
|
|
||||||
|
|
|
@ -485,6 +485,12 @@ Functions
|
||||||
|
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
|
|
||||||
|
.. function:: void obs_frontend_preview_program_trigger_transition(void)
|
||||||
|
|
||||||
|
Triggers a preview-to-program transition if studio mode is active.
|
||||||
|
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
.. function:: obs_source_t *obs_frontend_get_current_preview_scene(void)
|
.. function:: obs_source_t *obs_frontend_get_current_preview_scene(void)
|
||||||
|
|
||||||
:return: A new reference to the current preview scene if studio mode
|
:return: A new reference to the current preview scene if studio mode
|
||||||
|
|
Loading…
Reference in New Issue