New upstream version 21.0.2+dfsg1
This commit is contained in:
parent
1f1bbb3518
commit
baafb6325b
706 changed files with 49633 additions and 5044 deletions
|
|
@ -210,6 +210,11 @@ void obs_frontend_replay_buffer_start(void)
|
|||
if (callbacks_valid()) c->obs_frontend_replay_buffer_start();
|
||||
}
|
||||
|
||||
void obs_frontend_replay_buffer_save(void)
|
||||
{
|
||||
if (callbacks_valid()) c->obs_frontend_replay_buffer_save();
|
||||
}
|
||||
|
||||
void obs_frontend_replay_buffer_stop(void)
|
||||
{
|
||||
if (callbacks_valid()) c->obs_frontend_replay_buffer_stop();
|
||||
|
|
@ -306,6 +311,20 @@ void obs_frontend_remove_save_callback(obs_frontend_save_cb callback,
|
|||
c->obs_frontend_remove_save_callback(callback, private_data);
|
||||
}
|
||||
|
||||
void obs_frontend_add_preload_callback(obs_frontend_save_cb callback,
|
||||
void *private_data)
|
||||
{
|
||||
if (callbacks_valid())
|
||||
c->obs_frontend_add_preload_callback(callback, private_data);
|
||||
}
|
||||
|
||||
void obs_frontend_remove_preload_callback(obs_frontend_save_cb callback,
|
||||
void *private_data)
|
||||
{
|
||||
if (callbacks_valid())
|
||||
c->obs_frontend_remove_preload_callback(callback, private_data);
|
||||
}
|
||||
|
||||
void obs_frontend_push_ui_translation(obs_frontend_translate_ui_cb translate)
|
||||
{
|
||||
if (callbacks_valid())
|
||||
|
|
@ -336,3 +355,42 @@ void obs_frontend_save_streaming_service(void)
|
|||
if (callbacks_valid())
|
||||
c->obs_frontend_save_streaming_service();
|
||||
}
|
||||
|
||||
bool obs_frontend_preview_program_mode_active(void)
|
||||
{
|
||||
return !!callbacks_valid()
|
||||
? c->obs_frontend_preview_program_mode_active()
|
||||
: false;
|
||||
}
|
||||
|
||||
void obs_frontend_set_preview_program_mode(bool enable)
|
||||
{
|
||||
if (callbacks_valid())
|
||||
c->obs_frontend_set_preview_program_mode(enable);
|
||||
}
|
||||
|
||||
void obs_frontend_set_preview_enabled(bool enable)
|
||||
{
|
||||
if (callbacks_valid())
|
||||
c->obs_frontend_set_preview_enabled(enable);
|
||||
}
|
||||
|
||||
bool obs_frontend_preview_enabled(void)
|
||||
{
|
||||
return !!callbacks_valid()
|
||||
? c->obs_frontend_preview_enabled()
|
||||
: false;
|
||||
}
|
||||
|
||||
obs_source_t *obs_frontend_get_current_preview_scene(void)
|
||||
{
|
||||
return !!callbacks_valid()
|
||||
? c->obs_frontend_get_current_preview_scene()
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
void obs_frontend_set_current_preview_scene(obs_source_t *scene)
|
||||
{
|
||||
if (callbacks_valid())
|
||||
c->obs_frontend_set_current_preview_scene(scene);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,73 +13,6 @@ typedef struct config_data config_t;
|
|||
struct obs_data;
|
||||
typedef struct obs_data obs_data_t;
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
struct obs_frontend_source_list {
|
||||
DARRAY(obs_source_t*) sources;
|
||||
};
|
||||
|
||||
static inline void obs_frontend_source_list_free(
|
||||
struct obs_frontend_source_list *source_list)
|
||||
{
|
||||
size_t num = source_list->sources.num;
|
||||
for (size_t i = 0; i < num; i++)
|
||||
obs_source_release(source_list->sources.array[i]);
|
||||
da_free(source_list->sources);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/* NOTE: Functions that return char** string lists are a single allocation of
|
||||
* memory with pointers to itself. Free with a single call to bfree on the
|
||||
* base char** pointer. */
|
||||
|
||||
/* NOTE: User interface should not use typical Qt locale translation methods,
|
||||
* as the OBS UI bypasses it to use a custom translation implementation. Use
|
||||
* standard module translation methods, obs_module_text. For text in a Qt
|
||||
* window, use obs_frontend_push_ui_translation when the text is about to be
|
||||
* translated, and obs_frontend_pop_ui_translation when translation is
|
||||
* complete. */
|
||||
|
||||
EXPORT void *obs_frontend_get_main_window(void);
|
||||
EXPORT void *obs_frontend_get_main_window_handle(void);
|
||||
|
||||
EXPORT char **obs_frontend_get_scene_names(void);
|
||||
EXPORT void obs_frontend_get_scenes(struct obs_frontend_source_list *sources);
|
||||
EXPORT obs_source_t *obs_frontend_get_current_scene(void);
|
||||
EXPORT void obs_frontend_set_current_scene(obs_source_t *scene);
|
||||
|
||||
EXPORT void obs_frontend_get_transitions(
|
||||
struct obs_frontend_source_list *sources);
|
||||
EXPORT obs_source_t *obs_frontend_get_current_transition(void);
|
||||
EXPORT void obs_frontend_set_current_transition(obs_source_t *transition);
|
||||
|
||||
EXPORT char **obs_frontend_get_scene_collections(void);
|
||||
EXPORT char *obs_frontend_get_current_scene_collection(void);
|
||||
EXPORT void obs_frontend_set_current_scene_collection(const char *collection);
|
||||
|
||||
EXPORT char **obs_frontend_get_profiles(void);
|
||||
EXPORT char *obs_frontend_get_current_profile(void);
|
||||
EXPORT void obs_frontend_set_current_profile(const char *profile);
|
||||
|
||||
EXPORT void obs_frontend_streaming_start(void);
|
||||
EXPORT void obs_frontend_streaming_stop(void);
|
||||
EXPORT bool obs_frontend_streaming_active(void);
|
||||
|
||||
EXPORT void obs_frontend_recording_start(void);
|
||||
EXPORT void obs_frontend_recording_stop(void);
|
||||
EXPORT bool obs_frontend_recording_active(void);
|
||||
|
||||
EXPORT void obs_frontend_replay_buffer_start(void);
|
||||
EXPORT void obs_frontend_replay_buffer_stop(void);
|
||||
EXPORT bool obs_frontend_replay_buffer_active(void);
|
||||
|
||||
typedef void (*obs_frontend_cb)(void *private_data);
|
||||
|
||||
EXPORT void *obs_frontend_add_tools_menu_qaction(const char *name);
|
||||
EXPORT void obs_frontend_add_tools_menu_item(const char *name,
|
||||
obs_frontend_cb callback, void *private_data);
|
||||
|
||||
enum obs_frontend_event {
|
||||
OBS_FRONTEND_EVENT_STREAMING_STARTING,
|
||||
OBS_FRONTEND_EVENT_STREAMING_STARTED,
|
||||
|
|
@ -103,9 +36,76 @@ enum obs_frontend_event {
|
|||
OBS_FRONTEND_EVENT_REPLAY_BUFFER_STARTING,
|
||||
OBS_FRONTEND_EVENT_REPLAY_BUFFER_STARTED,
|
||||
OBS_FRONTEND_EVENT_REPLAY_BUFFER_STOPPING,
|
||||
OBS_FRONTEND_EVENT_REPLAY_BUFFER_STOPPED
|
||||
OBS_FRONTEND_EVENT_REPLAY_BUFFER_STOPPED,
|
||||
|
||||
OBS_FRONTEND_EVENT_STUDIO_MODE_ENABLED,
|
||||
OBS_FRONTEND_EVENT_STUDIO_MODE_DISABLED,
|
||||
OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED,
|
||||
|
||||
OBS_FRONTEND_EVENT_SCENE_COLLECTION_CLEANUP
|
||||
};
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#ifndef SWIG
|
||||
|
||||
struct obs_frontend_source_list {
|
||||
DARRAY(obs_source_t*) sources;
|
||||
};
|
||||
|
||||
static inline void obs_frontend_source_list_free(
|
||||
struct obs_frontend_source_list *source_list)
|
||||
{
|
||||
size_t num = source_list->sources.num;
|
||||
for (size_t i = 0; i < num; i++)
|
||||
obs_source_release(source_list->sources.array[i]);
|
||||
da_free(source_list->sources);
|
||||
}
|
||||
|
||||
#endif //!SWIG
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/* NOTE: Functions that return char** string lists are a single allocation of
|
||||
* memory with pointers to itself. Free with a single call to bfree on the
|
||||
* base char** pointer. */
|
||||
|
||||
/* NOTE: User interface should not use typical Qt locale translation methods,
|
||||
* as the OBS UI bypasses it to use a custom translation implementation. Use
|
||||
* standard module translation methods, obs_module_text. For text in a Qt
|
||||
* window, use obs_frontend_push_ui_translation when the text is about to be
|
||||
* translated, and obs_frontend_pop_ui_translation when translation is
|
||||
* complete. */
|
||||
|
||||
#ifndef SWIG
|
||||
|
||||
EXPORT void *obs_frontend_get_main_window(void);
|
||||
EXPORT void *obs_frontend_get_main_window_handle(void);
|
||||
|
||||
EXPORT char **obs_frontend_get_scene_names(void);
|
||||
EXPORT void obs_frontend_get_scenes(struct obs_frontend_source_list *sources);
|
||||
EXPORT obs_source_t *obs_frontend_get_current_scene(void);
|
||||
EXPORT void obs_frontend_set_current_scene(obs_source_t *scene);
|
||||
|
||||
EXPORT void obs_frontend_get_transitions(
|
||||
struct obs_frontend_source_list *sources);
|
||||
EXPORT obs_source_t *obs_frontend_get_current_transition(void);
|
||||
EXPORT void obs_frontend_set_current_transition(obs_source_t *transition);
|
||||
|
||||
EXPORT char **obs_frontend_get_scene_collections(void);
|
||||
EXPORT char *obs_frontend_get_current_scene_collection(void);
|
||||
EXPORT void obs_frontend_set_current_scene_collection(const char *collection);
|
||||
|
||||
EXPORT char **obs_frontend_get_profiles(void);
|
||||
EXPORT char *obs_frontend_get_current_profile(void);
|
||||
EXPORT void obs_frontend_set_current_profile(const char *profile);
|
||||
|
||||
typedef void (*obs_frontend_cb)(void *private_data);
|
||||
|
||||
EXPORT void *obs_frontend_add_tools_menu_qaction(const char *name);
|
||||
EXPORT void obs_frontend_add_tools_menu_item(const char *name,
|
||||
obs_frontend_cb callback, void *private_data);
|
||||
|
||||
typedef void (*obs_frontend_event_cb)(enum obs_frontend_event event,
|
||||
void *private_data);
|
||||
|
||||
|
|
@ -117,18 +117,15 @@ EXPORT void obs_frontend_remove_event_callback(obs_frontend_event_cb callback,
|
|||
typedef void (*obs_frontend_save_cb)(obs_data_t *save_data, bool saving,
|
||||
void *private_data);
|
||||
|
||||
EXPORT void obs_frontend_save(void);
|
||||
EXPORT void obs_frontend_add_save_callback(obs_frontend_save_cb callback,
|
||||
void *private_data);
|
||||
EXPORT void obs_frontend_remove_save_callback(obs_frontend_save_cb callback,
|
||||
void *private_data);
|
||||
|
||||
EXPORT obs_output_t *obs_frontend_get_streaming_output(void);
|
||||
EXPORT obs_output_t *obs_frontend_get_recording_output(void);
|
||||
EXPORT obs_output_t *obs_frontend_get_replay_buffer_output(void);
|
||||
|
||||
EXPORT config_t *obs_frontend_get_profile_config(void);
|
||||
EXPORT config_t *obs_frontend_get_global_config(void);
|
||||
EXPORT void obs_frontend_add_preload_callback(obs_frontend_save_cb callback,
|
||||
void *private_data);
|
||||
EXPORT void obs_frontend_remove_preload_callback(obs_frontend_save_cb callback,
|
||||
void *private_data);
|
||||
|
||||
typedef bool (*obs_frontend_translate_ui_cb)(const char *text,
|
||||
const char **out);
|
||||
|
|
@ -137,10 +134,43 @@ EXPORT void obs_frontend_push_ui_translation(
|
|||
obs_frontend_translate_ui_cb translate);
|
||||
EXPORT void obs_frontend_pop_ui_translation(void);
|
||||
|
||||
#endif //!SWIG
|
||||
|
||||
EXPORT void obs_frontend_streaming_start(void);
|
||||
EXPORT void obs_frontend_streaming_stop(void);
|
||||
EXPORT bool obs_frontend_streaming_active(void);
|
||||
|
||||
EXPORT void obs_frontend_recording_start(void);
|
||||
EXPORT void obs_frontend_recording_stop(void);
|
||||
EXPORT bool obs_frontend_recording_active(void);
|
||||
|
||||
EXPORT void obs_frontend_replay_buffer_start(void);
|
||||
EXPORT void obs_frontend_replay_buffer_save(void);
|
||||
EXPORT void obs_frontend_replay_buffer_stop(void);
|
||||
EXPORT bool obs_frontend_replay_buffer_active(void);
|
||||
|
||||
EXPORT void obs_frontend_save(void);
|
||||
|
||||
EXPORT obs_output_t *obs_frontend_get_streaming_output(void);
|
||||
EXPORT obs_output_t *obs_frontend_get_recording_output(void);
|
||||
EXPORT obs_output_t *obs_frontend_get_replay_buffer_output(void);
|
||||
|
||||
EXPORT config_t *obs_frontend_get_profile_config(void);
|
||||
EXPORT config_t *obs_frontend_get_global_config(void);
|
||||
|
||||
EXPORT void obs_frontend_set_streaming_service(obs_service_t *service);
|
||||
EXPORT obs_service_t* obs_frontend_get_streaming_service(void);
|
||||
EXPORT void obs_frontend_save_streaming_service(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_enabled(bool enable);
|
||||
EXPORT bool obs_frontend_preview_enabled(void);
|
||||
|
||||
EXPORT obs_source_t *obs_frontend_get_current_preview_scene(void);
|
||||
EXPORT void obs_frontend_set_current_preview_scene(obs_source_t *scene);
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ struct obs_frontend_callbacks {
|
|||
virtual bool obs_frontend_recording_active(void)=0;
|
||||
|
||||
virtual void obs_frontend_replay_buffer_start(void)=0;
|
||||
virtual void obs_frontend_replay_buffer_save(void) = 0;
|
||||
virtual void obs_frontend_replay_buffer_stop(void)=0;
|
||||
virtual bool obs_frontend_replay_buffer_active(void)=0;
|
||||
|
||||
|
|
@ -66,6 +67,11 @@ struct obs_frontend_callbacks {
|
|||
virtual void obs_frontend_remove_save_callback(
|
||||
obs_frontend_save_cb callback, void *private_data)=0;
|
||||
|
||||
virtual void obs_frontend_add_preload_callback(
|
||||
obs_frontend_save_cb callback, void *private_data)=0;
|
||||
virtual void obs_frontend_remove_preload_callback(
|
||||
obs_frontend_save_cb callback, void *private_data)=0;
|
||||
|
||||
virtual void obs_frontend_push_ui_translation(
|
||||
obs_frontend_translate_ui_cb translate)=0;
|
||||
virtual void obs_frontend_pop_ui_translation(void)=0;
|
||||
|
|
@ -75,7 +81,16 @@ struct obs_frontend_callbacks {
|
|||
virtual obs_service_t *obs_frontend_get_streaming_service(void)=0;
|
||||
virtual void obs_frontend_save_streaming_service()=0;
|
||||
|
||||
virtual bool obs_frontend_preview_program_mode_active(void)=0;
|
||||
virtual void obs_frontend_set_preview_program_mode(bool enable)=0;
|
||||
virtual bool obs_frontend_preview_enabled(void)=0;
|
||||
virtual void obs_frontend_set_preview_enabled(bool enable)=0;
|
||||
|
||||
virtual obs_source_t *obs_frontend_get_current_preview_scene(void)=0;
|
||||
virtual void obs_frontend_set_current_preview_scene(obs_source_t *scene)=0;
|
||||
|
||||
virtual void on_load(obs_data_t *settings)=0;
|
||||
virtual void on_preload(obs_data_t *settings)=0;
|
||||
virtual void on_save(obs_data_t *settings)=0;
|
||||
virtual void on_event(enum obs_frontend_event event)=0;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue