Commit Graph

2097 Commits (979054cc8c8f3d080618c99f20b807c7cf4233e6)

Author SHA1 Message Date
Exeldro 874820ec2f libobs: Don't save removed sources 2020-04-18 08:30:06 +02:00
Exeldro 74b9ae07f3 libobs: Don't allow duplicating scene sources 2020-04-17 12:40:25 +02:00
Colin Edwards b7b202fac7 libobs: Fix plugin folder search path case on macOS 2020-04-16 19:28:00 -05:00
Colin Edwards e3c63c003a libobs: Update version to 25.0.6 (mac release) 2020-04-13 20:41:04 -05: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
Richard Stanway 2d261e79ff
Merge pull request #2663 from khng300/obs-25-fbsd-fix-execpath
libobs/util: Add FreeBSD and Dragonfly support in os_get_executable_path_ptr()
2020-04-10 00:40:46 +02:00
jp9000 e10d44d5f5 libobs: Update version to 25.0.5 (mac release) 2020-04-08 16:21:09 -07:00
Ka Ho Ng ab2743dd23 libobs/util: FreeBSD/Dragonfly exec path support
Add support for FreeBSD and Dragonfly in os_get_executable_path_ptr().
This is required to obtain the path of the running executable image
correctly.

Fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245299
Fixes https://github.com/obsproject/obs-studio/issues/2622
2020-04-08 03:44:40 +08:00
Hans Petter Selasky 0e4ea14ba1 libobs: Implement and use better scaling function for 64-bit integers
As os_gettime_ns() gets large the current scaling methods, mostly by casting
to uint64_t, may lead to numerical overflows. Sweep the code and use
util_mul_div64() where applicable.

Signed-off-by: Hans Petter Selasky <hps@selasky.org>
2020-04-05 20:27:28 +02:00
jp9000 47058d9b69 libobs: Update version to 25.0.4 2020-04-05 03:48:34 -07:00
jp9000 d002345a11 libobs: Fix macOS 10.15 hotkey crash (temporary)
On 10.15, if a user activates secure input of some sort, the hotkey code
will begin to crash inside of any Apple function related to hotkeys,
even after secure input has ended.  This does not appear to be the fault
of OBS; the reason to this is still as of yet unknown, but is suspected
to be a bug inside of Apple code that's a new regression as of 10.15.

So for the time being as a temporary solution to the crash, simply
disable external hotkey support once secure input has been detected.

Because of this issue, the hotkey code should probably be replaced by a
different method of tracking hotkeys, perhaps InstallEventHandler for
example.  This commit is little more than a bandaid to the crash.
2020-03-31 10:40:17 -07:00
jp9000 3c78a8aa8d libobs: Update to 25.0.3 (linux hotfix once again) 2020-03-23 19:16:54 -07:00
jp9000 4e43329269 libobs: Update version to 25.0.2 (linux hotfix) 2020-03-22 09:57:12 -07:00
jpark37 f83c4a8582 libobs: Add move assignment operator for BPtr 2020-03-19 16:18:51 -07:00
jpark37 19c6d06a3b libobs: Fix missing assignment operator return 2020-03-19 14:03:56 -07:00
jpark37 b12ab46e62 libobs: Fix size mismatch warning
memcpy unlikely to exceed 4 GB, but just make VS happy.
2020-03-19 11:22:15 -07:00
jpark37 d383efc065 libobs: Handle noexcept warnings
VC++ wants noexcept for move assignment operators, and move contructors.
2020-03-19 11:20:44 -07:00
jp9000 b19ea6fe35 libobs: Update version to 25.0.1 2020-03-19 09:51:06 -07:00
jp9000 8ecfb405ce Revert "win-capture, libobs: Show names of displays in Display Capture"
This reverts commit 9931f22ff4.
2020-03-19 06:43:57 -07:00
jp9000 2570f22aa4 libobs: Update version to 25.0.0 2020-03-16 13:57:47 -07:00
jp9000 cf0a5e5c97 libobs: Fix audio not playing back with audio lines
The fix for the race condition that was made in 432017b2c also broke
audio lines.  This fixes audio lines and moves the fix to just the case
where it actually applied.
2020-03-15 04:44:47 -07:00
jp9000 563e2434c0 libobs: Reset manual state when forcing transition target
Fixes an issue where the manual transition point would not be reset to 0
when the transition's current target is overridden and explicitly set.
2020-03-14 16:25:46 -07:00
jp9000 360af79db2 Revert "libobs: Add extra reference when source is displayed"
This reverts commit 9cff2ae6bb.
2020-03-14 10:54:37 -07:00
jp9000 7d491c7981 Revert "libobs: Only manipulate input source ref counts"
This reverts commit 6d5bb8b244.
2020-03-14 10:54:37 -07:00
jp9000 934a18625e libobs: Remove repeated semicolons 2020-03-14 10:54:37 -07: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 39d8ea235c libobs: Fix another group id comparison
Fixes a group id comparison where it was comparing the pointer of the
group name rather than the string contents itself, causing it to treat
it as a non-group source.
2020-03-13 08:03:06 -07:00
Richard Stanway 49bd76755b Make cert revocation check fails non-fatal on Win
Instead of erroring out completely when it can't determine if the
certificate is valid, proceed anyway.  This matches how web browsers
treat failed cert revocation checks.  schannel just has somewhat
paranoid defaults.
2020-03-13 07:48:47 -07:00
Richard Stanway 4dfb572547 libobs: Check return value from obs_scene_add_internal
Errors in obs_scene_add_internal would cause a crash as the null item is
passed to various signal handlers.
2020-03-12 00:02:46 +01:00
jp9000 b31c166814 Revert "graphics: libobs-d3d11: Use DXGI_SWAP_EFFECT_FLIP_DISCARD on Windows 10"
This reverts commit 4da73445c3.

This is being reverted because apparently it causes flickering displays
for some people.  Bad drivers or something?  Not sure.  Very annoying.
2020-03-11 09:35:47 -07:00
jp9000 95a920d7ee libobs: Remove legacy libobs data search path 2020-03-10 07:23:10 -07:00
jp9000 8b81b69f14 libobs: Remove legacy module search path 2020-03-10 07:19:45 -07:00
jp9000 432017b2c9 libobs: Don't render audio if context not initialized
Fixes a race where the audio subsystem could call audio render callbacks
before the source was fully initialized.
2020-03-10 07:13:58 -07:00
jp9000 3992bd247c libobs: Fix groups not being recognized as groups
The id of the source was being pointer compared rather than string
compared, so naturally with the source versioning system where the
string is duplicated, the pointers no longer matched.
2020-03-09 17:08:51 -07:00
jp9000 19068c2960 libobs: Handle removed plugins for versioned sources
When someone adds a source and the plugin is removed for whatever
reason, it would cause a crash with the new source versioning system.
This fixes that by ensuring the unversioned id is also backed up along
with the normal id.
2020-03-09 16:53:44 -07:00
jp9000 8d5ab2be3b libobs: Don't return false, return NULL 2020-03-09 16:42:50 -07:00
jp9000 3e01a85d39 libobs: Fix crash when querying versioned id
The wrong array was used, thus it couldn't find "group" or "scene".
2020-03-09 16:37:46 -07:00
Jim 519b3096aa
Merge pull request #2474 from WizardCM/named-display-monitors
Show friendly monitor names on Display Capture on Windows & Projectors
2020-03-09 06:26:52 -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 476c332a41 libobs: Compare scene/group ids by strcmp 2020-03-09 05:57:01 -07:00
Matt Gajownik 9931f22ff4 win-capture, libobs: Show names of displays in Display Capture 2020-03-09 11:13:59 +11:00
jpark37 6d5bb8b244 libobs: Only manipulate input source ref counts
Filters can be hidden without being shown, which can unbalance the ref
count and destroys them prematurely. We really only care about input
sources having a chance to clean up from the render thread from the hide
handler, Windows 10 window capture specifically.
2020-03-06 01:14:38 -08:00
jp9000 b9d6675e2c libobs: Add ability to rotate async sources 2020-03-01 03:39:54 -08:00
jp9000 675530204e libobs/util: Add dll version compare func 2020-02-28 23:48:12 -08:00
jp9000 46c8ef615d libobs/util: Use MAX_PATH for absolute path funcs
Makes these functions a bit more consistent with the rest of the
project.
2020-02-28 23:48:12 -08:00
jp9000 ca4b04754c Revert "libobs: Fix audio keyframe issue"
This reverts commit ff22c20019.

This caused a bug in FTL output, which started hitching after this
commit.  Presumably due to opus; it's likely you're not supposed to do
this with all audio encoders.
2020-02-27 06:44:20 -08:00
Richard Stanway 269ebd2983 libobs: Handle empty path in os_get_path_extension
os_readdir might return an empty path if the OS filename doesn't fit
into the buffer after os_wcs_to_utf8. If this empty path is then passed
to os_get_path_extension it causes a crash.
2020-02-25 21:31:25 +01:00
Jim 267874ad92
Merge pull request #2427 from Rosuav/retry-pipe-write
libobs/util: Retry pipe writes to avoid spurious failures on short write.
2020-02-24 23:41:48 -08:00
jpark37 3703581472 libobs: Pump graphics loop one final time for cleanup 2020-02-23 19:43:10 -08:00
Chris Angelico 664acef494 libobs/util: Retry pipe writes to avoid short-write failures
Previously, any short write would be treated elsewhere as a failure. The
easiest solution is to have pipe_write() automatically retry until either
it's written everything, or it couldn't write anything at all.
2020-02-24 12:29:54 +11:00
jpark37 9cff2ae6bb libobs: Add extra reference when source is displayed
This provides a chance to clean up resources on the graphics thread in
the hide callback, which Windows Graphics Capture requires.
2020-02-22 21:02:33 -08:00
jpark37 82cdc6e8c6 libobs: Pump Win32 messages on the graphics thread
Necessary for upcoming Windows Graphics Capture support.
2020-02-22 21:02:33 -08:00
jpark37 f27f858ab3 libobs: Support device loss registration
Complex external systems using the D3D11 device may need to perform
their own device loss handling, the upcoming Windows Graphics Capture
support for example.
2020-02-22 21:02:33 -08:00
jpark37 82797eb367 libobs: Make ComPtr header self-sufficient
Don't make someone else define IUnknown.
2020-02-22 21:02:33 -08:00
Richard Stanway 862f16285f libobs: Don't strip whitespace from config values
A plugin that saves whitespace-only data would crash OBS on startup as
the whitespace stripping would send the string length negative. While
that bug is fixed in this commit, there is also no good reason that OBS
is stripping whitespace to begin with. All data going into the configs
should be well formed and some plugins legitimately wish to save
whitespace as a config option (eg for search / replace characters).
2020-02-23 04:02:42 +01:00
jp9000 4f6b4df17e UI: Hide encoder if marked internal
(This commit also modifies libobs)

Hides encoders that are marked as internal.  Same general functionality
as DEPRECATED but not actually deprecated, just internal-only.
2020-02-18 21:37:41 -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
Jim d13f204488
Merge pull request #2257 from Xaymar/fix-remove_by_name-corruption
libobs: Don't corrupt obs_properties in ..._remove_by_name
2020-02-15 20:03:58 -08:00
jp9000 6970cc32c2 libobs: Remove unused variable 2020-02-12 18:31:18 -08:00
jp9000 ff22c20019 libobs: Fix audio keyframe issue
Audio packets are always considered keyframe packets, so if they weren't
already, mark them as keyframe packets.
2020-02-12 18:27:42 -08:00
jp9000 94d4bfdb1c libobs: Restore order 2020-02-09 18:36:58 -08:00
Ilya Melamed 9f035e430c libobs: fix obs_sceneitem_group_XXX_item API
`obs_sceneitem_group_add_item` and `obs_Sceneitem_group_remove_item`
were leaving the affected scene in an inconsistent state.

To resolve, simplify and make the code more readable, we replace the
manual linked lists mutation with existing `detach_sceneitem` and
`attach_sceneitem` calls.
2020-02-08 13:17:02 +02:00
Jim e73e76048e
Merge pull request #2382 from jpark37/mac-linker-fix
libobs: Fix Mac linker error
2020-02-07 18:19:37 -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 93e2aa1d00 libobs: Make group subitem add/remove funcs signal refresh
Fixes a bug where the UI would not know that a group had been updated.
2020-02-07 16:44:48 -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
jpark37 85c9ccb753 libobs: Fix Mac linker error
Non-static inline functions don't work for some reason.
2020-02-06 12:51:20 -08:00
Exeldro 5c30f8343e docs/sphinx: add media controls 2020-02-06 18:44:04 +01:00
VodBox d1b6a04afc libobs/util: Fix incorrect assertion in darray_insert_array
Previously the assertion required the idx to be smaller than the number
of elements in the darray. This would mean you could not insert anything
at the end of a darray, and would make it impossible to insert an array
into an empty darray.
2020-02-03 10:44:15 +13: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
Jim b88ea35c34
Merge pull request #2341 from FlyGoat/cross-plat
Add support for MIPS architecture
2020-01-27 04:22:13 -08:00
Jiaxun Yang 6366f6ab59 libobs: Build SIMDE on platforms without SSE2
SIMDE was introduced for aarch64 support, however, the library itself
supports non-SIMD fallback, which allows us provide support to other
platforms without code changes.

There is another world beyond x86. So we can simply enable SIMDE for
processors without SSE2 support.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
2020-01-22 15:41:15 +08:00
Clayton Groeneveld 4e3a0180ba libobs, obs-x264: Fix compiler warnings 2020-01-21 15:18:09 -06:00
Jim 8c549a3223
Merge pull request #2327 from jpark37/srgb-enum-value
libobs: Add VIDEO_CS_SRGB enum value
2020-01-20 22:52:57 -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
Clayton Groeneveld 6a7260783e audio-monitoring: Fix Pulse Audio crash 2020-01-18 10:46:56 -06:00
jpark37 8134a116be libobs: Add VIDEO_CS_SRGB enum value
Can't implement all at once because of AMF submodule.
2020-01-18 08:21:42 -08: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
jpark37 4d6cc442b2 libobs: Add basic support for half floats 2020-01-12 20:02:24 -08:00
jp9000 eadb96fbca libobs: Log windows release version
This logs the Windows release version (e.g. 1809, 1903, etc)
2020-01-04 14:25:28 -08:00
jp9000 de3de2a217 libobs: Find windows version
This uses three methods of obtaining the actual windows version,
RtlGetVersion which is the ntdll version of GetVersionEx that bypasses
the manifest check garbage, looking up the file version of a file that
is most likely to be updated per windows version (ntoskrnl), and the
registry.  Of the three values, it chooses the highest windows version
obtained by the three.

Closes obsproject/obs-studio#2294
2020-01-04 14:23:32 -08:00
pkubaj 03ab727495 CMake: Fix build on ppc64
ppc64le was fixed before, but ppc64 (big-endian) was still failing.
2020-01-04 02:19:38 -08:00
Jim 8af794ceaf
Merge pull request #2276 from WizardCM/monospace-multiline
Add monospace font for multiline text property
2019-12-30 14:22:16 -08:00
Matt Gajownik 62504dc651 libobs/UI: Support monospace font in multiline text property 2019-12-30 10:11:17 +11:00
Jim 4df9ce0cdf
Merge pull request #2251 from jpark37/lut-volume-texture
Use volume textures for LUT filter
2019-12-29 11:04:20 -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
Michael Fabian 'Xaymar' Dirks 77f1b05d28 libobs: Fix corrupted pointers when removing properties
When obs_properties_remove_by_name is called on any obs_properties_t*,
it corrupts the pointers for first_property and last which end up
pointing at either unallocated memory or randomly into the heap memory.
Neither of these is a good thing, and it usually leads to rapid
unscheduled program behavior, also known as crashing and security
issues.

This fixes the issue by first checking if the pointer stored in
props->last is identical to &cur->next, then checking if we are the
only element (cur is also prev element), and if we are then the pointer
is fixed to point back at props->first_property. Additionally fixes
props->first_property which was never updated either.
2019-12-22 08:35:27 +01:00
jp9000 2a1a76b3f1 libobs: Update version to 24.0.6 2019-12-17 12:16:52 -08:00
jpark37 8f6984e345 libobs: Add support for volume textures
Also fix some mip calculations along the way.
2019-12-15 14:38:26 -08:00
Colin Edwards 1819696198 libobs: Null check hotkey device on macos 2019-12-13 23:26:34 -06:00
jp9000 c1522019e0 libobs: Do not include unrelated flags in filter check
Closes obsproject/obs-studio#2224
2019-12-10 09:22:18 -08:00
jp9000 2224ddff61 libobs: Update version to 24.0.5 2019-12-10 00:06:27 -08:00
jpark37 c17397fede libobs: Remove C99 hacks for older VC++ 2019-12-05 18:34:51 -08:00
Ed Maste 97c243fdf9 libobs: add missing FreeBSD #include to fix build
sysctlbyname requires #include <sys/sysctl.h>.  Perhaps this previously
worked due to header pollution that has since been cleaned up in newer
FreeBSD.
2019-11-29 10:51:00 -05:00
Peter Geis 08b1b66439 libobs: fix building modules once installed
sse-intrin.h is a required header now, but the implicit path
breaks building addons once the headers are installed.

Fix this by making the path explicit.
2019-11-27 14:00:15 -05:00
Peter Geis 64d0b7fcb4 libobs: Enable compilation on aarch64
Add arch checks to enable aarch-compat layer on aarch64, retain normal
gcc intrinsics on x86 and ppc64.
2019-11-25 13:04:21 -05:00
Peter Geis f96545acf3 libobs: Add aarch64 compatibility layer
Add a compatibility layer utilizing simde
(https://github.com/nemequ/simde) to allow compilation on aarch64
without modifying existing functions.
2019-11-25 13:04:01 -05:00
Clayton Groeneveld 82ffcdc827 UI: Add source icons 2019-11-24 20:50:42 -08:00
jpark37 66d78275e2 libobs: Robust COM initialization
Qt seems to force STA, so it's misleading to ask for MTA and ignore the
failure result, so just ask for STA. Also, don't uninitialize COM if
initialization failed.
2019-11-24 09:46:41 -08:00
jp9000 c2c049c606 libobs: Remove _WIN32 ifdef from enum
Ensures that hotkeys cannot become invalid if config data is moved over
to another operating system.
2019-11-17 20:30:42 -08:00
Igor Bochkariov ba86eb3bcf libobs: fix new virtual key codes display
this is required as GetKeyNameText does not translate multimedia keys
and custom OEM keys returning nonsensical one char names
2019-11-17 18:07:18 -08:00
Igor Bochkariov d822c07dc3 libobs: add missing virtual key codes for Windows
the missing codes are extracted from WinUser.h header

nameless reserved codes added as hex in case some OEM keyboards send them
2019-11-17 18:07:18 -08:00
Jim def6fcb0ee
Merge pull request #2125 from DDRBoxman/appbundle
Fixes to make OBS work on Catalina
2019-11-13 12:21:13 -08:00
René Rebe fcbe593134 libobs: Add more X.org / Unix hotkey defines 2019-11-09 07:29:16 -08:00
VodBox e8c1ec4035 libobs: Send activate and show signals to filters 2019-11-07 06:19:34 -08:00
jp9000 0a3d2e127f libobs: Fix race condition
It is possible for a GPU encoder to be in a destruction state while
still in the GPU encoder list, although very rare.
2019-11-05 12:02:54 -08:00
Exeldro 478bf7c6af libobs: Add video info to filename formatting 2019-10-22 02:50:13 -07:00
Jim 3e01fdf3e5
Merge pull request #2116 from jpark37/begin-frame
libobs: Add gs_begin_frame for duplicators
2019-10-15 22:23:34 -07: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
Matt Gajownik 51be039cf8 CMake: Build Windows modules with file descriptors 2019-10-15 21:34:12 +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
Colin Edwards 747ce9b77c libobs: Use proper resource paths when running from an OSX bundle 2019-10-13 21:53:43 -05:00
Jim 09c7ec487b
Merge pull request #2064 from jpark37/bgra-swap-chain
D3D swap chain enhancements
2019-10-12 20:54:33 -07:00
Colin Edwards 7e5ba1bde8
Merge pull request #2120 from jpark37/objc-msgsend
libobs: Strict objc_msgSend support
2019-10-12 12:16:17 -05:00
jp9000 d6f9ff0406 Revert "libobs/audio-monitoring: Don't init until used"
This reverts commit 22aa66a6eb.

Apparently, starting audio on the fly like this can introduce latency in
to the audio playback, so for now revert it.  It was a bit of a
precautionary thing rather than an actual fix anyway, so it probably
wasn't all that necessary to begin with.
2019-10-11 23:34:27 -07:00
jpark37 3130d38c9b libobs: Strict objc_msgSend support
Something changed that makes strict the default. Fixed up the code.
2019-10-11 22:17:23 -07:00
jp9000 236ac66121 libobs: Update version to 24.0.3 2019-10-11 17:33:13 -07:00
Jim 76fe77831d
Merge pull request #2037 from cg2121/compiler-warnings
UI, libobs: Fix compiler warnings
2019-10-11 16:38:48 -07:00
jpark37 ade65df2aa libobs: Add gs_begin_frame for duplicators
We really shouldn't be resetting duplicator state as part of gs_flush.
gs_begin_scene is not ideal because it is called twice per frame, and
only after duplicators have been ticked. Even though it makes no
user-facing difference, it makes more logical sense to reset at the top
of the frame than the bottom.
2019-10-10 21:06:01 -07:00
jp9000 c43b273f62 libobs: Update version to 24.0.2 2019-10-10 16:19:45 -07:00
jp9000 254947eaa0 libobs/audio-monitoring: Add error logging
Helps diagnose issues if the user is unable to initialize audio
monitoring for whatever reason.
2019-10-10 02:04:59 -07:00
jp9000 22aa66a6eb libobs/audio-monitoring: Don't init until used
This prevents audio monitoring from actually initializing unless audio
is actually played back through the source.  This prevents many browser
sources from initializing audio monitoring all at once needlessly if
audio is not being rerouted to OBS.
2019-10-10 02:04:58 -07:00
Clayton Groeneveld a55f83a38f UI, libobs: Fix compiler warnings 2019-10-10 00:25:54 -05:00
jp9000 54f4b67843 libobs: Update version to 24.0.1 2019-09-20 00:23:36 -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
jp9000 0048b74ed9 libobs: Update version to 24.0.0 2019-09-17 13:51:40 -07:00
jp9000 abaed69627 libobs: Check to swap BGRX/BGRA in async filters
If for whatever reason the format is swapped between BGRA/BGRX in an
async filter, swap the texture to compensate for that.  This allows
plugins to change the format if necessary.
2019-09-17 13:51:40 -07:00
jpark37 4da73445c3 graphics: libobs-d3d11: Use DXGI_SWAP_EFFECT_FLIP_DISCARD on Windows 10
This is supposed to eliminate a copy by DWM with extra benefits for
borderless fullsceen, which should help the fullscreen projector.
2019-09-06 19:39:42 -07:00
Jim 9a5cb0ae36
Merge pull request #2057 from jpark37/area-downscale-rgb
libobs: Fix Area shaders missing for RGB output
2019-08-31 21:16:58 -07:00
Jim 1523acd726
Merge pull request #2055 from jpark37/video-warnings
Fix video format warnings
2019-08-31 21:16:23 -07:00
Jim 9ef993ad13
Merge pull request #2044 from Palakis/bugfix/output-aoi-access-violation
libobs: add pointer check in reset_raw_output
2019-08-31 21:14:36 -07:00
jp9000 23111c317f libobs: Remove redundant function param and for loop
Originally when the audio_submix function was created, it used all mixer
tracks, but at a certain point that was removed because it can only use
the first track, so some older code was unintentionally left over,
causing the same code to be executed 6 times mistakenly.  This cleans
that up by removing the unnecessary function parameter and for loop.
2019-08-31 01:15:19 -07:00
jp9000 1a72b04951 libobs: Make sure to offset unpause audio data
When an unpause occurs, it takes an audio segment and splits it at the
exact point corresponding to the pause timestamp, and then it's supposed
to only send the ending part of the split.  However, the audio pointers
were not being incremented, therefore it was sending the front of the
audio segment to instead of the back of the audio segment by mistake.
2019-08-31 01:15:19 -07:00
jp9000 03e008fd2e libobs: Fix pause cutting out video data prematurely
When pause has been activated, the video_pause_check() function is used
when receiving raw frames in order to filter out frames that are in the
pause window, that way they aren't sent to the encoder or output.

However, when pause was enabled, it was unintentionally filtering out
some frames before the specified starting timestamp as well, causing
extra video data to get cut out prematurely.  This fixes that issue.
2019-08-31 01:15:19 -07:00
jp9000 f6d1887675 libobs: Fail pause/unpause if still waiting for them
When a pause/unpause occurs, a timestamp is set and the actual
pause/unpause does not occur until the output/encoders reach the
specified timestamps.  Do not allow pausing/unpausing unless that point
has been reached with all encoders of an encoded output or the output
itself when using a raw output.

This fixes a bug where pause data could get corrupted if
pausing/unpausing too fast, because the audio/video encoders aren't
necessarily synchronized and although one encoder may have unpaused, the
other encoder(s) may not have yet.  Checking all encoders first before
allowing a pause/unpause ensures that doesn't occur.
2019-08-31 01:15:19 -07:00
jp9000 df5689d534 libobs: Give a little extra time for pause to start/stop
Audio latency can get really low, and if it's low enough, the timestamp
can be passed by the audio subsystem before it's had a chance to pause
with it.  So instead, make the pause have a little bit of extra delay to
ensure that doesn't occur.
2019-08-31 01:15:18 -07:00
jpark37 9bdb16aa78 libobs: Fix Area shaders missing for RGB output
Area downscale setting currently only works with YUV outputs. This adds
the missing DrawAlphaDivide technique.
2019-08-31 00:25:24 -07:00
jpark37 42bf026a49 libobs: Fix video warnings 2019-08-30 22:13:03 -07:00
jp9000 09fc41cc06 libobs: Use correct pointer
This is not supposed to pass the graphics context pointer -- it's
supposed to pass the device pointer held by the graphics context object.
2019-08-30 00:36:27 -07:00
jp9000 3ef5393d42 libobs: Call debug marker after null check, not before 2019-08-29 21:46:13 -07:00
jp9000 7e77294eed libobs: Don't render scene item texture if it's null 2019-08-29 21:44:34 -07:00
jp9000 bf41fd5a6b libobs: Add graphics API to get graphics object pointer 2019-08-29 12:43:10 -07:00
Jim 6943d9a973
Merge pull request #2047 from jpark37/scale-weights
Bicubic/Lanczos Shader Improvements
2019-08-28 08:47:28 -07:00
jp9000 83e237fec1 libobs: Fix default mixer values
There are 6 mixers, so we want 0x3F for 6 bits, not 0xF which is only 4
bits.
2019-08-26 08:24:02 -07:00
jp9000 0845844e5d libobs: Insert sources to linked lists after creation
This fixes a race condition where the audio/video backends/threads may
start using sources before their obs_source_info::create function has
been called.
2019-08-25 19:19:57 -07:00
jp9000 2557ffce7e libobs: Add missing static to function
This function is not used outside of the source file, so make it static.
2019-08-25 19:19:57 -07:00