0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

335 Commits

Author SHA1 Message Date
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
3a620c485e UI: Undo/Redo Transformations
Implements undo/redo for transformations of sources, both through
preview and the transformations properties.
2021-03-29 03:06:26 -04:00
Ford Smith
60d95cb5bd UI/libobs: Undo/Redo Sources and Scenes
Implements the Undo/Redo for scenes and sources, ranging from renaming,
deletion, addition. It also adds several elements to libobs that were
designed to facilitate undo/redo, and should not affect the rest of
libobs.
2021-03-29 03:06:26 -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
Jim
2eca4d80b6
Merge pull request #2233 from VodBox/missing-files-dialog
libobs + UI: Add Missing Files API & Dialog
2021-01-31 08:02:16 -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
VodBox
fb95e1d1e9 libobs: Add missing file API to sources 2021-01-17 10:31:58 +13:00
jp9000
ebbe8d1bf9 libobs: Change service max res. to res. list
(This commit also modifies rtmp-services and UI)

Changes the maximum resolution size to a resolution list, and splits the
maximum FPS to its own function.

(Note: ABI has not been modified because the last changes still haven't
been released yet, so it's safe to modify this as long as the changes
haven't been officially released)
2020-11-13 18:22:53 -08:00
jp9000
fb7747c56e libobs: Implement obs_service func to get max bitrates
(This commit also modifies rtmp-services)

Implements obs_service_get_max_bitrate, which allows retrieving the
maximum audio/video bitrates directly rather than being forced to use
the apply method. Makes it a bit easier to get the bitrate values.
2020-11-11 09:42:26 -08:00
Colin Edwards
7b0d7c6357 Remove BUILD_CAPTIONS build flag 2020-11-02 22:46:55 -06:00
Colin Edwards
923f06bfa6 decklink: Add ability to ingest/embed cea 708 captions
(This commit also modifies libobs, UI)
2020-11-01 22:28:49 -08:00
jp9000
e4c6b59852 libobs: Add ability to get max cx/cy/fps from service
This obs_service_t object callback was implemented specifically for
services which may have a maximum recommended width, height, and
framerate that needs to be enforced.
2020-10-30 00:28:44 -07:00
Clayton Groeneveld
2b50263d5c UI, libobs: Add ability to copy/paste single filter 2020-10-15 10:14:22 -07:00
jp9000
d45017370b libobs: Add functions to get locale text from modules
Useful for sharing translated text from modules with the frontend.  This
is technically already done via properties, but it would be nice to just
be able to explicitly look up locale text directly rather than have to
go through properties.
2020-08-10 12:24:01 -07:00
jp9000
de2e89d972 libobs: Add function to get module pointer
Useful for getting getting locale text associated with a specific module
2020-08-10 12:24:01 -07:00
jp9000
d117908440 libobs: Add func to set async video frame immediately
Allows the ability to directly override the current async frame
immediately.
2020-07-29 13:59:49 -07:00
Richard Stanway
5e3e9c1f13 obs-ffmpeg: Use new encoder error handling functions 2020-04-12 17:05:19 +02:00
Richard Stanway
5dc9f989d6 libobs: Add support functions for encoder error handling
Similar to how outputs can pass errors, add the same functionality for
encoders so that if an output encoder has an error, it is made available
to the output and eventually the UI / user.
2020-04-12 17:05:19 +02:00
jp9000
8de20ab3be libobs: Add task scheduling features
(This commit also modifies the UI)

Adds the ability to schedule tasks for certain threads
2020-03-14 10:54:37 -07:00
jp9000
b2302902a3 libobs: Fix source type versioning system
(This also modifies image-source, obs-text, text-freetype2, and UI)

This improves source definition versioning.  To do this, it now stores
two identifier names.  One "unversioned" which is the original name, and
one "versioned" with the version number appended.

This fixes both backward compatibility with older OBS versions, and
fixes the inability to use "add existing" in OBS itself on sources
created from older version definitions.
2020-03-09 06:12:22 -07: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
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
Clayton Groeneveld
f9ccea5235 libobs: Add media control support to backend 2020-01-30 21:40:20 -08: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
jpark37
00f280ff9d libobs: Rename DEPRECATED to OBS_DEPRECATED
Avoid collisions with other libraries that define DEPRECATED.
2020-01-20 21:44:50 -08:00
jp9000
2d35f863da libobs: Add manual transition "torque" support
Allows the ability for manual transitioning to smoothly flow
(interpolate) to the intended transition point over a short period of
time rather than simply setting a hard transition point number.  Doing
this allows manual transitioning to occur more smoothly, and in a more
visually pleasant way.
2019-12-27 16:38:20 -08:00
Clayton Groeneveld
a97039db64 libobs: Add manual transitioning support (T-bar)
Allows the ability to manually specify the transitioning point so the
user can transition at a custom rate, usually done by a device that can
be used as a T-bar

Co-authored-by: Jim <obs.jim@gmail.com>
2019-12-27 16:38:20 -08:00
Clayton Groeneveld
82ffcdc827 UI: Add source icons 2019-11-24 20:50:42 -08:00
Exeldro
e5ae662e7a libobs: Export obs_group_from_source
Export obs_group_from_source to allow it to be used externally
2019-10-15 09:21:21 -07: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
65c7e2d19d libobs: Add API to get last OBS version of a source
Allows the ability to change the behavior of a source depending on the
previous OBS version.
2019-09-20 00:13:51 -07:00
jp9000
33c09d91c2 libobs: Add funcs to determine whether audio active
Adds functions to allow sources to inform the UI whether the audio is
currently active or not.  Allows the ability to turn on/off the items in
the mixer.
2019-09-19 23:37:29 -07:00
jpark37
3456ed0644 libobs: UI: Remove DrawBackdrop() to save fullscreen pass
It's a waste of GPU time to do two fullscreen passes to render final mix
previews. Use blend states to simulate the black background of
DrawBackdrop() for the following situations:

- Main preview window (Studio Mode off)
- Studio Mode: Program

This does not effect:

- Studio Mode: Preview (still uses DrawBackdrop)
- Fullscreen Projector (uses GPU clear to black)
- Windowed Projector (uses GPU clear to black)

intel GPA, SetStablePowerState, Intel HD Graphics 530, 1920x1080

Before:
DrawBackdrop: ~529 us
main texture: ~367 us (Cheaper than drawing a black quad?)

After:
[DrawBackdrop optimized away]
main texture: ~383 us
2019-07-18 19:58:29 -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
jp9000
70ecbcd5d4 libobs: Add obs_get_frame_interval_ns
Returns the current video frame interval between frames, in nanoseconds.
2019-07-07 16:38:21 -07:00
jp9000
f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
VodBox
52235ba86d libobs: Add transition and showing counter functions
This commit adds a function to forcefully stop a transition, and to
increment/decrement the showing counter for a source with the MAIN_VIEW
type.

These functions are needed for the transition previews to work as
intended.
2019-05-12 21:13:21 -07:00
James Park
5471e74cbe libobs: UI: Remove Qt usage from graphics thread
This fixes Xcode warning about detecting UI usage from another thread.
2019-05-09 23:30:37 -07:00
jp9000
8d125dc01d libobs: Add better default source color range handling
Fixes handling of the `obs_source_frame::full_range` member variable,
which is often set to false by default by many plugins even when using
RGB, which would cause RGB to be marked as "partial range".  This change
is crucial for when partial range RBG support is implemented.

Adds `obs_source_frame2` structure that replaces the `full_range` member
variable with a `range` variable, which uses the `video_range_type` enum
to allow handling default range values.  This member variable treats
VIDEO_RANGE_DEFAULT as full range if the format is RGB, and partial
range if the format is YUV.

Also adds `obs_source_output_video2` and `obs_source_preload_video2`
functions which use the `obs_source_frame2` structure instead of the
`obs_source_frame` structure.

When using the original `obs_source_frame`, `obs_source_output_video`,
and `obs_source_preload_video` functions, RGB will always be full range
by default for backward compatibility purposes.
2019-04-25 15:12:08 -07:00
James Park
e01fcae133 libobs: UI: Fix rotated line scale
The line drawing functions previously assumed the upper-left 3x3 for
box_transform only held scale. The matrix can also hold rotation, so
pass in scale separately.

Fixes https://obsproject.com/mantis/view.php?id=1442
2019-04-19 06:35:42 -07:00
Jim
827f45acfd
Merge pull request #1672 from derrod/captions-no-throttling
libobs: Add minimum display duration to caption data
2019-04-14 04:19:07 -07:00
jp9000
70b8f0aa65 libobs: Fix ABI break
OBS_EFFECT_AREA from 7d811499e was inserted in the middle of the enum,
which breaks ABI for any binaries that use
OBS_EFFECT_PREMULTIPLIED_ALPHA or OBS_EFFECT_BILINEAR_LOWRES.
2019-03-22 03:46:42 -07:00
Colin Edwards
5c16a96770
Merge pull request #1715 from jpark37/area-filter
Add "Area" scale filter
2019-03-13 23:30:25 -05:00
jp9000
a2829643f4 libobs: Add function to get libobs object data 2019-03-13 00:50:19 -07:00
James Park
7d811499e0 Add "Area" scale filter
This new scale filter computes pixels by weighing the coverage area of
source pixels over the target pixel. This algorithm works well for both
upsampling and downsampling, but was mainly designed to upscale
high-quality low-resolution sources like RGB/HDMI retro consoles. I've
heard of people using odd workarounds like scaling up to very high
resolutions before scaling back down to preserve pixel shartpness. This
algorithm directly addresses this use-case in a much more direct
fashion.

The Area scale filter does a better job of preserving the thickness of
thin features than the Point filter.

The Area scale filter does not look at source pixels that lie outside
of the target pixel, leading to a much sharper image than Bilinear,
Bicubic, and Lanczos filters.

This filter should interpolate pixels in linear space, but OBS is not
equipped to do that at the moment.

libobs: Add GPU effect, and wire up scene serialization.

obs-filters: Add Area as an option for scale_filter.

UI: Add Area as an option for both scene items, and canvas downscaling.
2019-03-06 20:53:15 -08:00
jp9000
17e85f04fd libobs: Add func to get encoder caps by encoder pointer 2019-02-26 08:02:57 -08:00
derrod
b8b2b7e2e3 libobs: Add minimum display duration to caption data
Adds display_duration declaring the minimum duration a caption text
is not going to be overwritten by a new one. To keep the functions
backwards-compatible obs_output_output_caption_text2 was added while
obs_output_output_caption_text1 continues having a 2 second default.
2019-02-20 06:05:08 +01:00
VodBox
f095cb2d0e UI: Add scene item canvas overflow to preview 2019-02-08 20:38:53 +13:00