The proposed way to handle plugin distribution
through Flatpak depends on these directories to
be read. It goes as follows:
1. Flatpak's extension point merges the 'lib'
and 'share' directories at /app/plugin
2. Plugins prefix their install paths in the
Flatpak manifest to /app/plugins/<plugin name>
3. OBS Studio lists /app/plugin as one of the
search paths in OBS Studio code
This commit implements the third step of this
process, which is the only one that actually
involves OBS Studio itself.
With that, it is possible to distribute plugins
as Flatpak extensions, which in turn allows them
to be listed at app stores such as GNOME Software,
elementary's app store, and KDE's Discover.
Related: https://github.com/flathub/com.obsproject.Studio/issues/135
When size of source_info_t is larger then current structure, memcpy
overruns. Size check is moved before the memcpy.
HANDLE_ERROR macro copies info to data but data is not used. When
calling free_type_data and type_data, the member of data should be used
to ensure the free_type_data is not out of bounds.
Add gs_image_alpha_mode enum for requested alpha handling: straight,
premultiplied with SRGB conversion, and just premultiplied. Both
premultiplied settings behave the same if the image is not SRGB, linear
is assumed.
Add gs_image_file3_t to store the alpha mode.
Add srgb.h file with helper functions.
Clean up vec4.h to use helpers, and remove unused functionality.
Update FFmpeg image loader to perform premultiplication on load.
Add OBS_SOURCE_SRGB to indicate sources that support SRGB rendering. We
can use this flag to know which sources do not know how to handle SRGB,
and disable accordingly inside obs_source_main_render().
We can also use this flag to clean up the filter interface and remove
the SRGB-specific functions. We also need to disable direct rendering if
the filter source wants to render SRGB, but the parent source does not
support it.
Scenes and groups are marked as having SRGB support, and those are
internal sources that we control.
Allows the ability to reset (erase) a source's existing settings and
replace them with new settings. This is useful for things such as
reverting to older settings.
Convert incoming straight alpha color to premultiplied at filter begin,
and process premultiplied value at filter end.
If direct rendering is allowed, we assume the input source outputs
premultiiplied alpha. If not, that source will need to be updated.