Commit Graph

8 Commits (04d1f04bd3bea27f3e60f5ce8a4cb9af394d9a90)

Author SHA1 Message Date
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
Zachary Lund 698e6418ba obs-filters: Use double-precision where viable
We're expecting a variable with double precision. Since we don't read
the value of these doubles with a particular precision, it can often
lead to unpredictable results where the value set isn't the one
intended due to the loss of precision from float->double conversion.
2018-05-30 14:52:39 -07:00
jp9000 6ac832fbb2 obs-filters: Fix scroll filter sampler state
When the crop filter was changed to a crop/pad filter, the sampler state
was changed to use a transparent border for the U/V addressing mode.
However, what was not realized at the time was that the scroll filter
also shared the crop effect file, and the scroll filter depended on the
old sampler state (wrap u/v).

This fixes the issue by simply setting a u/v wrap sampler state in the
scroll filter.
2016-07-08 03:03:23 -07:00
jp9000 5349bbf633 obs-filters: Skip scroll filter if parent has no cx/cy
There's no point in the filter continuing its processing if there's
nothing to draw.
2016-04-23 14:39:38 -07:00
jp9000 a23d8e3f2c obs-filters: Fix scroll filter offsets becoming non-finite
If the parent source of a scroll filter has a 0 width or 0 height, the
scroll filter would do a division by zero on the size_i variable, which
would then cause the offset variable to perpetually have a non-finite
value, thus preventing the scroll filter from rendering properly after
that due to the non-finite offset value being uploaded to the shader.
2016-04-23 14:39:37 -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 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 ecabe35f36 obs-filters: Add scroll filter 2015-06-21 01:21:22 -07:00