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

1240 Commits

Author SHA1 Message Date
jp9000
fb1ff173f9 libobs: Fix crash with 4:2:0 async source resolutions
When using GPU conversion for 4:2:0 frames on async video sources, it
would create a texture bigger than necessary and try to copy too much
data from the frame, resulting in a crash.
2016-06-06 23:46:56 -07:00
jp9000
695278dd42 libobs/util: Do not append .so w/ .dylibs on OSX 2016-06-06 23:46:55 -07:00
jp9000
1c37200549 libobs/util: Check for null pointer before calling dlclose
Apparently dlclose can crash if you use it with a null pointer.
2016-05-30 16:03:01 -07:00
hwdro
e3847109be libobs/graphics: Add SSE intrinsics for matrix4_transpose 2016-05-26 22:13:01 -07:00
hwdro
017d77b399 libobs/graphics: Remove redundant variable assignment 2016-05-26 22:12:54 -07:00
jp9000
07a26b1720 libobs: Add more editable list types
(Note: This commit also modifies the UI)

The editable list only had two types: A type that allows both files and
URLS, and a type that only allows strings.

This changes it so the editable list can have a "files only" type, a
"files and URLs" type, and a "strings only" type.
2016-05-26 10:55:51 -07:00
jp9000
cb9ce7547d libobs: Fix bug activating/showing transitions in a tree
When a transition is a sub-source of another source, it would not call
the transition's active source enum function, meaning that any sources
the transition had would not increment their active/showing refs (it
would only be called when activating the transition directly before).
That would result in negative/invalid active/showing refs on its
sub-sources, causing them to become permanently active/inactive and/or
permanently showing/hidden.
2016-05-26 08:13:21 -07:00
jp9000
0c5fd7a0fb libobs/graphics: Always load gif frame if needed
Under certain circumstances it's necessary to seek, but if the frame
isn't loaded for the position that's being seeked to, it won't update
the texture.  This just ensures the texture will update when seeking.
2016-05-26 08:13:21 -07:00
jp9000
fe62658c69 libobs: Recalculate transition transforms when starting
If custom transforms were used, the very first frame after starting
would always render with the previous transform before calculating the
new transform.
2016-05-24 07:30:42 -07:00
jp9000
2f6a10c93f libobs: Fix log message about max memory on 32bit
Sometimes windows will report 2 gigs instead of 4 gigs max.
2016-05-24 07:30:41 -07:00
jp9000
ddc7484a6e libobs: Fix rendering of transitions with fixed sizes
If a transition had a fixed size, it would not render itself or its
sub-sources according to that fixed size.  The fixed size value was
essentially being ignored.
2016-05-24 07:30:41 -07:00
jp9000
9a295a188f libobs: Render transition sub-sources w/ matrix
When a transition is not in the state of transitioning from one source
to another, it would not use the sub-source's assigned matrix to render.
2016-05-24 07:30:40 -07:00
jp9000
1ca1502518 libobs: Set projection matrix for transition renders
This fixes a bug where the sub-sources on a transition wouldn't render
with the expected size when the transition had a different size from its
sub-sources
2016-05-24 07:30:40 -07:00
jp9000
c5008e9c65 libobs: Update version to 0.14.2 2016-05-13 23:00:07 -07:00
jp9000
2741624fbe libobs: Log when a filter is added/removed from a source 2016-05-04 20:29:26 -07:00
jp9000
3cb36bbd51 libobs: Fix deinterlacing discarding flipped status
When rendering the deinterlaced surface, it would not take in to account
whether the async surfaces were marked as flipped or not.
2016-05-01 16:56:21 -07:00
jp9000
7af9c2d882 libobs: Don't prematurely stop transition audio
Transition audio was programmed to stop if there is no queued audio from
both sources.  Because of that, when a source's audio started after the
transition started, it would cause audio from the source to be excluded
from the transition until the transition had completed because the audio
had already been marked as stopped.

Instead, if there's no audio from the transition sources, the audio
should only be marked as stopped when video has stopped.  This allows
the to/from sources to have an opportunity to start/restart audio during
the transition safely.
2016-05-01 15:22:27 -07:00
jp9000
853ec3cba0 libobs: Update to 0.14.1 2016-04-24 16:40:58 -07:00
jp9000
84ce1076f1 libobs: Fix field order of retro/linear 2x shaders
The field orders of retro 2x and linear 2x deinterlace shaders were
inverted.  Note that yadif 2x does not act the same in this regard, its
field ordering is correct due to how it operates.
2016-04-24 01:21:30 -07:00
jp9000
ff99ba7818 libobs: Allow filter processing function to return false
(Note: this commit also modifies the obs-filters and test-input modules)

Changes the obs_source_process_filter_begin return type so that it
returns true/false to indicate that filter processing should or should
not continue (for example if the filter is bypassed or if there's some
other sort of issue that causes the filtering to fail)
2016-04-22 10:18:12 -07:00
jp9000
737a66cb39 libobs: Update version to 0.14.0 2016-04-21 06:19:21 -07:00
jp9000
8a9f1bc7c1 libobs: Fix discard/retro deinterlace equations 2016-04-20 20:13:49 -07:00
jp9000
82a7d795db libobs: Always prune excessive starting audio packets
On outputs that use already-active video/audio encoder, the audio
pruning to sync up audio packets with video packets doesn't always get
called (for example if the video pruning function was called).  Always
prune excess starting audio packets.
2016-04-20 20:13:49 -07:00
jp9000
84ad6b563e libobs: Improve output packet pruning debug message
Specifies whether packets were pruned or not
2016-04-20 20:13:48 -07:00
Richard Stanway
65094eefe4
libobs: Don't try to keep rendering if a texture wasn't allocated
Fixes issues with invalid textures causing huge output or large black
regions to be rendered.
2016-04-21 00:21:07 +02:00
Richard Stanway
1f39b6a612
libobs: Don't use was_down for hotkey detection
From MSDN: "The behavior of the least significant bit of the return value
is retained strictly for compatibility with 16-bit Windows applications
(which are non-preemptive) and should not be relied upon."

This caused problems with hotkeys firing if the user pressed a hotkey key
in another application, followed by the modifier keys at any other time.
OBS would then think the hotkey key was just pressed based on the was_down
behavior and incorrectly trigger a hotkey event.

Fixes 0000443.
2016-04-20 03:46:30 +02:00
jp9000
caa5723c21 libobs: Don't parse sei if sei callback returns 0/NULL 2016-04-19 08:29:25 -07:00
jp9000
1a38d779c9 libobs: Add function to extract AVC header/sei
Allows extraction of headers/sei from a frame so that an encoder can
separate those headers and provide them for later use.
2016-04-19 08:29:24 -07:00
jp9000
cbd13063c6 libobs: Fix another sync issue with encoder sharing
If audio buffering is very high, the audio packets built up in the
interleaved buffer would be significantly before the first video packet,
causing the offset between the starting video/audio packet pairs to be
significantly off, leading to desync.

This issue was not spotted until recently because it only happens when
streaming/recording with same encoders while audio buffering is very
high.
2016-04-18 14:02:57 -07:00
Jim
06889b77ed Merge pull request #536 from AnthonySuper/master
libobs: remove duplicated determinant calculation
2016-04-14 18:57:12 -07:00
jp9000
e38a5c61d3 libobs: Add encoder caps (with deprecated flag)
Allows the ability to mark an encoder as deprecated (such as the media
foundation h264 encoders)
2016-04-13 19:01:06 -07:00
Richard Stanway
bc231eda75
libobs: Fix a race condition when initializing audio sources
The source shouldn't be inserted into obs->data.first_audio_source until it's
fully initialized, or other threads will access source->control and
dereference an uninitialized pointer.
2016-04-13 18:39:24 +02:00
Richard Stanway
a73b09c74e
libobs: Remove various dead code found by static analysis
Detected by Coverity Scan (CID 92178, 92171)
2016-04-13 02:43:11 +02:00
Anthony Super
1fe0743256 libobs: Remove duplicated determinant calculation 2016-04-12 14:31:52 -06:00
jp9000
5920778572 libobs: Add ability to create private services
This is a band-aid solution to be able to create temporary services
without logging them and keep them out of enumeration functions.

This is a band-aid solution -- 'master obs context lists' should not be
kept by the core.  Logging of object creation/destruction should also be
controlled by the front-end instead of the core.
2016-04-10 22:53:15 -07:00
jp9000
8b2173f591 libobs/util: Add double-quote escape value for text lookup 2016-04-10 02:11:03 -07:00
jp9000
ac23ec8359 libobs/util: Fix warning (data type size mismatch)
Fixes warning on Visual Studio 2013:
'initializing' : conversion from 'size_t' to 'int', possible loss of
data
2016-04-09 18:15:47 -07:00
jp9000
2274b57926 libobs: Mark filters as private (band-aid fix)
This patch fixes a specific crash where if the user named a filter the
same name as an input source that already existed in the system, scene
item loading code could find the filter with the same name instead of
the source, and mistakenly use it as the scene item's source directly.
This would cause a crash when trying to render that filter as a regular
source.

Marking filters as private is a temporary and simple workaround to the
solution.  Filters are currently not meant to be found via the main
enumeration/search functions, which is a design flaw (lack of
consistency).  In future major API revisions of libobs, filters should
be reworked to act as sources, with the sources they filter as
sub-sources ideally.

Additionally, the concept of "private context objects" and "primary
lists of context objects" in the back-end should probably also be
removed, allowing the font-end (or optional separate API layers) to
control all primary lists of obs context objects.  These minor issues
that occur ultimately stem from API design flaws which need to be
corrected.
2016-04-09 18:12:50 -07:00
jp9000
f23974ab64 libobs: Fix possible crash with filters
This crash happened when a filter was mistakenly used as a regular
source due to an unrelated bug in filter code and scene loading code.
The filter and the source it belongs to both had the same names, and the
source loading code found the filter and mistakenly used it as the
source instead of the actual source with the same name.
2016-04-09 18:12:49 -07:00
jp9000
822ffb8519 libobs: Add obs_obj_invalid function
Determines whether an obs object was created successfully.  If a plugin
that's used for a saved object is removed (third party plugins), its
data will become invalid, but the objects can often still be created for
the sake of preserving user settings, but sometimes these objects can
cause problems if they're actually used (such as using them for
transitions).
2016-04-03 21:54:02 -07:00
jp9000
81ac57cd6c libobs/util: Add os_stat function (win32 compatibility)
Windows needs filenames to be processed as wide, while libobs operates
on UTF-8, so a windows-specific function is needed here.
2016-04-03 18:02:45 -07:00
jp9000
acd8b612ee libobs: Reset projection transform when cropping
The crop texture would not always render correctly because the
projection matrix had not been set.
2016-03-31 11:01:29 -07:00
jp9000
eb1ee87f38 libobs: Add functions to crop individual scene items
Renders the scene item to a texture if crop is enabled; otherwise
renders directly.
2016-03-30 18:59:36 -07:00
jp9000
0d7a969ebf libobs: Add functions to defer scene item update
Allows the ability to defer updating the item transform until all
functions have been executed.
2016-03-30 18:35:59 -07:00
jp9000
96d848f3d2 libobs: Add premultiplied alpha base effect 2016-03-26 21:41:49 -07:00
sam8641
a7ce53367c libobs: Fix lanczos scaling quality issue
Closes jp9000/obs-studio#526
2016-03-24 12:35:24 -07:00
jpk
c3629eacb5 libobs: Add Y800 color format support
(Note: Also modified the obs-ffmpeg plugin module)

Allows the ability for frame data to pass 8-bit grayscale images (Y800
color format).

Closes jp9000/obs-studio#515
2016-03-24 03:33:35 -07:00
jp9000
07c644c581 libobs: Add deinterlacing API functions
Adds deinterlacing API functions.  Both standard and 2x variants are
supported.  Deinterlacing is set via obs_source_set_deinterlace_mode and
obs_source_set_deinterlace_field_order.

This was implemented in to the core itself because deinterlacing should
happen before effect filters are processed, but after async filters are
processed.  If this were added as a filter, there is the possibility
that a different filter is processed before deinterlacing, which could
mess with the result.  It was also a bit easier to implement this way
due to the fact that that deinterlacing may need to have access to the
previous async frame.

Effects were split in to separate files to reduce load time (especially
for yadif shaders which take a significant amount of time to compile).
2016-03-21 21:22:32 -07:00
jp9000
11d9a8f3e4 libobs: Rename async_convert_texrender to async_texrender 2016-03-21 21:22:31 -07:00
jp9000
9a86a10f91 libobs: Update async textures via function parameters
Instead of just updating the async texture variables directly in the
source, allow the ability to pass the async texture variables via
function parameters to allow the ability to parse more than one frame to
more than one texture.

This code is primarily intended to be used to upload/convert the
"previous" async frame for the deinterlacer (if necessary).
2016-03-21 21:22:31 -07:00