Commit Graph

2460 Commits (b7421aafde796bcdc5ebfd654e580c997ccc9419)

Author SHA1 Message Date
jp9000 699201a06e libobs: Cache effects to prevent shader duplicates
Switching between shaders often can cause a performance hit, so cache
effects so that they persist until the graphics subsystem is destroyed.
2015-03-22 18:38:48 -07:00
jp9000 2abf7b057a libobs-opengl: Fix bug switching render targets
If a render target was switched from one to another and then back
consecutively, the texture would not get reattached at the last point
due to the fact that the cur_render_target variable of the FBO storage
structure would already be set to that texture, and then it would never
get reattached because it thought it was already using that render
target.

So to fix this, any time a render target legitimately changes from one
to another, it sets the cur_render_target and cur_zstencil_buffer
variables of the FBO structure to null.
2015-03-22 18:38:47 -07:00
jp9000 86e56a5c4e libobs-opengl: Do not fail if shader param unused
I encountered a scenario where effects might reference shader parameters
that may not potentially exist, this isn't particularly a bad thing that
needs to return failure.  It just needs to gracefully ignore it.
2015-03-22 18:38:46 -07:00
jp9000 2fa37a1f2e libobs-opengl: Fix render targets being flipped
When render targets are used, they output to the render target inverted
due to the way that opengl works.  This fixes that issue by inverting
the projection matrix so that it renders the image upside down and
inverting the front face from counterclockwise to clockwise.
2015-03-22 18:38:45 -07:00
jp9000 84d16fed8e libobs-opengl: Assign texture units to shader vars
Texture units were not being properly associated with the shader uniform
variables.
2015-03-22 18:38:45 -07:00
jp9000 2a06beea45 test-input: Fix potential lockup in test filter
obs_leave_graphics() may not be properly called if this returns null for
whatever reason.
2015-03-22 18:38:44 -07:00
jp9000 1647674754 test-input: Set test filter to partially green
Mostly used for testing, partially green allows us to gauge whether or
not multiple filters are being properly applied
2015-03-22 18:38:43 -07:00
jp9000 13046145f7 libobs: Fix filter dimension issue
The wrong function was being used to recurse through the filter chain in
obs_source_process_filter, obs_source_get_[width/height] would get the
post-effect dimensions rather than the pre-effect dimensions.
2015-03-22 18:38:40 -07:00
jp9000 95e63992cb libobs: Fix filter rendering bug
The parameters order was wrong; sort of a rare thing to see, but it can
happen, especially when it's a function that's not used very often.
2015-03-22 18:28:12 -07:00
jp9000 76a9c90043 libobs: Clarify filter-related comments
Certain callbacks and API functions were a bit vague on when and how
they were supposed to be used.
2015-03-22 18:28:11 -07:00
jp9000 38cb1ed39b libobs: Make filter_video callback param non-const
The frame is definitely meant to be modifiable if needed, so it
shouldn't be const.  I originally meant for these frames to be
duplicated, but with the source video cache that's both unnecessary and
would reduce performance.
2015-03-22 18:28:11 -07:00
kc5nra 798f38cf72 deps-libff: Fix if hw accel fails to load codec
Fixes a bug where get_format was overloaded by our own version
when forcing the codec to load with a HW decoder and not
reset to the original get_format if it failed to load.
2015-03-22 18:58:49 -05:00
Jim 23bb999470 Merge pull request #376 from SkylerLipthay/feat/blackmagic-decklink-plugin
Blackmagic DeckLink plugin
2015-03-21 19:22:04 -07:00
Skyler Lipthay dd739d1e49 decklink: Add Windows DeckLink project
The code specific to Windows: helps convert `BSTR` instances to
`std::string`s; provides a Windows COM-specific implementation of
`CreateDeckLinkDiscoveryInstance`; aliases CFUUIDGetUUIDBytes,
CFUUIDBytes, and IUnknownUUID (the Linux SDK does this, but for some
reason the Windows SDK does not).
2015-03-21 16:43:16 -07:00
Skyler Lipthay b959f56291 decklink: Add Windows DeckLink SDK
Some changes were made to the stock DeckLink SDK: removed all references
to legacy API headers in DeckLinkAPI.idl; removed all instances of
`importlib("stdole2.tlb");`.
2015-03-21 16:43:00 -07:00
Skyler Lipthay 70f8369ae3 decklink: Add Linux DeckLink project
The code specific to Linux helps convert `const char *` instances to
`std::string`s.
2015-03-21 16:42:59 -07:00
Skyler Lipthay c9ff86dd01 decklink: Add Linux DeckLink SDK 2015-03-21 16:42:42 -07:00
Skyler Lipthay 496031e8c8 decklink: Add Mac DeckLink project
The code specific to Mac OS X helps convert `CFString` instances to
`std::string`s.
2015-03-21 16:42:40 -07:00
Skyler Lipthay fd83f5c85f decklink: Add Mac DeckLink SDK 2015-03-21 16:40:15 -07:00
Skyler Lipthay 4225fa8eee decklink: Add Blackmagic DeckLink capture plugin
This is a cross-platform Blackmagic device capture plugin that makes use
of the manufacturer provided DeckLink SDK.
2015-03-21 16:40:05 -07:00
jp9000 001bfb4a6d libobs: Use nullptr instead of NULL 2015-03-21 16:34:46 -07:00
jp9000 644ac130f8 libobs: Only allow ComQIPtr on windows
ComPtr can be used for things like the DeckLink API, but ComQIPtr has
windows-specific compiler features, so can't be used outside of windows.
2015-03-21 16:34:46 -07:00
jp9000 ee31962b85 Add CMake module to parse IDL files on Windows 2015-03-21 16:34:46 -07:00
Jim caa4e36704 Merge pull request #402 from Radzaquiel/patch-3
Update hitbox.tv ingest servers list
2015-03-21 09:51:37 -07:00
John Bradley aa8363bb87 deps-libff: Fix other multithreaded image decoders
In the same manner that PNG doesn't appear to work properly
with multiple threads, TIFF, JPEG2000 and WEBP also appears
to not render correctly (use of FFmpeg's ff_thread_* routines)
if decode is called before the automatic thread detection
has returned a suggested thread count for the decoder.
2015-03-20 17:51:54 -05:00
John Bradley c78fa63b47 deps-libff: Fix memory leak in ff_demuxer_reset
The reset method unnecessarily malloced a packet passed into
the packet buffer which does a dereferencing copy.
2015-03-20 17:14:23 -05:00
Jim 9bc0d5a0c2 Merge pull request #399 from kc5nra/frame-dropping
FFmpeg source updates: Clock chaining, frame dropping and friends
2015-03-19 14:52:25 -07:00
John Bradley d69f03c6a5 obs-ffmpeg: Use deferred update flag for properties 2015-03-19 16:02:24 -05:00
jp9000 dc36f6f420 UI: Implement deferred update flag (properties) 2015-03-19 15:57:19 -05:00
jp9000 ef4ee1fd1a libobs: Implement flags for properties
OBS_PROPERTIES_DEFER_UPDATE: Makes it so the properties are not updated
until editing of the properties is complete.
2015-03-19 15:57:03 -05:00
John Bradley c539c16ecc obs-ffmpeg: Instead of failing with unsupported CS, use default 2015-03-19 14:40:24 -05:00
John Bradley 52aae96f74 obs-ffmpeg: Add alias of CS601 support 2015-03-19 14:40:24 -05:00
John Bradley 5465fcb4a2 deps-libff: Initialize FFmpeg network
If this is omitted and you use an input that requires the network
you get a warning message about future versions not automatically
doing this for you.
2015-03-19 14:40:24 -05:00
John Bradley b2d5b47833 deps-libff: Remove extra whitespace 2015-03-19 14:40:24 -05:00
John Bradley f8c38d1fcf deps-libff: Remove misleading comment 2015-03-19 14:40:24 -05:00
John Bradley 312d59da02 deps-libff: Fix comment formatting 2015-03-19 14:40:24 -05:00
John Bradley 17f8e3c58b obs-ffmpeg: Add frame drop controls to the ffmpeg source UI 2015-03-19 14:40:24 -05:00
John Bradley 3628d3402d deps-libff: Add frame dropping
This, if set, instructs the decoders to drop
frames if a specific timing window is not met.
2015-03-19 14:40:24 -05:00
John Bradley 6b36d39345 deps-libff: Add clock chaining to packets/frames
This attaches clocks to packets and frames and defers
the start time until that particular frame is presented.
Any packets/frames in the future with the same clock
will reference that start time.

This fixes issues when there are multiple start times
in a large buffer (looped video/images/audio) and different
frames need different reference clocks to present correctly.
2015-03-19 14:40:24 -05:00
John Bradley a5e0462a88 deps-libff: set master clock sync type based on default stream 2015-03-19 14:40:24 -05:00
John Bradley 6e42f38386 deps-libff: Add master/slave deferred clock methods
Enables clocks to wait if the main sync clock has not been started yet.  An example of this is a video stream (video/audio) being synced to the video clock.  If an audio frame gets produced before the video clock has started it will wait.
2015-03-19 14:40:19 -05:00
John Bradley 5b3190593c deps-libff: Add reference counting to clock
Add referencing counting to determine when to release a clock Due to no fixed ownership of clocks (packets, frames, decoders and  refresh thread all may own a clock at some point).
2015-03-19 11:56:00 -05:00
kc5nra 164cbeeede deps-libff: Add atomic long inc/dec functions 2015-03-19 11:56:00 -05:00
John Bradley 47783f26c7 deps-libff: Abort timer thread instead of cancelling 2015-03-19 11:56:00 -05:00
John Bradley 7a4a5e3fad deps-libff: Move timer callback outside of lock 2015-03-19 11:55:51 -05:00
John Bradley d9fe44f021 deps-libff: Only sleep if the timed wait didn't expire 2015-03-19 11:55:43 -05:00
John Bradley de574e99e3 deps-libff: Fix bug where rel time was used instead of abs
The bug was undetected because it accidentally fell into an error case that slept the correct amount of time.  pthread_cond_timedwait takes an absolute time in the future to wait until.  The value we were passing was always in the past so it was immediately failing with a TIMEDOUT error code.
2015-03-19 11:55:23 -05:00
John Bradley 2b3d82aeac deps-libff: Add flag whether a decoder is hardware accelerated
This lets the decoder make decisions based on whether it is a hardware decoder or not.  Specifically, hardware decoders are more strict as to which frames can be dropped in an h264 stream.
2015-03-19 11:54:53 -05:00
John Bradley b91a98ed44 deps-libff: Refactor AVPacket into ff_packet
This also replaces AVPacketList with ff_packet_list.
2015-03-19 11:54:51 -05:00
John Bradley a7e81d6f3f deps-libff: (unsigned char *) -> (uint8_t *) cast fix 2015-03-19 11:53:13 -05:00