-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add OCR filter callbacks for media events and enable state management (…
…#30) * Add OCR filter callbacks for media events and enable state management * Remove unused media event callback functions from OCR filter
- Loading branch information
Showing
4 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
#include "filter-data.h" | ||
#include "plugin-support.h" | ||
|
||
#include <obs.h> | ||
|
||
void enable_callback(void *data_, calldata_t *cd) | ||
{ | ||
filter_data *gf_ = static_cast<struct filter_data *>(data_); | ||
bool enable = calldata_bool(cd, "enabled"); | ||
if (enable) { | ||
obs_log(LOG_INFO, "enable_callback: enable"); | ||
gf_->isDisabled = false; | ||
} else { | ||
obs_log(LOG_INFO, "enable_callback: disable"); | ||
gf_->isDisabled = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#pragma once | ||
|
||
#include <callback/calldata.h> | ||
|
||
void enable_callback(void *data_, calldata_t *cd); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters