Commit Graph

111 Commits (abddfead2f08ae36a29cb1ae2d0314051817773f)

Author SHA1 Message Date
jpark37 abddfead2f libobs/graphics: Add color space support 2022-03-23 22:35:26 -07:00
cg2121 65a360fa41 obs-frontend-api: Add function to get frontend translated string
Developers now can easily get a translated string from the frontend
instead of using their own translations.
2022-03-10 06:27:18 -08:00
cg2121 748cf32a43 UI: Add events for renaming profiles/collections
The events make it more clear when profiles or scene
collections are renamed.
2022-03-08 11:17:59 -08:00
jpark37 07042efdf3 docs/sphinx: Add GS_RG16 2022-01-29 15:12:00 -08:00
jp9000 c1905f4e53 docs/sphinx: Fix documentation for addref/release functions
Incorrectly implied that both addref and release calls were deprecated;
only addref calls are deprecated.
2022-01-25 06:22:13 -08:00
Jim 03d9bda387 libobs: Deprecate obs object addref functions
Deprecates:
obs_source_addref()
obs_output_addref()
obs_encoder_addref()
obs_service_addref()
obs_scene_addref()

These functions should be considered unsafe and not used. Instead, use:
obs_source_get_ref()
obs_output_get_ref()
obs_encoder_get_ref()
obs_service_get_ref()
obs_scene_get_ref()

These functions return a pointer to the incremented object only if the
object is still valid, otherwise they will return null, indicating that
the object is no longer valid or is unsafe to use.

The reason why this is being done is because certain third party plugins
seem to be using addref, and are somehow managing to call addref on
sources that have already been fully released. For the sake of safety,
almost all usage of these functions within OBS have also been replaced
as well.
2022-01-25 05:20:03 -08:00
gxalpha 3fb2e27825 docs: Fix frontend API docs for preview_scene functions 2022-01-04 01:53:42 -08:00
tt2468 47397ce527 UI: Add `obs_frontend_open_source_interaction()`
Adds a frontend api call to open the interact dialog of a source,
just like the `_properties` and `_filters` functions.
2021-12-28 21:44:35 -08:00
tt2468 466ba5ae29 docs: Fix names of filter/properties functions 2021-12-28 16:49:00 -08:00
Richard Stanway 7d64e9d598 libobs: Use size_t for obs_encoder_get_frame_size 2021-12-26 17:32:00 +01:00
jp9000 8212cedf03 Revert "libobs, docs: Add function to get source version"
This reverts commit 1a7a10048c1a22ea969545e385a456b240baad5e.
2021-12-25 17:10:45 -08:00
Norihiro Kamae d1b87e1642 libobs: Add API to get encoder frame size
When muxing to some format, duration of the packet is used. We need an
API for encoder to return the frame size.
2021-12-23 10:48:37 -08:00
gxalpha 343ffc98ed docs: Document obs_get_scene_by_name 2021-12-23 06:31:45 -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
tt2468 167f539416 libobs: Rename obs_audio_monitoring_supported to _available
With the reasonable possibility of monitoring support becoming a
runtime check, the phrase `available` is more fitting.
2021-12-22 02:43:14 -08:00
jw0z96 447b17e75e libobs: Implement additional source blending modes 2021-12-20 09:06:38 -08:00
jw0z96 33a6d2a5fd libobs: Expose blending operation types 2021-12-20 09:06:38 -08:00
Exeldro 5df4ffa881 docs: add missing source output flags 2021-12-10 01:10:59 -08:00
Clayton Groeneveld d45e92c10c libobs: Add raw audio callback function
This complements the already existing raw video callback function.
2021-11-24 01:32:31 -08:00
Kasin Sparks 67d2b50a91 UI: Fix bug with audio balance slider not updating
Fixes #4763.
2021-11-23 22:06:25 -08:00
gxalpha c104e59bd4 libobs: Add obs_scene_prune_sources
Adds a function that goes through the scene and releases all sources
that have been removed.
2021-11-23 22:00:47 -08:00
tt2468 9147ce3287 docs: Add missing frontend-api calls + organize
Add all missing obs_frontend_*() functions, plus organize the
`obs_frontend_event` enum. It wasn't ordered the same as the header
file, so we might as well take the opportunity to make it clearer.
2021-11-23 21:52:30 -08:00
tt2468 b79ff4cb13 docs: Add missing config_t get/set functions 2021-11-23 21:52:30 -08:00
tt2468 0038b50776 docs: Add missing obs_source_t functions + organize
Adds some notable obs_source_t functions which are missing from the
current docs. Moves some of the audio-related functions together.
2021-11-23 21:52:30 -08:00
tt2468 74a1aeb593 docs: Minor function description tweaks (reference-scenes)
- Changes the note under obs_sceneitem_get_id(). Getting the id of a
sceneitem is not dangerous and does not cause errors. Only
obs_sceneitem_set_id() can cause errors.
- Changes wording on `obs_group_or_scene_from_source()`
2021-11-23 21:52:30 -08:00
tt2468 6e9644ec15 libobs: Add obs_audio_monitoring_supported()
Currently, ifdefs are used to determine if monitoring is supported.
This is difficult to maintain and restricts plugins from knowing if
monitoring is supported by OBS. This adds a runtime function to fix
that issue.
2021-11-20 20:00:59 -08:00
gxalpha e922a5586f docs: Document obs_group_or_scene_from_source 2021-11-19 02:30:44 -05:00
tt2468 155b91a94e docs: Fix outdated speaker_layout enum
Commit 67e48ecc2c changed this enum from
`SPEAKERS_QUAD` to `SPEAKERS_4POINT0` but did not update the docs.
2021-11-19 00:16:23 -05:00
Clayton Groeneveld 8d349ea4aa obs-frontend-api: Add scripting shutdown event
This event is for when scripts need to know when OBS is exiting.
Currently scripts are destroyed before the current exit event.
2021-11-15 10:20:55 -08:00
tt2468 a65287d615 docs: Add obs_frontend_get_current_record_output_path() 2021-11-13 16:05:52 -08:00
tt2468 10b3a9a84a docs: Add `_CHANGING` frontend events
Also improves a few related event descriptions.
2021-11-10 06:36:23 -08:00
gxalpha c36a5ae92b libobs: Add obs_get_transition_by_name 2021-11-07 07:40:03 -08:00
Clayton Groeneveld 4b00c8566f libobs, docs: Add function to get source version 2021-10-28 09:14:23 -07:00
Ben Alman f48259f2b3 docs: Add transition duration changed event 2021-09-20 18:54:11 -07:00
columbarius f50c178951 docs: Clarify only DMA-BUFs with a single modifier are supported
The gs_texture_create_from_dmabuf function is a wrapper for
eglCreateImageKHR, which can set a different modifier for each plane.
The documentation should advice against that, since this should be
rejected by the driver.

While DMA-BUFs started to have one modifier per plane, this decision was
rolled back to having one modifier for the whole buffer / all planes.
While some apis like EGL were designed with a modifier per plane,
drivers are expected to reject any request using different modifiers per
plane.
2021-08-25 19:48:22 -07:00
Exeldro 5b18faeb49 UI: Add functions to open properties and filters 2021-08-12 04:31:40 -07:00
jpark37 7c72fd1d4c libobs: Plumb texcoord hint to reduce GPU cost
In order to do linear-correct filtering cheaply when scale filtering is
disabled, we need to know whether or not texture coordinates will always
sample from texel centers. This can be computed at the scene item level
relatively easily, and passed along to sources when rendering. Scene
items will use obs_source_set_texcoords_centered to set hint status, and
sources will use obs_source_get_texcoords_centered to retrieve it.
2021-07-11 08:26:29 -07:00
SCG82 88cc691afa UI: Add obs-frontend-api functions to create/delete profiles 2021-07-09 19:32:18 +12:00
tt2468 9ca70f4470 UI: Add obs_frontend_get_current_profile_path()
Returns the path of the current profile's location on the filesystem.
2021-07-09 17:39:40 +12:00
Matt Gajownik 74c3781554 libobs, UI: Add support for button properties as links
This adds support for a button property that opens a URL, after showing
a confirmation dialog to the user. Both the Type and URL must be set.
2021-07-09 17:32:09 +12:00
jpark37 ae7718a765 libobs, obs-filters: SRGB backwards compatibility
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.
2021-05-03 01:19:56 -07:00
jp9000 60447872c0 libobs: Add obs_source_reset_settings()
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.
2021-04-30 18:37:38 -07:00
jp9000 0fd1238d45 libobs: Add functions to backup/restore filters
Adds functions to backup and restore filters (along with their order) on
a specified source. Useful for undo/redo operations.
2021-04-30 00:11:52 -07:00
jp9000 2a63d60d23 docs: Fix erroneous code example 2021-04-24 23:17:58 -07:00
jp9000 74c2379eba libobs: Add obs_data_get_last_json()
Helper function to return the last generated json string for this
object.
2021-04-23 12:38:50 -07:00
jpark37 9220316700 libobs: Add filter functions for SRGB support
This way, legacy filters can use the original functions without
triggering SRGB support.
2021-04-04 00:58:38 -07:00
Georges Basile Stavracas Neto 11e5e6b633 docs: Document gs_texture_create_from_dmabuf
Add some documentation about this new Linux-only function, and its
characteristics.
2021-03-30 22:29:00 -07:00
Jim 5d87f3c00b
Merge pull request #3426 from Programatic/undo_redo
UI: Implement Undo/Redo System
2021-03-30 03:16:24 -07:00
Ford Smith d0dfae6a3c docs: Update documentation about utility functions for undo/redo 2021-03-29 03:06:26 -04:00
Ford Smith 31e5d2e5e3 libobs: Implement obs_data_get_defaults
Implements obs_data_get_defaults and updates the documentation. This is
supposed to allow someone to access all the defaults of an object.
Should help in cases where the full data is needed, and not just the
currently set.
2021-03-22 15:44:56 -04:00