Skip to content

Commit

Permalink
Merge pull request #66 from kounoike:feature/log-version
Browse files Browse the repository at this point in the history
log obg-virtualbg version
  • Loading branch information
kounoike committed Mar 2, 2022
2 parents 0001f5b + d20be0c commit c5b2588
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ target_link_libraries(${CMAKE_PROJECT_NAME}
Halide::RunGenMain
)

target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE "VBG_VERSION=\"${SEMVER}\"")

if(WIN32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
Expand Down
1 change: 1 addition & 0 deletions src/obs-virtualbg-detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ void detector_setup_lut() {

void *detector_create(obs_data_t *settings, obs_source_t *source) {
UNUSED_PARAMETER(settings);
blog(LOG_INFO, "[Virtual BG detector] detecter_create version:v%s", VBG_VERSION);
struct virtual_bg_filter_data *filter_data =
reinterpret_cast<virtual_bg_filter_data *>(bzalloc(sizeof(struct virtual_bg_filter_data)));
filter_data->self = source;
Expand Down
1 change: 1 addition & 0 deletions src/obs-virtualbg-render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ void render_update(void *data, obs_data_t *settings) {

void *render_create(obs_data_t *settings, obs_source_t *source) {
UNUSED_PARAMETER(settings);
blog(LOG_INFO, "[Virtual BG renderer] render_create version=v%s", VBG_VERSION);

obs_enter_graphics();

Expand Down
2 changes: 2 additions & 0 deletions src/plugin.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "plugin.hpp"
#include <map>
#include <memory>
#include <mutex>
Expand Down Expand Up @@ -76,6 +77,7 @@ extern struct obs_source_info obs_virtualbg_detector_source_info;
extern struct obs_source_info obs_virtualbg_render_source_info;

bool obs_module_load(void) {
blog(LOG_INFO, "[OBS Virtual BG plugin] obs_module_load. version=v%s", VBG_VERSION);
obs_register_source(&obs_virtualbg_detector_source_info);
obs_register_source(&obs_virtualbg_render_source_info);
return true;
Expand Down
4 changes: 4 additions & 0 deletions src/plugin.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#include <obs.h>
#pragma once

#ifndef VBG_VERSION
#define VBG_VERSION "not defined"
#endif

void create_mask_data(obs_source_t *source, uint32_t width, uint32_t height);

uint32_t get_mask_width(obs_source_t *source);
Expand Down

0 comments on commit c5b2588

Please sign in to comment.