Commit graph

261 commits

Author SHA1 Message Date
Exeldro 82864559f2 libobs: Fix errors for gs_effect_create 2023-10-06 10:51:15 -06:00
Neal Gompa 491d7c0e98 libobs: Add license declaration files 2023-09-19 13:35:49 -04:00
Ryan Foster e5d5df879c libobs: Add function to check fast clear capability 2023-07-29 16:34:47 -07:00
derrod c939525f77 libobs: Remove legacy FFmpeg compatibility 2023-07-12 15:57:43 -04:00
Norihiro Kamae c8e3794a35 libobs/graphics: Remove undefined function declarations
These functions were declared but never defined. Let's just remove them.
- effect_upload_shader_params
- ep_param_writevar
- effect_upload_params
2023-07-01 00:39:13 -07:00
Norihiro Kamae fa02582db6 libobs/graphics: Define DARRAY macro types used in effect 2023-07-01 00:39:13 -07:00
Lain 106c7aa61f Update copyrights/names 2023-05-20 01:31:18 -07:00
Jim e9ef38e3d3
Merge pull request #7978 from jpark37/dxgi-display-sdr-on-hdr
libobs-d3d11,win-capture: Add Force SDR for DXGI duplicator
2023-03-20 01:43:14 -07:00
PatTheMav e23455dc74 libobs: Fix device functions not marked as EXPORT
As clang and gcc use "default" visibility (as in "not hidden") when
no visibility is specified, all functions are implicitly exported.

When changing default visibility to "hidden", the corresponding symbols
are not exposed anymore and linking fails. This PR updates all
functions signatures that were added in recent commits but not set to
be EXPORTed.

Also makes required OpenGL imports for texture sharing on macOS
mandatory.
2023-03-01 12:02:33 -05:00
jpark37 7bfde66578 libobs-d3d11: Support color spaces for duplicator
Need this plumbing to make decisions about duplicator colors.
2023-02-19 11:40:32 -08:00
PatTheMav fb7a9edadc libobs: Fix non-exhaustive switch statements 2023-02-18 15:22:33 -08:00
Norihiro Kamae 2b4bc03b4c libobs/graphics: Remove unused macros for inputs 2023-01-28 19:03:55 -08:00
Norihiro Kamae d18a6f1039 libobs/graphics: Remove unused macros
The macros BOUNDS_MAX_X, BOUNDS_MAX_Y, and BOUNDS_MAX_Z are never used
and they are never defined how to use.
2023-01-28 19:03:55 -08:00
Jan Beich c082c4a74d libobs/graphics: Enable DMABUF on FreeBSD and DragonFly
Required under Wayland (wlrobs) on FreeBSD and DragonFly. DMABUF was
already partially exposed after c50c625555.
2023-01-24 11:50:13 -05:00
tytan652 cf5c68b773 UI,libobs,libobs-opengl,obs-ffmpeg: Remove unneeded cast in switches
Those casts were usually used to workaround switch warnings.

Also adds default to OBS frontend event switches that had this
workaround.
2023-01-16 11:52:26 +01:00
jpark37 2a76ffaf02 libobs/graphics: Precompute more accurate matrix
This is generated with .NET BigInteger fractions, and late divide.
2022-10-05 08:36:29 -07:00
Norihiro Kamae 33e6ad3cc9 libobs: Remove unnecessary UTF characters 2022-08-13 00:49:17 -07:00
jpark37 4fe6803fe4 libobs: Prevent D3D11 projectors from tearing
Some users stream projectors, so don't let them tear. Use the waitable
object to check the flip queue, and only flip if there's space.

Metal and Vulkan can probably perform similar flip throttling once OBS
starts using them.
2022-08-06 16:16:20 -07:00
tytan652 17ba8359e4 deps,libobs,plugins: Fix discarded-qualifiers warnings with FFmpeg 5 2022-07-22 08:50:36 -04:00
tytan652 348cf1b872 libobs: Remove unused parameters 2022-07-20 08:21:20 +02:00
PatTheMav ff7f756886 libobs: Explicitly mark variables as unused 2022-07-10 09:59:55 +10:00
Kurt Kartaltepe d78b27961c libobs-opengl: Add create_texture_from_pixmap for EGL
create_texture_from_pixmap is only implemented for X11/EGL where it will
bind the provided X11 pixmap to a texture with glEGLImageTargetTexture2DOES
2022-05-15 09:08:53 -03:00
jpark37 4af20cf080 libobs/graphics: Add color space and WIC support
Only add support for PQ and CCCS JXR images, e.g. Xbox Series X, and
Xbox Game Bar screenshots on Windows.
2022-05-08 15:25:01 -07:00
PatTheMav d0d0fe00d8 libobs: Fix compiler warnings 2022-05-04 12:09:04 -04:00
VodBox 6d0e61d40a libobs: Orient images based on EXIF metadata 2022-05-04 01:58:40 -07:00
jpark37 06111d5b10 libobs: Add high-precision sRGB support 2022-04-08 17:19:23 -07:00
wangshaohui db8145e8a2 obs-ffmpeg, win-dshow, deps/media-playback: Use recommended API for AVCodecContext 2022-04-07 01:59:30 -07:00
wangshaohui 1ec70ddf2b libobs: Fix image source not loading upper case file extensions 2022-04-07 01:58:13 -07:00
jpark37 eccde48926 libobs/graphics: Add gs_is_monitor_hdr
Only Windows is implemented for now. Mac/Linux return false for now.
2022-03-23 22:35:26 -07:00
jpark37 abddfead2f libobs/graphics: Add color space support 2022-03-23 22:35:26 -07:00
jpark37 fee3703f40 libobs/graphics, libobs-d3d11: Add P010 support 2022-03-20 17:22:13 -07:00
jpark37 16637baf88 libobs/graphics: Add gs_texrender_get_format 2022-03-08 12:56:35 -08:00
obiwac c50c625555 libobs/graphics: gs_query_dmabuf_* on FreeBSD too 2022-02-26 15:36:08 -08:00
jpark37 59ab9c98fb libobs/graphics: Fix gs_get_format_bpp
Was missing case for GS_RGBA16F.
2022-01-29 18:51:34 -05:00
jpark37 63db2265dc libobs, libobs-d3d11, libobs-opengl: Add GS_RG16
This format will be useful for P010 chroma in the future.
2022-01-29 15:12:00 -08:00
columbarius 4cda05f270 libobs/graphics: Add Linux-only gs_query_dmabuf_* functions
When sharing DMA-BUFs it is required the announce the underlying
hardware capabilities via supported modifiers.

Add new device_query_dmabuf_capabilities vfunc to gs_exports and connect it
to the egl implementation stubs in the supported render platforms. Add a new
public method gs_query_dmabuf_capabilities() that calls the vfunc above.

Add new device_query_dmabuf_modifiers vfunc to gs_exports and connect it
to the egl implementation in the supported render platforms. Add a new
public method gs_query_dmabuf_modifiers() that calls the vfunc above.
2021-12-22 14:27:53 -03:00
jw0z96 33a6d2a5fd libobs: Expose blending operation types 2021-12-20 09:06:38 -08:00
VodBox c8e417057a libobs, libobs-d3d11: Add support for NT Handle shared textures
Adds support for using shared textures that were made with the
D3D11_RESOURCE_MISC_SHARED_NTHANDLE flag.

This increases the minimum required Windows version to Windows 8 or the
Platform Update for Windows 7. As official support is only for Win 8+
this does not change official support.
2021-11-20 16:34:28 +13:00
jpark37 02d98b26a0 libobs/graphics: Fix vec2 min/max functions 2021-10-10 19:12:45 -07:00
jpark37 3c45ae2e9d libobs, libobs-opengl: Consistent near/far undef 2021-10-10 19:12:45 -07:00
Norihiro Kamae 5e75efd14c libobs: Fix const qualifier mismatch on DARRAY 2021-10-01 12:59:27 +09:00
Norihiro Kamae d65ca911dd libobs: Add casts to da_push_back_array arguments 2021-10-01 12:58:14 +09:00
Tommy Vercetti e1cf7c0e4b libobs: Fix near and far redefinition on MSVC 2021-09-11 15:50:06 -07:00
jpark37 f5b65ec5d3 libobs/graphics: Fix gs_generalize_format warning
warning C26819: Unannotated fallthrough between switch labels (es.78).
2021-09-05 20:35:46 -07:00
jpark37 e6ab8106aa libobs/graphics: Avoid darray recycle
Reset size instead of capacity.
2021-08-15 00:12:14 -07:00
jpark37 da3375d5a4 libobs: Add gs_generalize_format helper 2021-07-11 08:26:29 -07:00
jpark37 c6937eb559 libobs: Assume sRGB instead of linear for 64 bpp
Should fix regression for 16-bit PNGs.
2021-06-01 19:08:07 -07:00
jpark37 abe1cb1425 libobs: Support premultiplying images on load
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.
2021-05-11 03:44:02 -07:00
jpark37 5a8842d9f0 libobs: Support 64 bpp images
Useful for loading high-precision alpha channels.
2021-05-05 09:43:34 -07:00
tt2468 7b2b723270 libobs: Return target vec not current when within EPSILON
If current vector is within EPSILON, it would return the current,
when logically the target should be returned instead.
2021-04-13 05:31:00 -07:00