Commit Graph

1972 Commits (05fc9c5b784ec1f7e1801452d5fae63cbcdd90c4)

Author SHA1 Message Date
jp9000 05fc9c5b78 libobs: Fix calculation copying aligned textures
Direct3D textures are usually aligned to a specific pitch, so their
internal width is often not equal to the expected output width; this
means that if we want to use it on our texture output, that we must
de-align the texture while copying the texture data.

However, I unintentionally messed up the calculation at some point with
RGBA textures, so the variable size I was supposed to be using was
supposed to be multiplied by 4 (for RGBA), while I was still expecting
single channel data.  So, if the texture width was something like 1332,
the source (directx) texture line size would be somewhere at or above
5328 (because it's RGBA), then destination is at 1332 (YUV luma plane),
and it would unintentionally treat 3996 (or 5328 - 1332) bytes as the
unused alignment data.  So this fixes that miscalculation.
2015-01-14 14:57:27 -08:00
jp9000 0e81b0a2ac libobs-opengl: Use original lib naming for mac/win
On mac and windows, the libraries are always meant to be portable,
therefore the naming convention does not need to change for each
revision.  For linux this makes sense; windows and mac not so much.
2015-01-13 21:38:47 -08:00
Jim 881b3bd52a Merge pull request #332 from fryshorts/xcursor-crash-fix
linux-capture: Fix possible crashes
2015-01-13 18:02:40 -08:00
Carl Fürstenberg 6095e7ef51 Add SOVERSION to libobs-opengl
Because libobs-opengl is a public library, it's customary to have SONAME
embedded in the library file.  Also remove the prefix override and
remove the prefixing "lib" from the output name.  This also requires us
to pass the library file name to dlopen invocations.
2015-01-13 17:51:38 -08:00
fryshorts 35ed828bc2 linux-capture: Fix crash on missing texture
Add a check to the cursor render function to ensure the cursor texture
exists. It seems like it is very unlikely but still possible, that the
first tick which should set the texture might fail. In that case obs
would crash in the render function.
2015-01-13 22:22:39 +01:00
fryshorts e009c7951d linux-capture: Fix possible null dereferences
Add checks for valid pointers when requesting the cursor information and
pixel data.
2015-01-13 22:19:47 +01:00
Jim 6d2226bde8 Merge pull request #326 from azatoth/plugin_lib
use multiarch compatible plugin lib path
2015-01-10 23:50:25 -08:00
jp9000 4ae68b3511 libobs: Whoops, use a 2 here instead of a 3
This file is GPL 2, not GPL 3.
2015-01-10 18:39:57 -08:00
jp9000 f58ca29484 UI: Use config file for color format/space/range
Allows the color format, color space, and color range to be set by the
user.  This will need user interface for in the future, though it'll
have to be an advanced setting that's hidden from the user by default
because I don't feel comfortable exposing this to a typical user.
2015-01-10 18:35:58 -08:00
jp9000 e8f2d1baba win-dshow: Update dshowcapture library to 0.4.2
Previously a DirectShow hardware encoder would get 'stuck' and couldn't
be recreated due to a strange issue with the graph filter not properly
shutting down the encoder.  This would make it so that the user could
only use the encoder once, and then it wouldn't work anymore any time it
was initialized again.  dshowcapture version 0.4.2 ensures that the
encoder can restart properly by manually shutting down the filter graph.
2015-01-10 13:20:46 -08:00
Jim 59dc77446c Merge pull request #327 from TheMuso/master
mac-capture: Add Sound Siphon as a supported audio routing device
2015-01-09 23:47:41 -08:00
Luke Yelavich 8dbb0cff6b mac-capture: Add Sound Siphon as a supported audio routing device
Add support for Static Z Software's Sound Siphon audio routing software
(http://staticz.com/soundsiphon/) which provides more advanced audio routing
possibilities.
2015-01-09 08:12:51 +11:00
Palana 1a53c8ca66 Rename parameters to avoid GLSL keyword conflicts
Refer to https://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.clean.pdf
for a list of current (reserved) keywords.

In the future the shader compiler in libobs-opengl should probably take
care of avoiding those name conflicts (bonus points for transparently
remapping the names of effect parameters)
2015-01-08 01:42:22 +01:00
jp9000 428a7def16 win-capture: Use PSAPI GetProcessImageFileName
If the PSAPI_VERSION macro is not set to 1 when using
GetProcessImageFileName, it will attempt to import it as
K32GetProcessImageFileName from kernel32.dll instead of psapi.dll, which
breaks compatibility with vista and xp.
2015-01-07 05:26:32 -08:00
jp9000 95f0b1065e win-dshow: Change "Device Preferred" text
Changes "Device Preferred" to "Device Default"
2015-01-07 05:23:03 -08:00
jp9000 ccfae7e287 rtmp-services: Fix setting of custom x264 profile
Profile was being set as a bool rather than a string, resulting in an
embarrassing situation where the profile was being set to 'true' rather
than the actual profile name.  ..There really needs to be a compiler
warning for using non-bools as bools.  This is one of the reason I
started using !! to change non-bools to bools.
2015-01-07 03:16:02 -08:00
jp9000 2ce2298d56 libobs: Update to 0.7.2 2015-01-06 16:48:06 -08:00
Carl Fürstenberg 1ba39b08ca use multiarch compatible plugin lib path
use OBS_PLUGIN_DESTINATION instead of hardcoded path for module_bin
2015-01-07 00:15:35 +01:00
jp9000 12d149bd3a libobs: Fix cache overflowing (memory leak)
Fixes a bug where all frames in the cache would get marked as 'in use',
this causing it to continually allocate new frames continually.
2015-01-06 14:29:40 -08:00
jp9000 733398e660 win-capture: Remove Activate/Reactivate text
The Activate button is longer in use, so this text isn't used anymore.
I neglected to remove the text when removing the Activate button.
2015-01-06 02:18:11 -08:00
jp9000 67ed290148 win-capture: Clarify inject helper intervals 2015-01-06 01:55:17 -08:00
jp9000 2e6010b36d win-capture: Use macros for intervals
Having macros that state what these numbers mean is much more ideal than
just having a random number thrown in there, wondering why it was used
and what its purpose is (magic numbers).
2015-01-06 01:41:13 -08:00
jp9000 4f2c48a937 win-capture: Remove game capture 'Activate' button
The activate button is just silly for configuration in retrospect.  It's
confusing to users, and was even confusing to some other developers.
Instead of using an 'Activate' button for game capture every time you
want to capture a window, just make the 'window' list have a default 'no
window' value (empty), and then have it always active when an actual
window is selected.  The way syphon handles this on mac is actually
where I took the idea from (as suggested by Palana).
2015-01-06 01:30:55 -08:00
jp9000 5d30f268a0 libobs: Return NULL on ending property list string
Instead of returning a valid string value when there are no more strings
available in the list, return NULL to indicate failure.  An empty string
should really be allowed to be a valid value for the list.
2015-01-06 01:27:16 -08:00
jp9000 cca34bfb4e win-capture: Fix bug with GDI monitor capture
With the new code that checks to see if the source is visible, I didn't
realize that I actually didn't set the source variable, so it would end
up never actually drawing.
2015-01-05 14:15:34 -08:00
jp9000 6b8b5e5f64 mac-capture: Fix potential crash querying devices
I didn't check to see if the size of the string was 0, when it's 0 it
won't create the converted string and it'll send a null pointer to
CFStringGetCString, causing it to crash.
2015-01-05 14:11:33 -08:00
jp9000 b120f7cc80 libobs: Fix sync bug in new frame handling code
The return value of os_sleepto_ns is true if it waited to the specified
time, and false if the current time is past the specified time.  So it
basically returns true if it successfully waited.

I just didn't check the return value properly here, so it ended up just
setting the count of frames to 1 if overshot, ultimately causing sync
issues.
2015-01-05 14:07:22 -08:00
jp9000 0e2b29b365 win-dshow: Update dshowcapture to 0.4.1 2015-01-05 11:29:24 -08:00
jp9000 c7b3ff6323 libobs: Update to version 0.7.1 2015-01-05 07:07:45 -08:00
Jim a37a94cffb Merge pull request #324 from hwdro/master
Removed an unnecesary setSizeConstraint call
2015-01-05 06:41:10 -08:00
HomeWorld d9ec2128f2 UI: Removed an unnecesary setSizeConstraint call
This setSizeConstraint(QLayout::SetMaximumSize) call
caused the widgets to be improperly sized.
For example: combo boxes with long texts ('big' widget width) not
being completly visible.
2015-01-05 15:41:25 +02:00
Jim 181fe23834 Merge pull request #323 from hwdro/master
Fix properties window size grip position on resize
2015-01-05 04:43:15 -08:00
HomeWorld db3b666df5 UI: Fix properties window size grip position on resize
To have its position updated, QDialog::resizeEvent must
be called.
2015-01-05 14:23:12 +02:00
HomeWorld 24776b7f65 UI: Use SourceListWidget for sources list 2015-01-05 03:39:01 -08:00
HomeWorld 88333b0f47 UI: Add SourceListWidget - QListWidget subclass
The default behavior of QListWidget is to allow double clicks of any
mouse button, but in certain situations/usage cases this can cause
undesirable results.  As an example: when double-clicking with the right
mouse button on an item in the sources list box, it will open up both
the properties window and the context menu.  Not pretty at all.

This subclass filters out double clicks for any mouse button other than
the left mouse button to fix this issue.
2015-01-05 03:38:18 -08:00
jp9000 0f09834c68 win-capture: Change error message for file mapping
If shared memory file mapping fails, I've found that it's somewhat
normal due to something in windows -- usually the capture will always
eventually start up after a few tries.  Only seems to apply to some
games though, for example seems to happen with counterstrike a lot for
some strange reason.  Capture always eventually starts back up though.
I remember seeing this with OBS1 as well in many cases but always
thought it was some sort of fluke
2015-01-05 03:01:20 -08:00
jp9000 c1289b893e win-capture: Log more hooking errors
Adds a few previously-missing log messages that specify the actual
reason why there was an error acquiring the hook, rather than just
saying nothing.
2015-01-05 03:01:20 -08:00
jp9000 e7790ab52c win-capture: Wait before auto-fullscreen hooking
If using the auto-fullscreen feature to hook in to a fullscreen, I found
that if you don't wait a few seconds before initializing the hook that
you can catch the process when it's just starting up and loading
important libraries (especially things such as steam/uplay/etc), which
can cause a little bit of interference with the process and on rare
occasions cause it to crash.

To help prevent the likelihood of that happening, this just makes it so
that the hook waits at least 3 seconds before even attempting to inject
the hook when using auto-fullscreen mode.  After some extensive testing
I haven't had any issues since.
2015-01-05 03:01:19 -08:00
jp9000 69223e3645 win-capture: Retry hooks on most failures
The design to not retry the hooks on most general error is just bad.
There are plenty of legitimate cases where it should retry the hook.

This changes it so that if a general failure occurs or if it isn't
capturing when the inject helper exits, it retries and increases the
length of time between retries.
2015-01-05 03:01:12 -08:00
jp9000 6a0677a407 win-capture: Rename variables for consistency
Variables that track time should not have the name 'interval', they
should have the name 'time' instead so it's crystal clear that the
variable is tracking time.
2015-01-05 02:53:29 -08:00
jp9000 edf9d9f41f win-capture: Add 'retry_interval' variable
Adds a variable 'retry_interval' to game capture that allows the
interval at which game capture checks to update to longer intervals if
the hook initialization has some sort of failure.

The reason why I want to do this is because I don't really like it when
the hook updates too often in failure, it just leads to log file spam
that I feel can be reduced, and it frequent updates feel a bit invasive.
I just generally feel more comfortable reducing the interval at which
the hook retries after failure.
2015-01-05 02:52:57 -08:00
jp9000 272f709d1d win-hook: Fix variable name typo
Was 'error_aqcuiring', now 'error_acquiring'
2015-01-05 02:45:42 -08:00
jp9000 14bcb3ad18 win-capture: Change inject-hook intervals
This makes a minor adjustment to the interval at which the inject helper
tries to post the inject message to the target process.  Only 2 seconds
before, now up to 4 seconds, with the PostThreadMessage called every
half second for the duration.

The reason I did this is because I noticed that on rare occasions that
it wouldn't hook due to the low interval; usually just because the
target process is busy and isn't able to process its message queue, and
therefor the hook wouldn't go through due to the fact that
SetWindowsHookEx won't inject until the set event has occurred.  The
inject helper program would just close before the thread message had
finally been processed, which would cancel the SetWindowsHookEx hooking.
2015-01-05 02:45:41 -08:00
jp9000 e9f8374bf4 UI: Load debug privileges for program
Debug privileges help prevent issues with things like game capture
2015-01-05 02:45:41 -08:00
jp9000 e8002dc9ed UI: Save at regular intervals
Save the file when "start recording" or "start streaming" is clicked,
and also save at every 20 second interval
2015-01-05 02:45:40 -08:00
jp9000 0332cdce1c UI: Remove some trailing whitespace 2015-01-05 02:45:39 -08:00
jp9000 ebc2d4ab11 UI: Implement SaveProject function 2015-01-05 02:45:39 -08:00
jp9000 8a97199072 text-freetype2: Set font log warning to debug only 2015-01-05 02:45:38 -08:00
jp9000 8ba279fa45 libobs-opengl: Change a log message to debug
The anisotropy message isn't particularly useful for users.
2015-01-05 02:45:38 -08:00
jp9000 12011d4380 win-capture: Increase game capture update interval
Instead of checking every 3 seconds whether to hook, check every 2
seconds.  3 seconds felt a bit long to me.
2015-01-05 02:45:37 -08:00