290 Commits

Author SHA1 Message Date
Warchamp7 c976dfc0a9 docs: Mark monitoring_type as deprecated 2026-08-24 14:55:40 -04:00
Richard Stanway 6d0083dd61 libobs, docs: Document intended use of obs_module_unload
obs_module_unload was never properly documented, so some plugins use it
to free resources, some use it to save data, etc. While libobs tries to
ensure all objects are shut down and destroyed before calling unload, if
another plugin is holding a strong reference, or if a reference leak has
occurred, libobs may need to call back into a plugin-provided object's
destroy function even after obs_module_unload has returned. If the
plugin has freed memory or other resources needed for the callback then
this likely results in a crash.

Going forward, we should document that obs_module_unload is now intended
only for saving data and releasing references, and that calling libobs
after it returns is not allowed. For cases where resource cleanup is
actually needed (for example, an external out of process helper needs to
be shut down or a release call to a hardware driver), a new
obs_module_destroy callback is intended to be added in a future version.
2026-08-22 16:03:18 -04:00
FiniteSingularity b790a32b2e libobs: Fix file filter for save file path widget 2026-08-20 17:55:08 -04:00
derrod 6d22a9a7f0 docs: Add deprecation notice for source hiding 2026-08-20 17:26:22 -04:00
Exeldro 854948b8df frontend: Add copy paste functions 2026-05-22 17:25:23 -04:00
Sebastian Beckmann 77fb5b4bc7 libobs: Disallow overwriting the crash handler
Setting a new crash handler overwrites the existing one. This is not
desirable.
2026-05-08 13:04:27 -04:00
cg2121 8163bbf5c8 frontend, libobs: Add ability to set custom source icons
This allows setting dark and light icons for a source.
2026-05-07 16:11:24 -04:00
Sebastian Beckmann dba426630a libobs: Deprecate v1 of obs_properties_add_button
With v1 of this function, it's unclear where exactly the data pointer
comes from or what it is. In fact, this is not determined by libobs, but
the consumer. libobs assumes that the caller of
obs_property_button_clicked passes an obs_context_data pointer, and then
passes the data pointer of that obs_context_data as the data pointer to
the callback.
In OBS Studio, this is always the private data of the associated object.
However, this assumes that there even is such an object (source/encoder/
etc), even though properties are meant to be free-standing. This is not
just philosophical, because with obs_get_source_properties you can
actually get an obs_properties_t that isn't associated with any specific
source, at which point you have no idea what the data pointer will be.

For this reason, obs_properties_add_button v1 needs to go.
obs_properties_add_button2 can be used as a drop-in replacement.
With v2, it's well-defined that the pointer you're passing as priv is
the pointer you get back in the callback as data. If you don't care
about it, simply pass NULL/nullptr.

Once v1 is removed in the future, obs_property_button_clicked should be
replaced with a variant that doesn't take a second argument, as that
argument will no longer be used anywhere.
2026-05-05 15:45:04 -04:00
psyirius 9185489586 docs: Fix typo in obs_enum_canvases description 2026-02-17 14:33:14 -05:00
Warchamp7 b8f0990d50 libobs: Add obs_transition_is_active 2026-01-16 15:57:36 -05:00
Anton Kesy 376c0eb0a5 docs: Fix typos 2026-01-14 13:47:30 -05:00
derrod cab3a45087 docs: Add audio encoder priming sample APIs 2026-01-14 10:48:04 -05:00
Warchamp7 bf0ec56df3 docs: Add API disclaimer to canvases 2025-12-12 16:03:04 -05:00
nixflorp 671fb57daf docs: Fix Rendering Graphics documentation 2025-09-22 15:30:08 -04:00
Sebastian Beckmann 35c02e7bc2 docs: Clarify some aspects of OBS_PROPERTY_BUTTON
The important point here is that "data" from the callback isn't defined
by libobs, but rather by the API consumer.
Additionally, it's not entirely clear from the documentation whether the
callback would still be called for button of type OBS_BUTTON_URL. There
should be no negatives to always calling it and the OBS Studio frontend
already behaves that way, so let's document that in libobs.
2025-09-12 16:41:48 -04:00
Sebastian Beckmann 5730f86050 frontend/api: Remove obs_frontend_add_dock
Deprecated since cde5545f8f (30.0).
2025-08-20 18:05:15 -04:00
Sebastian Beckmann b7c399f6d8 libobs: Remove v1 scene item transform API
Deprecated since 4b138f674f (30.1).
2025-08-20 18:05:15 -04:00
Sebastian Beckmann d283181c83 libobs: Remove obs_scene_sceneitem_from_source
Use obs_scene_enum_items to find sources instead.

Deprecated since 4dd3cf6758 (31.0).
2025-08-20 18:05:15 -04:00
Sebastian Beckmann 163493d1e1 libobs: Remove obs_view_get_video_info
Deprecated since fc891295b6 (30.1).
2025-08-20 18:05:15 -04:00
Sebastian Beckmann be66c8a701 libobs: Remove circlebuf
Deprecated since a4b8e1a6a9 (30.1).
2025-08-20 18:05:15 -04:00
ScoochAside ae29c4909f docs: Fix function name obs_set_video_sdr_white_level
Should be obs_set_video_levels
2025-05-12 15:52:27 -04:00
Lain 775ac56bc8 libobs/graphics: Add gs_draw_quadf()
Adds a function to draw a sprite or quad using floating point sizes
rather than integer sizes. Also named it more appropriately.
2025-04-23 15:23:29 -04:00
Dennis Sädtler 3fc119190e docs: Add canvases documentation 2025-04-02 12:39:46 -04:00
gxalpha 62ef7e0fee libobs: Deprecate obs_get_transition_by_[name|uuid]
obs_get_transition_by_name is very problematic because transitions are
always private and their names aren't unique. This means that the method
iterates over all private sources and then takes the first that both is
a transition and matches the name we're looking for. However, this could
be from anywhere - it could be a frontend transition, but also a source
transition, quick transition, or even one from third-party plugins. This
is always never what is intended.

As such, this method (which should never have been added in the first
place) needs to go. In its place, obs_frontend_get_transitions returns a
list of all frontend transitions (which is usually what people are
looking for), and alternatively obs_get_source_by_uuid also provides
access to private sources.

While we're at it, obs_get_transition_by_uuid is basically a wrapper for
obs_get_source_by_uuid and not really necessary. UUID's are unique and
a source doesn't suddenly change its type, so if you have a transition's
UUID you can be pretty sure that when you do obs_get_source_by_uuid, it
will still be a transition.
2025-04-01 17:07:24 -04:00
Dennis Sädtler 187eef7b38 libobs: Add optional reconnect callback to outputs 2025-03-17 13:30:58 -04:00
Doğukan Korkmaztürk 68ca91b21d libobs,libobs-opengl: Add gs_sync_t
This change adds a new type named gs_sync_t and related functions to X11
and Wayland EGL backends to abstract DRM syncobjs and their various
uses.

Signed-off-by: Doğukan Korkmaztürk <dkorkmazturk@nvidia.com>
2025-02-05 16:20:15 -05:00
derrod eda882dd0a libobs: Add video_output_disconnect2() 2025-01-28 17:36:51 -05:00
derrod 10dc43b3cd libobs: Remove relative positioning functions
Revert "docs: Add new relative positioning scene functions"

This partially reverts commit 366cfdb963.

The addition of obs_sceneitem_(get/set)_info2 was not removed as that is
still valid.
2024-12-04 14:41:03 -05:00
gxalpha 4dd3cf6758 libobs: Deprecate obs_scene_sceneitem_from_source
obs_scene_sceneitem_from_source is problematic because there can be
multiple items of the same source in a scene, which the function doesn't
account for. In such a case, it would return the first item it finds,
which often might not be what a developer expects.

It was originally added for the undo/redo-operation of "Add New Source"
where the UI guarantees that the item is unique, but for a general case
it's not suitable.
2024-09-27 17:22:44 -04:00
Exeldro a289581579 docs: Add obs_frontend_get_user_config 2024-09-17 12:10:22 -04:00
Exeldro 5b79b4b74d libobs: Add obs_encoder_get_mixer_index 2024-09-12 18:07:19 -04:00
Alex Luccisano 0a36ed1164 libobs: Add a packet callback mechanism
Packet callbacks are invoked in `send_interleaved()` and
are useful for any plugin to extend functionality at the
packet processing level without needing to modify code in
libobs. Closed caption support is one candidate that is
suitable for migration to a packet callback.

The packet callback also supports the new encoder packet
timing feature. This means a registered callback will have
access to both the compressed encoder packet and the associated
encoder packet timing information.
2024-09-05 16:38:58 -04:00
derrod 22fc29c5b4 docs,libobs: Remove deprecated service APIs
Deprecated in 29.1
2024-08-28 19:10:27 -04:00
derrod b7553b5883 docs,libobs: Remove master volume functions
Never implemented, deprecated in 29.0.
2024-08-28 19:10:27 -04:00
derrod 8729cebce7 docs,libobs: Remove deprecated scene item transition functions
Deprecated in 28.0, documentation erroneously states 27.2.

The following functions were erroneously not marked as deprecated in
the header:
- obs_sceneitem_set_show_transition()
- obs_sceneitem_set_show_transition_duration()
2024-08-28 19:10:27 -04:00
derrod 71d49b0ef2 docs,libobs: Remove/internalize deprecated addref functions
These have been deprecated for external users since 27.2 (early 2022)
and only two are still in use internally.
2024-08-28 19:10:27 -04:00
derrod bda463932e docs,libobs: Remove obs_render_main_view()
Deprecated since 21.0
2024-08-28 19:10:27 -04:00
derrod f61d0bb3c2 docs: Add new relative positioning scene functions 2024-08-27 23:58:51 +02:00
tt2468 16f0bb68ae libobs: Add OBS_ENCODER_CAP_SCALING
Adds a new encoder cap which tells libobs that rather than scaling
video frames in software, the encoder is capable of scaling them via
its own (presumably more efficient) means.

An encoder may implement this cap by comparing the VOI of its assigned
`video_t` and the results of `obs_encoder_get_width/height()`. If the
width/height values differ, then the encoder is being asked by libobs
to self-scale, and the resolution in VOI will be the raw frame size,
with the `...get_width/height()` being the intended output resolution
of the encoder.

It is important to note that GPU rescaling mode will take priority
over self-scaling. If GPU rescaling is enabled, the encoder will never
be asked to self-scale.

This is useful for discrete hardware encoders, where they might have
fixed-function video scaling logic that is highly efficient and fast.
Additionally, this feature allows a hardware device which is encoding
a full ABR ladder of tracks to be smart and only copy a video frame
from GPU -> Host -> Device once for the entire ladder, rather than
once for every track.
2024-08-23 14:20:53 -04:00
derrod 8adc76f87f docs: Add source profiler functions 2024-08-10 23:51:39 -07:00
tytan652 3b266fec22 UI,docs: Send a custom event to the dock widget when closing 2024-08-04 10:18:59 +10:00
CodeYan01 9c427c5f93 docs: Add versionadded for 30.x functions 2024-06-03 13:52:34 -04:00
CodeYan01 64f6c30cb1 docs: Add return type of obs_source_audio_active 2024-06-01 20:00:37 -04:00
derrod cf4681a9c3 docs: Document obs_frontend_recording_add_chapter() 2024-05-29 12:29:45 -04:00
derrod e54af0d559 docs: Document newer JSON serialization functions 2024-05-25 17:29:28 -07:00
gxalpha a1e0626c14 libobs: Add global source filter add/remove signals
Adds global signals for when a filter is added to or removed from a
source. These will be helpful for listening for changes to a sources
filters without having to attach and detach a signal handler, which
would be annoying in the context of for example context menus which
change sources rapidly.
2024-05-25 17:08:42 -07:00
derrod 89c7a9608b libobs/util: Add buffered file serializer
Adapted from 898256d416

Co-authored-by: Richard Stanway <r1ch@r1ch.net>
2024-05-18 16:15:41 -07:00
derrod dc4cba7427 libobs/util: Add seeking support to array serializer 2024-05-18 16:10:42 -07:00
tt2468 d584aed501 libobs: Add obs_encoder_parent_video() method
Allows parent video object of an encoder with an FPS divisor to be
fetched.
2024-05-03 10:33:46 -07:00
Penwywern c4ef7c3241 docs: Document the audio_active functions and signals 2024-03-27 16:29:20 -04:00