Commit Graph

1602 Commits (9a095bde11a3fb8e0f1033340a1053aa4824e0d6)

Author SHA1 Message Date
Ryan Foster 6c76e9a736 libobs: Log libobs bitness in crash logs 2018-07-31 11:49:35 -04:00
Jim 3fd33478f8
Merge pull request #1345 from TheMuso/fix-input-output-mac-audio-devices
libobs: Rework code for checking Mac audio device capabilities for mo…
2018-07-31 00:33:14 -07:00
jp9000 d13bbe6e59 libobs: Always try to update transform in current thread
Due to the recent change in which scene items now only update their
transforms during the next frame's tick, snapping sources would
sometimes jitter and have incorrect snapping.  This fixes that issue by
reverting to the behavior of updating the transform immediately rather
than deferring the update to the next frame tick, but only on non-group
items.

This should not be done on items that are sub-items of groups because we
rely on the obs_scene_item::update_transform variable to update the
parent group's transform in addition.
2018-07-24 02:41:31 -07:00
jp9000 593345a3b1 libobs: Only update scene item texture on frame tick
Instead of updating the scene item texture any time
update_item_transform() is called, only update it when
obs_scene_item::update_transform is called.  Prevents having to lock the
graphics mutex needlessly.
2018-07-24 02:41:31 -07:00
jp9000 8741bfcb8f libobs: Don't assign variables before if/return 2018-07-24 02:41:31 -07:00
Luke Yelavich f29a4a8145 libobs: Copy the device uid string for mac audio monitor 2018-07-21 09:14:12 +10:00
Luke Yelavich 5c066ed48f libobs: Pass address of cf_uid rather than the contents of cf_uid 2018-07-21 09:14:12 +10:00
Luke Yelavich ddc32aaf1c libobs: Fix setting of audio monitor device on Mac 2018-07-21 09:14:12 +10:00
Luke Yelavich 002696e795 libobs: Rework checking Mac audio device capabilities
As of commit 2eb5a22, CoreAudio devices that use one device handle for
both input and output can no longer be used for audio monitoring. This
commit fixes that.

Tested with the built-in output, a Magewell XI100DUSB-HDMI which is
input only, and a MOTU UltraLite audio interface, which shows as
output/input capable.
2018-07-21 09:14:12 +10: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 d11b05a83d libobs: Defer update of scene item texture
If the scene item crop/filtering is updated, instead of
creating/destroying the item texture on the spot, update it in the
graphics thread to prevent potential race conditions (especially when
the crop function for example could be called from within
obs_scene_enum_items in some situations, which would lock the graphics
and scene mutexes in the wrong order).
2018-07-19 00:53:30 -07:00
jp9000 1aeb87ac52 libobs/util: Don't use assert for darray_push_back_array
Instead, just check to see whether array and num are valid, and if they
are not, safely return.
2018-07-18 18:47:44 -07:00
jp9000 5dfab20a46 libobs: Allow group duplication 2018-07-16 19:03:34 -07:00
jp9000 5993834815 libobs: Change groups to actual public types
(This commit also modifies UI)

Changes groups to their own independent type, "group".  This allows them
to be used like other regular types, and allows the ability to reference
groups in multiple scenes.  Before, a group would always be linked to
the scene it was in.  This made it cumbersome for users to modify groups
if they had a similar group in multiple scenes (they would have to
modify each group in each scene).  Making groups like other source types
makes more sense to solve this issue so they can be referenced in
multiple scenes at once.  This also removes a significant amount of
group-specific handling code required for implementing groups in the
front-end.

One limitation however: due to the way sub-items of groups are
seamlessly modifiable and sortable as part of the whole scene, the user
cannot have multiple references to the same group within one scene.
2018-07-16 19:01:51 -07:00
jp9000 f45247d5c8 libobs: Abstract resize_group to resize_scene_base 2018-07-15 19:01:34 -07:00
jp9000 8f786db5f2 libobs: Refactor creation of scenes
Allows using a different source type (I.E. "group" instead of "scene").
2018-07-15 19:01:28 -07:00
jp9000 35704c4c04 libobs: Remove group_sceneitem from obs_scene struct
(This commit also modifies UI)

Removes obs_scene::group_sceneitem and replaces it with
obs_scene::is_group.  Changes a number of other functions related to
groups so that a group is not inherently tied to a specific scene, and
helps allow a single group to be referenced in multiple scenes if
desired.
2018-07-15 19:01:14 -07:00
jp9000 2329c6f6ea libobs: Add obs_data_array_push_back_array
Allows easily/safely appending all the values of one data array to
another.
2018-07-15 17:09:02 -07:00
Matthew Szatmary a8517f3698 libobs: Update libcaption library
(This commit also modifies deps/libcaption)

Closes obsproject/obs-studio#1354
2018-07-08 01:14:27 -07:00
Hunter L. Allen e3356d5ff6 libobs: Remove unnecessary const qualifier
This function returns a char *, so it should not be const (the value is
set from a function which also returns a char *, so there is no real
reason for this to be const).
2018-07-01 12:03:31 -04:00
Hunter L. Allen f838585b03 libobs: Remove unused variable 2018-07-01 12:03:26 -04:00
Hunter L. Allen b797b97bf6 libobs: Remove unused variable 2018-07-01 12:03:22 -04:00
Hunter L. Allen 31ad26ac3c libobs: Fix equality check
Removes a likely unintentional self-comparison.
2018-07-01 12:03:12 -04:00
Hunter L. Allen 6766565928 libobs: Add missing return type
As declared, transform_val is static inline, but it should be marked as
a static inline void since it does not return.
2018-07-01 12:01:47 -04:00
Hunter L. Allen f78a5426be libobs: Remove unused variable 2018-07-01 12:01:00 -04:00
Hunter L. Allen 294d32aee0 libobs: Change int to size_t
The loop increments i towards an unsigned type, so i should also be an
unsigned type.
2018-07-01 11:58:43 -04:00
Jim f44dc16669
Merge pull request #1319 from Andersama/patch-18
libobs: prevent crash from unbounded copy and bfree
2018-06-19 17:28:42 -07:00
Alex Anderson 7ce217bbc0 libobs: prevent crash from unbounded copy and bfree
Restricts the range of the copy to count number of characters.
Changes function to strip wrapping quotes as intended.
2018-06-19 00:13:55 -07:00
Jim 8dd7024b67
Merge pull request #1325 from exeldro/copy-frame
libobs: add obs_source_frame_copy
2018-06-18 21:31:00 -07:00
Jim 1a31d9097c
Merge pull request #1318 from TheOrsa/fixMonitoringOnOSX
libobs: Fix Monitoring devices showing input devices
2018-06-17 23:02:27 -07:00
Jim 446dc9fd4b
Merge pull request #1310 from vokama/updated-hotkey-names
libobs, UI: reset hotkey description on target rename
2018-06-16 23:09:06 -07:00
Bas van Meel 1653d258fe libobs: add obs_source_frame_copy 2018-06-11 10:03:37 +02:00
Daniel Lopez 4cebbcc23b libobs: Fix compilation issue on case-sensitive filesystems
When using a macOS running on a case-sensitive filesystem, the project
build fails due to AudioToolBox/AudioQueue.h not being found.
The correct path is AudioToolbox/AudioQueue.h. Since macOS comes with a
case-insensitive filesystem by default, this is a rare ocurrence
among developers who change it to be case-sensitive.
2018-06-08 19:06:23 -05:00
Daniel Lopez ceac83e499 libobs: Add check for cf_uid pointer free
This little change skips returning true immediately when a call to
CoreAudio fails. Instead, it uses similar behavior as further 3 calls
below this change, just checking for unfreed pointers before also
returning true.
2018-06-08 19:05:23 -05:00
Daniel Lopez 2eb5a2288a libobs: Fix Monitoring devices showing input devices
This bug fix is to show output devices in the Advanced Audio
Settings configuration, where currently on macOS it shows erroneously
input devices.
2018-06-08 19:03:53 -05:00
Jim 8c0be08040
Merge pull request #1309 from nleseul/effect-arg-modifier
libobs: Handle 'in', 'out', and 'inout' keywords in shader parsers
2018-06-05 15:51:36 -07:00
vokama 4c73e5f6c5 libobs: Update hotkey label on scene item rename 2018-06-05 01:24:42 +03:00
vokama c457630c39 libobs: Enable setting hotkey name and description 2018-06-05 01:23:19 +03:00
Jim b188883966
Merge pull request #1315 from RytoEX/copy-stream-metadata-on-remux
libobs: Copy metadata for tracks/streams when remuxing
2018-06-04 04:52:43 -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 690f738a76 libobs: Add custom size support to scenes
Allows scenes to have a custom size.  Mainly used for grouping, but can
be extended with public API later.
2018-06-03 15:04:39 -07:00
jp9000 f0164f9d28 libobs: Do not signal reorder while scene mutex locked
Prevents a potential race condition with the scene mutex.
2018-06-03 15:04:39 -07:00
jp9000 ff52d34027 libobs: Defer and refactor scene item transform update
Defers updating the scene item transform to the graphics thread to
reduce the number of transform update calls.
2018-06-03 15:04:39 -07:00
jp9000 7a2337c1f2 libobs: Refactor item signaling (add func to signal parent) 2018-06-03 15:04:39 -07:00
jp9000 a1012c3f2c libobs: Do not draw item texture if source size 0 2018-06-03 15:04:39 -07:00
jp9000 b3dfd7ef80 libobs: Fix bug where cropped items would recalc transform
Fixes a bug where items that had cropping would recalculate transform
every frame.  obs_scene_item::last_width and obs_scene_item::last_height
would be set to the cropped sizes rather than the source's actual size.
2018-06-03 15:04:38 -07:00
jp9000 df88140e6a libobs: Zero scene data instead of setting members manually 2018-06-03 15:04:38 -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
jp9000 10fc206f98 libobs: Refactor obs_scene_add to allow adding internally
Allows using obs_scene_add_internal to add without sending signals.
2018-06-03 07:24:59 -07:00
Ryan Foster 797c9d330c libobs: Copy metadata for tracks/streams when remuxing 2018-06-02 10:15:13 -04:00