Commit Graph

9 Commits (8e7481fb7564a7c0918c84c292be85a3e490083f)

Author SHA1 Message Date
Olle Kelderman 5534c46920 obs-filters: Reload the mask image when file change is detected 2019-11-07 11:34:10 -08:00
jp9000 f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
jp9000 0800c8cbd1 obs-filters: Use int sliders for opacity
This changes all opacity scrollers for filters to sliders + scrollers.

Reference: obsproject/obs-studio#1827
2019-04-26 06:33:41 -07:00
jp9000 71f9900e74 obs-filters: Fix opacity on image mask/blend filter
The alpha value from the opacity slider was being overwritten.

Closes obsproject/obs-studio#1827
2019-04-26 05:22:44 -07:00
jp9000 ff99ba7818 libobs: Allow filter processing function to return false
(Note: this commit also modifies the obs-filters and test-input modules)

Changes the obs_source_process_filter_begin return type so that it
returns true/false to indicate that filter processing should or should
not continue (for example if the filter is bypassed or if there's some
other sort of issue that causes the filtering to fail)
2016-04-22 10:18:12 -07:00
jp9000 bd6ffd76d0 obs-filters: Make mask filter use gs_image_t helper
Prevents it from loading the entire image in the graphics thread, and
allows for animated gifs in the filter (not that anyone would ever do
that.  ..right?)
2016-01-26 11:49:24 -08:00
jp9000 4f782f2415 obs-filters: Make mask/blend image center w/aspect by default
Fixes what is arguably the most annoying feature of the mask/blend
filter, the fact that the image always stretches to the entire source.
It now centers and preserves aspect ratio by default, with an option to
make it stretch and discard aspect ratio to make it operate as it did
before.
2016-01-26 11:49:23 -08:00
jp9000 6285a47726 (API Change) libobs: Pass type data to get_name callbacks
API changed from:
obs_source_info::get_name(void)
obs_output_info::get_name(void)
obs_encoder_info::get_name(void)
obs_service_info::get_name(void)

API changed to:
obs_source_info::get_name(void *type_data)
obs_output_info::get_name(void *type_data)
obs_encoder_info::get_name(void *type_data)
obs_service_info::get_name(void *type_data)

This allows the type data to be used when getting the name of the
object (useful for plugin wrappers primarily).

NOTE: Though a parameter was added, this is backward-compatible with
older plugins due to calling convention.  The new parameter will simply
be ignored by older plugins, and the stack (if used) will be cleaned up
by the caller.
2015-09-16 09:21:12 -07:00
jp9000 9138766620 obs-filters: Add mask/blend filter
This filter allows the ability to use a texture to modify the video
output of a source, the ability to:
- apply a color-based mask (dark = transparent, light = opaque)
- apply a mask based upon the alpha of an image
- blend an image via subtraction, addition, or multiplication
2015-03-25 14:12:04 -07:00