Commit Graph

4378 Commits (8b640fae24b4c34be12d9e6e55b008038c4cadac)

Author SHA1 Message Date
jp9000 521c40460e libobs: Fix bug drawing RGB/BGR async sources
Commit 53955301a2 introduced a async source texture copy bug due to
creating a new case in a switch without adding a break to the one above
it, causing it to execute both cases by mistake.
2016-12-21 20:11:31 -08:00
jp9000 cef4cba576 obs-ffmpeg: Fix nvenc_h264 deprecated message
The encoder name was changed from "nvenc_h264" to "h264_nvenc", and will
throw a warning in the log file if you use the former, so try the latter
first, then the former.
2016-12-21 19:27:55 -08:00
jp9000 c11572fddf UI: Clarify startup error messages related to video 2016-12-21 19:22:16 -08:00
jp9000 2df7e16b44 UI: Use 64bit desktop link by default in installer 2016-12-21 18:43:52 -08:00
jp9000 005fd823cb UI: Fix endif in installer 2016-12-21 18:43:30 -08:00
jp9000 09a12fcf98 UI: Update locale for 6 tracks 2016-12-21 17:41:59 -08:00
jp9000 c4ec1bc28a UI: Increase maximum audio tracks to 6 2016-12-21 17:14:24 -08:00
jp9000 f10e2c6740 libobs: Increase maximum audio tracks to 6 2016-12-21 17:13:19 -08:00
jp9000 8cc5f8de55 libobs-d3d11: Don't crash if unable to rebuild shared texture
When rebuilding the graphics subsystem, it's possible a shared texture
may no longer be available.  In this case, just soft fail and allow the
texture to be rebuilt rather than crash the entire program over it.
2016-12-21 16:09:12 -08:00
jp9000 c4580ac6ba obs-text: Do not reset blend state
Similar to the parent commit, do not reset the blend state if the source
is not marked as a custom drawn source.  Filters applied won't have the
correct blend state and the alpha edges of the text will be partially
black.
2016-12-21 15:31:13 -08:00
jp9000 922e1d23f9 image-source: Do not change blend state
The blend state does not need to (and should not) be changed.  This
fixes an issue where if filters are applied to an image source, the
image source will paint incorrectly.
2016-12-21 15:26:33 -08:00
Cephas Reis d4cd14b05c obs-filters: Improve "Color Correction" filter
Replaces the "Color Correction" filter with a newer version that uses a
matrix, adds hue and saturation, and improves the contrast option.

Closes jp9000/obs-studio#708
2016-12-20 23:08:00 -08:00
Jim 94a1b0eaef Merge pull request #710 from Xaymar/feature_amd-encoder
enc-amf: Update to version 1.4.3.4 for AMD Driver 16.12.1
2016-12-20 22:46:28 -08:00
Michael Fabian Dirks 6bf1a033af enc-amf: Update to 1.4.3.4 for AMD Driver 16.12.1 2016-12-21 04:47:41 +01:00
cg2121 9f0c48d9c7 UI: Add import/export of scene collections & profiles
Closes jp9000/obs-studio#721
2016-12-19 04:44:57 -08:00
Ryan Foster 42a646f28e UI: Add ability to copy-paste scene item transforms
This commit adds the ability to copy a scene item's transform and crop
settings and paste those settings onto another scene item in any scene
or scene collection. It also changes the menu shortcut key for the
Transform action "Center to screen" from "C" to "n" because "C" is the
standard shortcut key for "Copy" in most other applications.

Closes jp9000/obs-studio#719
2016-12-18 17:21:58 -08:00
SuslikV ee019c7761 UI: Make close button default in transform dialog
Improves ease of use.

Closes jp9000/obs-studio#731
2016-12-18 06:28:08 -08:00
Autumin 0ff4feab02 libobs/graphics: Fix the 2D vector dot product func
The operators were unintentionally reversed.

Closes jp9000/obs-studio#724
2016-12-18 06:20:24 -08:00
shiina424 0d5a23d5f7 obs-ffmpeg: Don't allow 32kb/s with FFmpeg AAC encoder
FFmpeg's AAC encoder is unideal at very low bitrates.

Closes jp9000/obs-studio#722
2016-12-18 06:16:16 -08:00
jp9000 53955301a2 libobs: Fix line size issue when copying Y800 data 2016-12-17 22:53:52 -08:00
jp9000 919aecfd62 libobs: Fix format not being set for new source frames
With the previous Y800 fix a bug was introduced where the format for the
destination frame wouldn't be set if it wasn't Y800, causing a crash.
2016-12-17 21:56:10 -08:00
Michael Fabian Dirks db7632e7fd UI: Use dedicated GPU on Hybrid AMD GPU systems
This enables use of the dedicated GPUs for AMD PowerXpress systems.
Especially important for Adapter selection, as usually the dedicated GPU
is hidden/inactive until needed.

Closes jp9000/obs-studio#706
2016-12-17 20:06:39 -08:00
jp9000 85269fb5b2 libobs: Convert Y800 to RGBX manually
Because D3D11 specifically does not support an L8 texture format (you
have to use a shader swizzle), manually convert Y800 signals to RGBX
instead.  This also fixes a bug where Y800 signals will render red.

Closes jp9000/obs-studio#718
2016-12-17 19:58:01 -08:00
Jim 4b8411fa4d Merge pull request #716 from flash0110/ui_fix-frontend-api-scene-added
UI: Fix frontend-api event call for adding scenes
2016-12-17 18:59:40 -08:00
jp9000 580f38a733 UI: Remove deleteLater view from filter window layout
In the filters dialog, when the properties are being updated due to
filters being added/removed/switched, using deleteLater on the previous
view would cause it to linger in the view until the deleteLater is
processed by the Qt queue, displaying two views instead of one.
Additionally because of that, this would also cause the display in the
filters dialog to resize as well, causing the reorder mutex hard lock
which was fixed by the parent commit.

Closes jp9000/obs-studio#714
2016-12-17 15:32:19 -08:00
jp9000 e541e170a3 libobs: Fix possible reverse order mutex hard lock
For displays, instead of using the draw_callbacks_mutex and risk a
reverse mutual lock scenario, use a separate mutex to lock display size
data.

This bug was exposed when trying to reorder filters in the UI module.
The UI thread would try to reorder the filters, locking the filter mutex
of the source, and then the reorder would signal the UI to resize the
display, so the display would lock its draw_callbacks_mutex.  Then, in
the graphics thread, it would lock the display's draw_callbacks_mutex,
try to draw the source, and then the source would try to lock that same
filter mutex.

A mutex trace:
UI thread -> lock source filter mutex -> waiting on display mutex
graphics thread -> lock display mutex -> waiting on source filter mutex

Closes jp9000/obs-studio#714
2016-12-17 15:21:00 -08:00
vic 7db00a18fa UI: Fix property name bug in frontend API
This commit fixes a bug that would cause the frontend API function
obs_frontend_set_current_scene_collection to never be successful.  Due
to the bug, the following null pointer check would always fail, so the
action would never be triggered.

Modification by Jim: Instead of fixing the typo that caused this to
occur, make it so both scene collection menus and profile menus both use
"file_name" consistently.

Closes jp9000/obs-studio#712
2016-12-16 16:43:12 -08:00
Jim 3869f6dbc2 Merge pull request #709 from kkartaltepe/libff-allow-options
libff: Allow custom demuxer options
2016-12-16 16:25:34 -08:00
jp9000 68a8a5bf2b win-capture: Do not fall back to other windows for UWP windows
If capturing a UWP window, do not fall back to matching windows with the
same window class if the exact window is not found, as this will get any
other UWP window on the system (due to the fact that they all have the
same window class name).
2016-12-16 14:06:05 -08:00
jp9000 4f4aea4562 win-capture: Add debug messages when hooking
These are helpful for debugging UWP capture issues.
2016-12-16 14:06:04 -08:00
jp9000 61773bcbf2 win-capture: Fix cursor not painting with UWP windows
Because the hook cannot get the window handle of UWP windows, fall back
to using the window handle stored in the game capture source itself if
it's unavailable from the hook.
2016-12-16 14:06:03 -08:00
jp9000 b3119e0a8d win-capture: Don't hard fail if thread ID not found
Under certain circumstances, the program may not be able to acquire the
window thread ID for a UWP process, but will be able to acquire the
process ID.  In this case, it should soft fail and retry, rather than
assume it's unacquirable and stop trying to reacquire.
2016-12-16 14:06:02 -08:00
jp9000 a5337605cd win-capture: Add ApplicationFrameHost to game capture blacklist
The ApplicationFrameHost process is a sandbox process, and should not be
hooked.
2016-12-16 14:06:01 -08:00
jp9000 480d0e986f win-capture: Fix "attempting to hook [executable]" message
The "attempting to hook [executable]" message would not display the
correct executable if it's fallen back to a different window with the
same window class.
2016-12-16 14:06:00 -08:00
jp9000 209bcda1f4 win-capture: Wait a few frames for hook to load
Now that the game capture hook creates and controls all the
synchronization objects, it's no longer possible to expect that the hook
is fully loaded by the time game capture tries to initialize it.  In
that case, allow game capture to retry the hook for a few frames before
assuming something failed.
2016-12-16 14:05:59 -08:00
jp9000 bddd9766ac win-capture: Don't hook suspended processes
Remote threads in suspended processes will also start up suspended, so
do not attempt to hook suspended processes.
2016-12-16 14:05:58 -08:00
jp9000 e29638ebf9 win-capture: Log plugin-side when capture successful/lost 2016-12-16 14:05:57 -08:00
jp9000 d4a99e062b win-capture: Output hook debug messages if addresses missing 2016-12-16 14:05:57 -08:00
jp9000 926b9c5f96 win-capture: Open UWP named objects with helper functions
This detects whether the target process is a UWP process, and then uses
the open_app_* functions for mutexes/events/mapping.  Also slightly
refactors named object open functions.
2016-12-16 14:05:56 -08:00
jp9000 aeb1d7ae1b win-capture: Add ability to open UWP named kernel objects
The only way to open named kernel objects within a UWP "app" is to get
the AppContainer SID, and then open the objects with their full
system namespace names via undocumented NT functions.
2016-12-16 14:05:55 -08:00
jp9000 b5f216ef88 win-capture: Use wide strings for named objects
Prevents from having to mix ansi/wide string usage for opening UWP
programs.
2016-12-16 02:21:10 -08:00
jp9000 c63bb17b08 win-capture: Remove redundant function
This function now already exists elsewhere -- open_event_plus_id.
2016-12-16 02:21:09 -08:00
jp9000 ec4c05f406 win-capture: Don't use "Local\" for game capture shared mem
The "Local\" prefix effectively does nothing.
2016-12-16 02:21:08 -08:00
jp9000 ab9bda52e0 win-capture: Create all named objects within hook
All named objects (including file mapped shared memory) need to be
created within the hook itself due to the fact that UWP programs cannot
access named objects outside of the UWP process.

Because shared memory needs to be created within the hook, the capture
loop cannot start until the shared memory has been filled with valid
data.  Creating an additional "initialize" event fixes this issue.

Additionally, changed the way that named kernel objects are
opened/created.  Before, there were functions that would first try to
open named objects and then implicitly create them if opening failed
(assuming that if the hook didn't create it first, game capture would),
now it's been changed so that you can only either explicitly open or
create.
2016-12-16 02:21:07 -08:00
jp9000 d19342442f win-capture: Use window for keepalive check
To check to make sure game capture is still active in the capture
program, it currently uses a named event, and then it checks to see if
that named event exists.  However with UWP programs, you can't open a
named event outside of the UWP process.  FindWindow on the other hand
does work, so instead of checking to see if a named kernel object
exists, create a window and check to see if that window exists.
2016-12-16 02:21:06 -08:00
jp9000 1e48b522fa win-capture: Fix getting proper UWP window handles
The "main" windows detected for UWP programs are basically to help
sandbox the programs -- they run in the ApplicationFrameHost process and
help reduce the possibility of other programs trying to access the
actual process window, which is a child window.

To bypass this, go through the list of child windows for the
ApplicationFrameHost window, and then find the one that's attached to
a different process; that different process will always be the target,
and will allows us to open the actual process of the UWP program.
2016-12-16 02:21:05 -08:00
jp9000 4ec1033741 win-capture: Do not require pipe/mutex within hook
Named pipes cannot be used within UWP programs, so make them optional.
2016-12-15 13:03:44 -08:00
jp9000 746061fb3a win-capture: Always use minimal access rights within hook
This prevents issues with opening handles to objects within UWP
programs, which have increased security limitations.
2016-12-15 13:03:42 -08:00
jp9000 e148087636 win-capture: Only duplicate to get cur thread handle
Instead of calling OpenThread, use DuplicateHandle with the minimal
access rights (SYNCHRONIZE) to be able to get the current thread handle
within a UWP program.
2016-12-12 08:10:06 -08:00
jp9000 1865285ccb UI: Fix replay buffer compile issues on older compilers 2016-12-11 21:04:58 -08:00