Commit graph

254 commits

Author SHA1 Message Date
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
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
Exeldro 32e7ba1abe UI: Add visibility transitions
This also modifies libobs.

This adds the ability for scene items to have transitions
when their visibility is toggled.
2021-03-16 22:15:16 -07:00
Anton Bershanskiy 54cbd98d91 libobs: add helper for source filter count
Add function size_t obs_source_get_filter_count(obs_source_t *source)
which returns the number of filters a source has. Update docs for it.
2021-03-16 21:38:06 -07:00
Christopher P. Yarger dcf3e6cd06 docs: Add entries for Frontend API T-bar control 2021-03-10 20:18:36 -08:00
tt2468 1ea8183737 Docs: Add obs_frontend_reset_video() 2021-02-03 08:53:42 -08:00
jpark37 5cf40bf818 docs/sphinx: Update atomic API 2021-02-03 08:51:31 -08:00
Clayton Groeneveld 99d10c2607 libobs: Add function to get module lib
This adds a function find module library.

Co-authored-by: Stéphane Lepin <stephane.lepin@gmail.com>
2021-01-26 03:31:31 -08:00
jpark37 edbad7e93d docs/sphinx: Document SRGB changes 2021-01-21 07:42:56 -08:00
Richard Stanway 900b5341eb libobs: Add os_is_obs_plugin function
This function determines if something is an OBS plugin before attempting
to load it. On Windows, many plugins ship their dependent DLLs alongside
the plugin DLL, so OBS would load things like libcef.dll on startup only
to immediately free it. For other platforms, this is less of a concern
so this function is a no-op for now.

This improves startup time and reduces risk from dependent DLLs
potentially running code with unwanted side effects in DllMain.
2021-01-18 19:05:41 -08:00
Clayton Groeneveld 3bc4e8ecba obs-frontend-api: Add frontend api functions for the virtual camera
This adds functions to the frontend api to start/stop the virtual
camera, to check if it is active and adds function to get the output
reference. It also adds api events for when the virtual camera is
started or stopped.
2021-01-13 09:46:04 -08:00
jpark37 e4bfb783ee docs/sphinx: Add obs_properties_add_color_alpha 2021-01-11 11:52:50 -08:00
Andrew Woodward ae9b7eaa9a docs/sphinx: Add missing obs_frontend_open_projector 2021-01-02 04:34:59 -08:00
Ryan Foster 9ab0d8c524 docs: Fix GitHub Actions doc check warnings 2020-10-16 16:27:38 -07:00
hgonomeg d3ec3e99d5
UI: Add replay buffer saved event to the frontend api (#3592)
* obs-frontend-api: add the event of saving replay buffer

Add OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVED as given by RFC 33

* UI: Emit the replay buffer saved event to the api

Send the OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVED to api (as in rfc33)

* docs/sphinx: Add replay buffer saved event

Documentation provided for OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVED (RFC33)
2020-10-10 17:53:13 -07:00
Scratch 8dde1fc874 Docs: Fix Frontend Finish Loading event 2020-10-10 13:50:08 +11:00
jpark37 b6afaceeae Update VIDEO_CS_DEFAULT to mean 709 instead of 601
Consistent with modified default UI setting.
2020-09-06 20:51:28 -07:00
VodBox a78162991a docs/sphinx: Fix mismatched typedefs 2020-08-31 12:07:19 +12:00
VodBox bc084bc10b docs/sphinx: Fix incorrect callback information 2020-08-31 12:02:11 +12:00
Clayton Groeneveld a70014d7b2 UI: Add ability to make screenshots
Co-authored-by: Jim <obs.jim@gmail.com>
2020-07-30 17:41:43 -07:00
Clayton Groeneveld e3a1659134 docs: Remove Doxygen 2020-05-28 15:00:52 -05:00
Exeldro b7a17d5b22 docs/sphinx: Add Property Grouping 2020-04-15 16:40:52 +02:00
Matt Gajownik 7ee1bb2df6 docs/sphinx: Bump major OBS version 2020-03-28 23:17:20 +11:00
jp9000 b9d6675e2c libobs: Add ability to rotate async sources 2020-03-01 03:39:54 -08:00
jp9000 de363d3e09 libobs: Add obs_encoder_scaling_enabled()
Returns whether rescaling is enabled for an encoder.  This will be used
with texture-based encoders to determine whether to fall back to
RAM-based encoding instead.
2020-02-18 20:58:58 -08:00
jp9000 9f297dde2c docs/sphinx: Fix missing parameter in documentation 2020-02-08 01:51:51 -08:00
jp9000 99e639015f libobs: Add group functions that can signal refresh
Adds API:
obs_scene_add_group2
obs_scene_insert_group2
obs_sceneitem_group_ungroup2

These functions should be used by plugins if they need to use these
functions and need to send a refresh signal.  If a major API rework ever
happens the old functions should be removed.  The old functions should
eventually be deprecated.

The reason why specifying a 'signal' parameter is useful is because it's
a bit more seamless for the user interface to be able to have custom
handling of these specific cases.  It looks better and doesn't require
completely erasing/recreating the entire list, which is visually
unappealing.
2020-02-07 16:45:04 -08:00
jp9000 6d0ef75663 libobs: Add refresh signal to scenes
This signal is used to specify when a scene needs a full refresh of its
item list.
2020-02-07 16:35:20 -08:00
jp9000 5027709320 docs/sphinx: Fix typo 2020-02-07 16:21:34 -08:00
Exeldro 5c30f8343e docs/sphinx: add media controls 2020-02-06 18:44:04 +01:00
Exeldro 1564eb63e7 docs/sphinx: add source icon 2020-02-06 17:51:56 +01:00
jp9000 3aa08c4e0f libobs: Add obs_scene_find_source_recursive
Same as obs_scene_find_source but also searches groups within the scene.
2020-01-27 14:36:53 -08:00
Exeldro 81b7618926 docs/sphinx: Add obs_group_from_source 2020-01-19 09:22:33 +01:00
Exeldro ec655bbcb9 docs/sphinx: Add obs_enum_scenes 2020-01-19 09:21:53 +01:00
jp9000 70582174c3 libobs: Add the ability to make sources obsolete
This allows the ability to do things such as change defaults or
properties of sources without necessarily breaking older user
configurations that had older defaults or properties.
2020-01-15 01:49:18 -08:00
Scratch e462937fbc docs/sphinx: Fix obs_property_list_item_disable entry 2020-01-10 10:31:19 +11:00
luz.paz d124e6402c docs/sphinx: Fix various typos
(This modifies UI, libobs, deps/obs-scripting, various cmake files)

Found using:
`codespell -q 3 -S *.ini,./UI/data/locale,./deps/w32-pthreads -L aci,dur,iff,mut,numer,uint`
2019-10-14 17:19:38 -07:00
jp9000 eab10d48b2 UI: Add pause support
Adds support for pausing recordings.  When settings are eligible for
recordings, a pause button will appear next to the recording button.  If
the settings are not eligible, it will warn the user in the output
settings that they cannot pause recordings if those settings are used.
2019-07-08 08:11:56 -07:00
jp9000 153fa6337f libobs: Implement pausing of outputs
This implements pausing of outputs.  To accomplish this, raw audio/video
data is halted to the encoders or raw output.  Pausing is as precisely
timed as possible according to the timing of the obs_output_pause call,
and audio data will be spliced down to the exact audio sample in
accordance to that timing at the start/end marks.

Outputs that support this (outputs used for recording) can set the
OBS_OUTPUT_CAN_PAUSE capability flag.
2019-07-07 16:38:22 -07:00
Chris Angelico 2fe641b8a4 libobs, UI: Implement item_locked event
Similar to item_visible, this event fires whenever a scene item is
locked or unlocked. This allows the UI and libobs to remain in sync
regarding scene elements' statuses.
2019-06-15 16:09:10 -07:00
jp9000 973d31b8c2 libobs: Fix lockup when an encode call fails
(This commit also modifies the UI, obs-ffmpeg, and obs-output modules)

Fixes a long-time regression where the program would lock up if an
encode call fails.  Shuts down all outputs associated with the failing
encoder and displays an error message to the user.

Ideally, it would be best if a more detailed error could be displayed to
the user about the nature of the error, though the primary problem is
the encoder errors are typically not something the user would be able to
understand.  The current message is a bit of a generic error message;
improvement is welcome.

Another suggestion is to try to have the encoder restart seamlessly,
though it would take a significant amount of work to be able to make it
do something like that properly, and it sort of assumes that encoder
failures are sporadic, which may not necessarily be the case with some
hardware encoders on some systems.  It may be better just to use another
encoder in that case.  For now, seamless restart is ruled out.
2019-05-17 01:51:12 -07:00
Jim 3a3cfce29d
Merge pull request #1873 from Palakis/feature/frontend-api-studio-mode-transition
obs-frontend-api: Add method to trigger a Studio Mode transition
2019-05-09 19:24:59 -07:00
Stéphane L 4762351258 obs-frontend-api: Add func to trigger a Studio Mode transition 2019-05-09 17:01:08 -07:00
Stéphane L d3910149d2 obs-frontend-api: Add methods to get/set transition duration 2019-05-09 16:58:47 -07:00
jp9000 b8a3ae1b10 libobs: Add multi-track support to non-encoded outputs 2018-10-04 20:32:35 -07:00
VodBox 293c97fe78 docs/sphinx: Add missing obs_sceneitem_get_id info 2018-09-18 21:34:44 +12:00
Jim e615dffce5
Merge pull request #1323 from Andersama/effect-annotation-parsing
libobs: Add HLSL annotation parsing
2018-09-12 01:16:21 -07:00
Alex Anderson 12f925401f docs/sphinx: Add annotation api functions
Add documentation for:

size_t gs_param_get_num_annotations(const gs_eparam_t *param)

gs_eparam_t *gs_param_get_annotation_by_idx(const gs_eparam_t *param,
		size_t annotation);

gs_eparam_t *gs_param_get_annotation_by_name(const gs_eparam_t *param,
		const char *name);

void *gs_effect_get_val(gs_eparam_t *param);

void *gs_effect_get_default_val(gs_eparam_t *param);

size_t gs_effect_get_val_size(gs_eparam_t *param);

size_t gs_effect_get_default_val_size(gs_eparam_t *param);
2018-09-08 05:22:12 -07:00
jp9000 621c519cc5 libobs: Add function to get encoder object's defaults
Rather than relying on the encoder's type identifier, additionally allow
the ability to get defaults via an encoder object.
2018-07-20 01:49:32 -07:00
jp9000 26d5560da3 libobs: Add scene item grouping
Allows the ability to group scene items.  Groups internally are
sub-scenes, which allows the ability to add unique filters and
transforms to each group.
2018-06-03 15:04:39 -07:00
jp9000 3a05cf6ab0 libobs/callback: Add signal reference counting
Adds a simple signal reference counting function
(signal_handler_connect_ref) that makes it so that signals keep the
handler around until the all the signal itself is disconnected.  This
prevents potential crashes where a signal might try to disconnect after
a handler has already been destroyed (typically in C++ with
OBSSignalHandler helper objects, where destruction isn't guaranteed to
be predictable).

This also modifies OBSSignalHandler to use the reference-counting
connections.
2018-06-03 15:04:03 -07:00
Han-Tai Chen 1a3d4d62d7
docs/sphinx: Fix typo in script sources section 2018-05-02 03:23:00 +08:00
Zachary Lund 189e535014 libobs: Add functions to get output capability flags
Closes obsproject/obs-studio#1263
2018-04-25 03:15:30 -07:00
jp9000 c4b482efef libobs: Add functions to get raw video output
Adds obs_add_raw_video_callback() and obs_remove_raw_video_callback()
functions which allow the ability to get raw video frames without
necessarily needing to create an output.
2018-04-23 10:58:30 -07:00
jamacanbacn 8a59d68e47 libobs: Fix property text typo
(This commit also modifies UI)

Closes jp9000/obs-studio#1204
2018-02-27 05:37:40 -08:00
jp9000 84557629d8 docs/sphinx: Clarify Python windows installation 2018-01-22 09:32:29 -08:00
jp9000 da7b8c79a2 docs/sphinx: Clarify vertex buffer usage 2018-01-14 05:31:28 -08:00
SuslikV 2741337755 docs/sphinx: Fix vec3_set
vec4_set was the equivalent to vec2_set.

Closes jp9000/obs-studio#1115
2018-01-04 18:03:21 -08:00
jp9000 e16ff2db31 docs/sphinx: Add scripting documentation 2018-01-04 11:37:43 -08:00
jp9000 190743cf3d doc/sphinx: Add frontend API documentation 2018-01-04 11:37:43 -08:00
jp9000 7f6cf97bd7 libobs: Add obs_render_main_texture
(Note: This commit also modifies UI and test)

This makes it so that main preview panes are rendered with the main
output texture rather than re-rendering the main view.  The view will
render all objects again, whereas the output texture will be a single
texture render of the same exact thing.

Also fixes some abnormal artifacting when scaling the main preview pane.
2018-01-01 18:52:47 -08:00
jp9000 5d9854ea44 libobs/util: Add funcs to push zeroed data to circlebufs
Adds circlebuf_push_front_zero and circlebuf_push_back_zero to
conveniently push zeroed data to the front/back of the buffer without
having to create an intermediary buffer to accomplish the same thing.
2017-12-02 13:52:40 -08:00
jp9000 78411de75e libobs/graphics: Add gs_effect_set_color
Convenience function for setting a color (in hex format, e.g.
0xAARRGGBB)
2017-12-01 12:05:52 -08:00
jp9000 d51e2a019b docs/sphinx: Add sphinx documentation 2017-11-27 03:02:04 -08:00