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

278 Commits

Author SHA1 Message Date
Norihiro Kamae
fa9b7b042f libobs: Remove starting_frame_count from obs_output_t
The member variable `starting_frame_count` was set but never read.
2023-08-15 16:00:21 -07:00
jpark37
7669da1ea8 libobs: Add VIDEO_FORMAT_R10L
Support 10-bit packed format that DeckLink uses.
2023-07-29 16:41:31 -07:00
derrod
d90bfc5e0b libobs: Add obs_add_safe_module() 2023-07-21 23:22:07 +02:00
Ruwen Hahn
6cdfb0a8b9 libobs: Allow configuring frame rate divisor for encoders
This allows encoders/outputs to output at a frame rate that is lower
than the configured base frame rate
2023-07-03 09:35:06 -07:00
Norihiro Kamae
8169188f89 libobs: Define DARRAY macro types
To avoid passing `struct darray *` type, which cannot hold the type
information, this commit defines array types and uses that types on the
function parameters.
2023-07-01 00:39:13 -07:00
Ruwen Hahn
03fa9acc7f libobs: Add obs_encoder_enable_gpu_scaling
Allows rescaling resolution for GPU encoders and allows moving
rescaling for CPU encoders from CPU to GPU

Rescaling is implemented via core video mixes; encoders create
their own core mix with matching width/height/format/colorspace/
range when gpu scaling is enabled and no matching core video
mix exists
2023-06-26 13:32:25 +02:00
John Bradley
6ec0b2db11 libobs: Add support to obs-outputs for multi video encoders
This adds support in outputs to handle multiple video encoders
and their interleaving with the encoded audio.
2023-06-14 02:24:54 -07:00
Exeldro
a77789b266 libobs: Don't keep the sources mutex in tick_sources
Allow other threads to use sources while the graphics thread does
video_tick, update, activate and deactivate on sources
2023-06-10 14:20:13 -07:00
PatTheMav
2966c4030e libobs: Use static library for version string information
Switching to a static library that contains version information as
const char strings has multiple benefits:

* The version information provided externally via compiler definitions
  will fail compilation early if malformed
* An updated version string (which will happen with every commit) will
  not invalidate existing compilation units, because only the static
  library is affected by the change
* An update of the version change just requires a recompilation of the
  static library and a linker update
* An update of the version will _not_ infect the rest of the codebase
  (as it does currently, because everything includes obsconfig.h one
  way or another)
* Other modules which used the macro definition directly have been
  updated as much as possible to use the proper getter method from
  `libobs` instead (some Windows-specific modules use preprocessor
  string composition, the value has been added as a compiler definition
  directly in those cases)
* Because the impact of a version change due to a commit hash change
  is limited to the static library, ccache hit rates should be
  improved considerably
2023-05-27 16:48:24 -07:00
Lain
106c7aa61f Update copyrights/names 2023-05-20 01:31:18 -07:00
jpark37
504cc76e93 libobs: Ensure v210 preserves precision 2023-04-05 21:54:25 +02:00
Ryan Foster
bfb8fba066 Revert "libobs: Enable fast clear on Windows always"
This reverts commit c2afa58125.
2023-03-27 15:24:52 -04: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
jpark37
c2afa58125 libobs: Enable fast clear on Windows always
NVIDIA driver 527.37 fixes flickering when multiple GPUs are installed.
2023-03-20 01:41:47 -07:00
tytan652
201bcda051 libobs,docs: Add protocol in Outputs API 2023-03-19 15:29:03 +01:00
derrod
e6a7cff034 libobs: Use uthash for hotkeys and hotkey pairs 2023-03-18 10:47:50 +01:00
derrod
eff3cf134c libobs: Use uthash for hotkey name map 2023-03-18 10:47:49 +01: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
jpark37
463bf0dff5 libobs,UI: Add P216/P416 pixel formats
Will be useful for ProRes.
2023-02-21 18:48:44 +01:00
John Bradley
61284cf9ba libobs: Refactor obs-output encoded use of mixes
There was quite a bit of conflated usage of mixes (which refers
to raw audio) and encoder counts. This fully separates the two
and makes a distinct separation when iterating over mixes vs
encoders.
2023-01-18 11:54:20 -08:00
John Bradley
d70171daa6 libobs: Make internal version of remove encoder 2023-01-18 11:54:20 -08:00
Ryan Foster
19abcbcd3c Revert "libobs-d3d11: Make sure libobs knows the new adapter index"
This reverts commit e62759a3fa.
2022-12-30 21:14:15 -08:00
Jim
e62759a3fa libobs-d3d11: Make sure libobs knows the new adapter index
Because Intel has wonderful code which forces it to run on the iGPU if
there are both an Intel iGPU and an Intel dGPU on the same system, the
adapter index OBS is set to internally will no longer be valid, thus if
anyone calls `obs_get_video_info()` to try to find out what adapter
index OBS is running on, it will be invalid on those computers.
Wonderful.

So, basically, this code here just fixe it so if you want to call
`obs_get_video_info()`, it'll actually have a valid adapter index now,
that way we can reference the adapter index when determining what GPU
we're actually running on without having to like, do anything super
complicated and silly like comparing adapter GUIDs just to figure out
what adapter OBS is actually runing on. I don't want the code to be a
mess anymore.

(I like how in any other situation on the face of the planet, there's no
need to force OBS to run on an integrated adapter. *Normally* OBS
*should* run on the dedicated adapter, that way it can actually capture
games properly. You can probably guess as to why they're forcing it to
run on the integrated adapter rather than the dedicated adapter. But you
know what? Whatever. I don't really care anymore I guess. Just...
whatever. Here we are I guess. Also I was in a bad mood while writing
this just as a disclaimer.)

(I hate that this commit exist. I hate that the commit c83eaaa51c exists
even more.)
2022-11-21 08:47:36 -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
Antti Tapaninen
c7f4c78a69 libobs: Allow overriding video resolution per view 2022-11-19 15:34:54 -08:00
jpark37
37389ff243 libobs: Avoid display clear workaround if possible 2022-08-27 16:32:50 -07:00
jp9000
07df6548fd libobs: Increase texture encode buffering
Seems to solve lag encountered on the new AMF encoder. The SubmitInput
call in the AMF encoder can occasionally stall for quite a long amount
of time, but most take microseconds, so we can compensate by simply
increasing the buffering (3 to 10 textures).
2022-08-27 14:29:28 -07:00
jp9000
6abf89af21 Revert "libobs: Correctly set texture size"
This reverts commit 90a409fe58.

Reverts #7077 for now. This really shouldn't be done so close to
release. This crash technically only happens under very niche scenarios,
and the fix seems to have some other potential issues. Prematurely
merged by Jim.
2022-08-18 11:04:11 -07:00
tududweb
90a409fe58 libobs: Correctly set texture size
Correctly set texture size according to the frame to be rendered this time.
Fixes the mismatch between frame and texture when async-delay-filter on.
2022-08-18 03:43:22 -07:00
Chip Bradford
eb1cc8d076 libobs: Fix gpu thread termination when additional video mixes are added 2022-08-13 01:33:34 -07:00
Chip Bradford
7e39ee291c libobs: Add support for multiple video mixes
Split render_texture and derived fields in obs_core_video into new
obs_core_video_mix struct. Add new APIs to add additional obs_view to the render loop, each with a separate render_texture / obs_core_video_mix.
2022-07-31 15:35:36 -07:00
jpark37
92d1ca41cc libobs: Fix warnings about type usage 2022-07-11 22:07:10 -07:00
tt2468
bb55cfbc05 libobs: Improve exponential backoff functionality
- Changes the default base exponent value to 1.5 from 2.0
- Applies a random skew of +-0.05 to the exponent to lessen the
"water hammer" effect caused by predictable backoff techniques
- Fixes the logging associated with exponential backoff to log the
true reconnect delay value
2022-06-25 17:06:00 -07:00
jpark37
d233065d60 libobs: Default 10-bit video to sRGB instead of PQ
Matches how VLC operates. HDR is only in effect with proper metadata.
2022-05-17 02:46:52 -07:00
jpark37
2a0d8d1c9c libobs: Add support for reading I420 PQ
Not normally a valid combination, but Xbox writes 8-bit HDR videos.
2022-05-08 14:12:41 -07:00
Jim
952988d9ec
Merge pull request #6231 from mvji/prores_pix_fmt
Add support for GPU conversion of YUV422P10LE, YUV444P12LE, YUVA444P12LE
2022-05-04 02:01:27 -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
jp9000
e3bdb4ca7b libobs: Add ability to use fixed audio buffering
This is in anticipation to adding low audio latency mode, will cause
audio buffering to be fixed rather than dynamically increasing. Having
fixed audio buffering means that audio latency always stays the same
rather than dynamically increasing.
2022-04-24 07:59:10 -07:00
mvji
d3a8ef7128 libobs: Add support for YUV422P10LE, YUV444P12LE, YUVA444P12LE 2022-04-19 19:37:07 +02: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
72224f0fae libobs: Remove redundant async_color_format member 2022-04-13 06:23:35 -07:00
jpark37
06111d5b10 libobs: Add high-precision sRGB support 2022-04-08 17:19:23 -07:00
jpark37
0ed0f2cdb4 libobs: Add I010/P010 support, TRC enum 2022-04-03 00:01:25 -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
87ab39c412 libobs: Render main texture for active color space
Preview will draw SDR white luminance from settings (default 300 nits)
when displayed on an HDR monitor rather than CCCS 80 nits.
2022-03-23 22:35:27 -07:00
jpark37
01c0486aad libobs: Add obs_display_update_color_space 2022-03-23 22:35:26 -07:00
jpark37
cd22df09c9 libobs, UI: Add SDR white nits option 2022-03-23 22:35:26 -07:00
jpark37
c4fb34897e libobs: NV12 textures only for active GPU encoders
Intel GPUs in particular are slow to copy NV12/P010 textures. We can use
ordinary UNORM textures for CPU encoders.
2022-03-19 15:39:09 -07:00
Clayton Groeneveld
3df2f3e069 libobs: Add function to load private sources
If a private source is loaded with the obs_load_source function,
it is loaded as a normal source, so add a new function
to load private sources.
2022-03-08 01:49:24 -08:00