Commit graph

249 commits

Author SHA1 Message Date
tt2468 d314d4725d libobs, plugins: Deprecate obs_output_t functions with flag parameters
This deprecates the following functions, replacing them with new
versions:
- `obs_output_can_begin_data_capture()` - now `*capture2()`
- `obs_output_initialize_encoders()` - now `*encoders2()`
- `obs_output_begin_data_capture()` - now `*capture2()`

The flags parameter was initially designed to support audio-only or
video-only operation of an output which had the `OBS_OUTPUT_AV` flag,
however, full support for that was never implemented, and there are
likely fundamental issues with an implementation, mainly that most
outputs are programmed assuming that there will always be at least one
audio and one video track. This requires new flags specifying support
for optional audio/video, among other things.

An implementation to allow audio/video to be optional is best done
using the flag technique above, with audio/video enablement specified
by whether media (raw, `video_t/audio_t`) or encoder (`obs_encoder_t`)
objects are specified.

Since every implementation I could find always specifies `flags` as 0,
I was able to safely conclude that immediately removing the parameter's
functionality is safe to do.
2023-05-20 16:41:55 -07:00
Lain 106c7aa61f Update copyrights/names 2023-05-20 01:31:18 -07:00
tytan652 3a16a6c836 docs: Add missing elements in Services API 2023-05-06 16:24:52 -07:00
gxalpha 9da4a37cbc docs: Remove obs_sceneitem_group_from_scene/source
These function were removed in 35704c4 (and never got into a release).
2023-04-22 16:44:28 -07:00
WarmUpTill 0d6588fa8c docs: Fix obs_frontend_get_scene_collections() description 2023-04-22 16:43:07 -07:00
gxalpha f05b719950 docs: Clarify that data for source/encoder properties can be null 2023-04-22 16:34:56 -07:00
gxalpha 4d2f7ef009 docs: Add note about instance methods as callbacks in scripting 2023-04-15 16:36:32 -07:00
jpark37 97843dd7d7 libobs: Add VIDEO_FORMAT_V210
Support 10-bit packed format that DeckLink uses.
2023-03-26 01:52:44 -07:00
jpark37 e32c2c1427 libobs: Add callback for main texture rendered
Useful for redirecting main texture to DeckLink output for example.
2023-03-24 15:18:45 -07:00
Jim 0a9ed4569b
Merge pull request #7814 from jpark37/decklink-preview-rescale
decklink: Move preview output rescaling to GPU
2023-03-20 01:42:36 -07:00
tytan652 22ebed8d02 libobs,docs: Add connect infos check to the Services API
This new function allows to know if the service has all the info needed
to try to connect.
2023-03-19 17:38:02 +01:00
tytan652 ea4ac2d08d libobs,docs: Add connect infos to the Services API
This replace and deprecate url, key, username and password functions.
2023-03-19 17:38:02 +01:00
tytan652 aeab6b8fc4 libobs,docs,rtmps-services: Add supported audio codecs
Also remove Opus-only "supported audio codecs" in the services JSON.
2023-03-19 17:27:42 +01:00
tytan652 1e0f4a6ebf libobs,docs: Add preferred output type to Service API 2023-03-19 17:16:13 +01:00
tytan652 48dc6dde68 libobs,docs: Add supported codecs functions with output id 2023-03-19 16:49:56 +01:00
tytan652 56411eda8e libobs,docs: Add protocol enumeration functions 2023-03-19 16:31:05 +01:00
tytan652 813b3b2763 libobs,docs: Add protocol to Services API 2023-03-19 15:29:44 +01:00
tytan652 201bcda051 libobs,docs: Add protocol in Outputs API 2023-03-19 15:29:03 +01:00
Jim 6eace37e06
Merge pull request #8229 from derrod/hashed-tables
Hashtable Adventures
2023-03-19 00:34:44 -07:00
Exeldro b9885f05db docs: Add view functions 2023-03-18 15:54:38 -07:00
Norihiro Kamae e4496c7afa docs: Clarify a dot is included in the extension 2023-03-18 15:36:41 -07:00
derrod c68eeaef1d libobs: Use uthash for source objects
All sources are part of a hash table that allows a lookup by UUID.
Public sources additionally are in a hash table allowing lookup by name.
2023-03-18 10:47:49 +01:00
derrod 30519768ad libobs: Add UUIDs to obs_source objects 2023-03-12 01:11:38 +01:00
derrod f72cc4498f libobs: Add os_generate_uuid() to platform utils 2023-03-12 01:11:38 +01:00
CodeYan01 b4fdf2a329 docs: Clarify enum_scenes order 2023-03-01 09:44:35 -05:00
CodeYan01 8ac894a62b docs: Link to obs_scene_from_source in enum_scenes
Enumerating scenes but receiving an obs_source_t is confusing.
2023-03-01 09:44:35 -05:00
CodeYan01 7605883303 docs: Clarify weak source releasing 2023-03-01 09:44:35 -05:00
CodeYan01 d2dd917721 docs: Fix layout and typos 2023-02-26 10:31:02 +11:00
jpark37 463bf0dff5 libobs,UI: Add P216/P416 pixel formats
Will be useful for ProRes.
2023-02-21 18:48:44 +01:00
jpark37 9ee97bba1a libobs: Add obs_output_get_video_conversion
Need post-convert size to avoid CPU rescale.
2023-02-19 11:46:20 -08:00
derrod 970585d073 CI,docs: Create separate CF pages artifact
The CF pages artifact has no extensions in generated links to avoid the
automatic redirects CF does.
2023-02-15 10:55:53 -05:00
Exeldro 2d3013ccdc UI: Add obs_frontend_add_undo_redo_action 2023-02-04 15:30:07 -08:00
Exeldro 46da073aa5 UI: Add obs_frontend_open_sceneitem_edit_transform() 2023-02-04 15:23:26 -08:00
Norihiro Kamae 27c7dc9155 docs/sphinx: Add undocumented macros for darray 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
tt2468 24e9f82f87 docs: Document a few missing obs_output_t function calls
- `obs_weak_output_references_output`
- `obs_output_get_id`
- `obs_output_output_caption_text[1/2]`
2023-01-15 22:09:23 -08:00
CodeYan01 f9fd1c0967 docs: Clarify enum functions return value 2023-01-07 15:08:35 -08:00
skeletonbow 70460564d1 docs: Add script_description to scripting
Added missing documentation for script_description function.
2023-01-07 15:04:26 -08:00
CodeYan01 7fdc9c7254 docs: Add missing source functions 2022-12-04 22:10:49 +11:00
gxalpha 563cf6544d docs: Fix reference count info of obs_frontend_get_streaming_service 2022-12-03 15:36:49 -08:00
CodeYan01 862ed14fd9 docs: Add versionadded for 29.0.0 functions 2022-12-03 15:33:59 -08:00
CodeYan01 17c0820d2f docs: Add info on property modified callback 2022-12-03 15:32:28 -08:00
CodeYan01 d3eba18718 docs: Clarify signal_handler_connect()
Notes that it does nothing if the combination of `signal`,
`callback`, and `data` is already connected to the handler.
Adds missing param `signal` description.
Typo fix
2022-12-03 15:19:06 -08:00
gxalpha 34e6a5b73f libobs: Deprecate obs_get/set_master_volume
These methods were never implemented to do anything.
2022-11-19 20:37:22 -05:00
CodeYan01 9e3a95cbdf docs: Add info on funcs to use for properties
Add links to obs_data_* funcs for color, font, and editable list
properties
2022-11-10 00:36:29 -08:00
Tommy Vercetti 41efdc498c libobs/util: Add function to get Windows x64 emulation status 2022-11-09 03:03:26 -08:00
derrod 1b6e1ce655 libobs: Add utility function to get total RAM 2022-11-08 05:38:37 -08:00
gxalpha 5658bf6732 libobs: Add "source_update" signal
Adds a source signal that gets triggered when a source's settings are
updated.
2022-11-05 18:06:53 -07:00
CodeYan01 bdf6809f45 docs: Add clarifications
Adds links to release functions for "new/incremented reference".
Extra info on signal handler.
Parameter description on `obs_property_list_add_*` functions, since
their parameter `name` can be confusing and it is unclear which value
is stored in obs_data_t.
Adds clarifications on calldata_ptr.
2022-11-05 16:12:13 -07:00
Jim 1fc6c50b62 UI/obs-frontend-api: Return allocated strings for new funcs
8dda8d3500 added a few functions to get the last
recording/replay/screenshot path, but it should return allocations
because it's possible for the data to be modified at a later point.
2022-10-30 20:35:36 -07:00
cg2121 8dda8d3500 obs-frontend-api: Add functions to get last saved files
Adds functions to the frontend api to get the last recording,
screenshot and replay buffer saved.
2022-10-30 19:53:11 -07:00
cg2121 42ecdef938 obs-frontend-api: Add screenshot event
This adds a frontend event for when a screenshot is taken.
2022-10-23 11:06:30 +11:00
PatTheMav 89eeeb9c65 docs: Fix sphinx import error on Python 3.10+ 2022-10-20 21:26:52 +11:00
cg2121 3c7b1c8297 obs-frontend-api: Add theme functions
This adds a frontend function to check if a theme is dark and also
adds an event for when the theme is changed.
2022-10-15 16:21:34 -07:00
PatTheMav 9b317edb22 docs: Add obs_sceneitem_group_enum_items API call to scripting docs 2022-10-11 15:19:41 +02:00
CodeYan01 81233c6dd4 docs: Add links to python functions 2022-10-01 16:09:29 -07:00
Matt Gajownik a4564bee27 docs/sphinx: Update references to Python 3.x 2022-08-11 22:06:16 +10:00
tytan652 5490e4f44c libobs,docs: Improve failed module loading logging
- Avoid putting libs (like CEF) in the plugins load failure message.
- Consider obsolete macOS obs-browser plugin fail as a hardcoded skip.
2022-07-30 16:55:03 -07:00
gxalpha 467f73d4c9 obs-frontend-api: Add function for manual file splitting 2022-07-30 18:50:13 +10:00
Matt Gajownik 54a9ae2ea1 docs/sphinx: Override RTD style
This fixes an issue where clickable references did not make it clear
that they were clickable.
2022-07-30 11:09:01 +10:00
Matt Gajownik a1415f4bad docs/sphinx: RTD-friendly documentation changes 2022-07-30 11:09:01 +10:00
Matt Gajownik ff555dd2b0 CI: Update docs to Sphinx v3, fix warnings
Sphinx 3 adds a number of C and C++ friendly directives, making
documenting our code much easier.
2022-07-30 11:09:01 +10:00
Matt Gajownik 60e94a2899 docs/sphinx: Enable extlinks for shorthand URLs
Authors can use :wiki:`PageName` and :source:`libobs/obs.h` to link to
files/pages rather than providing full links. If custom test is needed,
wrap the path in additional <>.
Example:     :wiki:`Use the Wiki <Install-Instructions>`
2022-07-30 11:09:01 +10:00
Matt Gajownik 9e22b6ad53 CI: Use ReadTheDocs theme for Sphinx docs 2022-07-30 11:09:01 +10:00
jp9000 23c3ad4d02 libobs: Add obs_load_all_modules2 and obs_find_modules2
obs_find_modules2 allows the ability to get the module name in the
callback, and the change to obs_find_modules2 also adds the ability to
find out whether any modules failed to load or not.
2022-07-28 16:36:01 -07:00
jp9000 8a698e863d libobs: Add func to get supported service codecs
Allows a service to return a list of codecs that are currently supported
2022-07-26 09:23:35 -07:00
gxalpha 5898df70fa docs: Fix encoder .get_defaults2 arguments 2022-07-06 17:48:15 -07:00
tytan652 bf985946a4 libobs,UI,docs: Add info as text property sub-type in the property API 2022-06-26 17:31:59 +10:00
Tommy Vercetti 3b64e74660 libobs/util: Add function to get Rosetta translation status 2022-06-19 01:37:15 +02:00
Matt Gajownik 736c14f0f5 docs/sphinx: Minor formatting corrections 2022-06-05 12:14:05 +10:00
Matt Gajownik f4b8a3c0e0 docs/sphinx: Update configuration and version 2022-06-05 12:14:03 +10:00
Matt Gajownik c0fcff074c docs/sphinx: Update GitHub links to OBSProject org 2022-06-05 12:13:58 +10:00
tt2468 40a2cc0143 docs/sphinx: Fix statement typo for bfree()
Memory is not allocated by bfree()
2022-05-30 20:57:39 -07:00
jpark37 11da542a0d libobs: Add max_luminance to obs_source_frame
Used in situations where source luminance is greater than HDR nominal
peak setting to avoid clipping by applying BT.2408 maxRGB EETF.
2022-05-27 14:56:47 -07:00
Ryan Foster 75d0f44551 docs: Update speaker_layout enum values
A documentation update was missed. Bring these values up to date with
the current reality.
2022-05-16 17:15:11 -04:00
Norihiro Kamae c491594a51 libobs/util: Add os_sleepto_ns_fast
The function `os_sleepto_ns` has a spin loop so it will consume CPU
resource. The new function has same interface but consumes less CPU
resource with a drawback of less precision.
2022-05-15 02:31:31 -07:00
jp9000 f482111791 libobs: Add ability to configure audio buffering latency
Allows a frontend the ability to set the maximum audio buffering
latency, and specify whether that audio buffering is either fixed (to
the maximum audio buffering latency), or dynamically increasing from 0.

This will be useful if the user wishes to output audio to devices or
through a virtual audio device at a guaranteed minimal latency.
2022-04-24 08:44:33 -07:00
jpark37 338608bd67 libobs,UI: Support HLG nominal peak level
HLG output uses MovieLabs-recommended procedure.

- If peak luminance is greater than 1000, use maxRGB EETF to 1000.
- Otherwise, don't tonemap.
- Then use normal HLG conversion procedure with gamma 1.2 (1000 nits).
2022-04-14 09:36:44 -07:00
jpark37 59dbc3eb81 libobs: Rename Rec. 2020 to Rec. 2100
Rec. 2020 is really an SDR spec, but I think HDR10 made it okay to slap
PQ on it, call it an HDR spec. Rec. 2100 came along after and formally
allowed the use of PQ/HLG, so we should use 2100 instead.
2022-04-10 00:13:52 -07:00
jpark37 06111d5b10 libobs: Add high-precision sRGB support 2022-04-08 17:19:23 -07:00
jpark37 94fa6d064b libobs: Add video_format_get_parameters_for_format
Video matrix is slightly different based on the number of bits per
channel, so derive from video_format for convenience.
2022-04-07 19:28:51 -07:00
jpark37 8194e9431e libobs: Allow transitions to give placeholder
The fade transition could benefit by providing NULL to differentiate a
real source texture from the transparent placeholder. This would give it
a chance to fade correctly for source transitions.
2022-04-07 01:49:57 -07:00
jpark37 0ed0f2cdb4 libobs: Add I010/P010 support, TRC enum 2022-04-03 00:01:25 -07:00
jpark37 e638cc9f82 libobs: Add support for nonlinear SRGB blending 2022-04-02 16:02:41 -07:00
jpark37 525f964b3d libobs: Add color space management
This provides the framework for automatically compositing SDR and HDR
sources together. Source will need to leverage the new
video_get_color_space to opt into HDR support.
2022-03-26 13:00:34 -07:00
jpark37 692ca7efce libobs: Add Rec. 2020 video_colorspace enum values
One for PQ, and one for HLG. Including transfer function as part of the
color space simplifies logic by avoid invalid combinations.
2022-03-24 20:56:19 -07:00
jpark37 cd22df09c9 libobs, UI: Add SDR white nits option 2022-03-23 22:35:26 -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
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 1a7a10048c.
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