Skip to content

Commit

Permalink
add version info and link
Browse files Browse the repository at this point in the history
  • Loading branch information
exeldro committed Sep 22, 2022
1 parent 49a1863 commit 6b055b4
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 13 deletions.
2 changes: 2 additions & 0 deletions audio-move.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,8 @@ static obs_properties_t *audio_move_properties(void *data)
p = obs_properties_add_float_slider(ppts, "threshold",
obs_module_text("Threshold"), 0.0,
100.0, 0.01);
obs_properties_add_text(ppts, "plugin_info", PLUGIN_INFO,
OBS_TEXT_INFO);
return ppts;
}

Expand Down
1 change: 0 additions & 1 deletion move-action-filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ static obs_properties_t *move_action_properties(void *data)
//obs_frontend_open_properties

move_filter_properties(data, ppts);

return ppts;
}

Expand Down
2 changes: 2 additions & 0 deletions move-filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,8 @@ void move_filter_properties(struct move_filter *move_filter,
obs_properties_add_button(ppts, "move_filter_start",
obs_module_text("Start"),
move_filter_start_button);
obs_properties_add_text(ppts, "plugin_info", PLUGIN_INFO,
OBS_TEXT_INFO);
}

void move_filter_activate(void *data)
Expand Down
14 changes: 10 additions & 4 deletions move-source-filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,8 @@ static void *move_source_create(obs_data_t *settings, obs_source_t *source)
{
struct move_source_info *move_source =
bzalloc(sizeof(struct move_source_info));
move_filter_init(&move_source->move_filter, source, (void (*)(void *))move_source_start);
move_filter_init(&move_source->move_filter, source,
(void (*)(void *))move_source_start);
move_source->move_filter.get_alternative_source =
move_source_get_source;
move_source_update(move_source, settings);
Expand Down Expand Up @@ -1168,9 +1169,12 @@ static obs_properties_t *move_source_properties(void *data)
if (!scene)
scene = obs_group_from_source(parent);
if (!scene) {
obs_properties_add_button(ppts, "warning",
obs_module_text("ScenesOnlyFilter"),
NULL);
obs_property_t *w = obs_properties_add_text(
ppts, "warning", obs_module_text("ScenesOnlyFilter"),
OBS_TEXT_INFO);
obs_property_text_set_info_type(w, OBS_TEXT_INFO_WARNING);
obs_properties_add_text(ppts, "plugin_info", PLUGIN_INFO,
OBS_TEXT_INFO);
return ppts;
}
if (!move_source->scene_item && move_source->source_name &&
Expand Down Expand Up @@ -1470,6 +1474,8 @@ static obs_properties_t *move_source_properties(void *data)
p = obs_properties_add_group(ppts, S_ACTIONS,
obs_module_text("Actions"),
OBS_GROUP_NORMAL, group);
obs_properties_add_text(ppts, "plugin_info", PLUGIN_INFO,
OBS_TEXT_INFO);
return ppts;
}

Expand Down
6 changes: 4 additions & 2 deletions move-transition-override-filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ void move_filter_source_rename(void *data, calldata_t *call_data)
obs_data_release(settings);
}

static void *move_override_filter_create(obs_data_t *settings, obs_source_t *source)
static void *move_override_filter_create(obs_data_t *settings,
obs_source_t *source)
{
struct move_filter_info *move_filter =
bzalloc(sizeof(struct move_filter_info));
Expand Down Expand Up @@ -307,7 +308,8 @@ static obs_properties_t *move_override_filter_properties(void *data)

obs_properties_add_group(ppts, S_MOVE_OUT, obs_module_text("MoveOut"),
OBS_GROUP_NORMAL, group);

obs_properties_add_text(ppts, "plugin_info", PLUGIN_INFO,
OBS_TEXT_INFO);
return ppts;
}

Expand Down
4 changes: 2 additions & 2 deletions move-transition.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "graphics/math-defs.h"
#include "graphics/matrix4.h"
#include "easing.h"
#include "version.h"

struct move_info {
obs_source_t *source;
Expand Down Expand Up @@ -2580,7 +2579,8 @@ static obs_properties_t *move_properties(void *data)

obs_properties_add_group(ppts, S_MOVE_OUT, obs_module_text("MoveOut"),
OBS_GROUP_NORMAL, group);

obs_properties_add_text(ppts, "plugin_info", PLUGIN_INFO,
OBS_TEXT_INFO);
UNUSED_PARAMETER(data);
return ppts;
}
Expand Down
15 changes: 11 additions & 4 deletions move-transition.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <obs-module.h>
#include <util/darray.h>
#include "version.h"

#define MOVE_SOURCE_FILTER_ID "move_source_filter"
#define MOVE_VALUE_FILTER_ID "move_value_filter"
Expand All @@ -11,6 +12,10 @@
#define MOVE_AUDIO_ACTION_FILTER_ID "move_audio_action_filter"
#define MOVE_DIRECTSHOW_FILTER_ID "move_directshow_filter"

#define PLUGIN_INFO \
"<a href=\"https://obsproject.com/forum/resources/move-transition.913/\">Move Transition</a> (" PROJECT_VERSION \
") by <a href=\"https://www.exeldro.com\">Exeldro</a>"

#define S_MATCH "match"
#define S_MOVE_ALL "move_all"
#define S_MOVE_MATCH "move_match"
Expand Down Expand Up @@ -240,12 +245,13 @@ struct move_filter {
long long next_move_on;
bool reverse;
bool enabled_match_moving;
void(* move_start)(void * data);
obs_source_t *(* get_alternative_source)(void * data);
void (*move_start)(void *data);
obs_source_t *(*get_alternative_source)(void *data);
};

bool is_move_filter(const char *filter_id);
void move_filter_init(struct move_filter *move_filter, obs_source_t *source,void (*move_start)(void * data));
void move_filter_init(struct move_filter *move_filter, obs_source_t *source,
void (*move_start)(void *data));
void move_filter_destroy(struct move_filter *move_filter);
void move_filter_update(struct move_filter *move_filter, obs_data_t *settings);
void move_filter_start(struct move_filter *move_filter);
Expand All @@ -254,7 +260,8 @@ bool move_filter_start_internal(struct move_filter *move_filter);
void move_filter_stop(struct move_filter *move_filter);
void move_filter_ended(struct move_filter *move_filter);
bool move_filter_tick(struct move_filter *move_filter, float seconds, float *t);
void move_filter_properties(struct move_filter *move_filter, obs_properties_t *ppts);
void move_filter_properties(struct move_filter *move_filter,
obs_properties_t *ppts);

void move_filter_activate(void *data);
void move_filter_deactivate(void *data);
Expand Down

0 comments on commit 6b055b4

Please sign in to comment.