944 Commits

Author SHA1 Message Date
jp9000
2591f24594 win-capture: Add game capture fix for darkest dungeon
Darkest dungeon uses an unusual technique for drawing its frames: a
fixed 1920x1080 frame buffer used in place of the backbuffer, which is
then stretched to fit the size of the screen (whether the screen is
bigger or smaller than the actual texture).

The custom frame would cause glReadBuffer to initially fail with an
error.  When this happens, their custom frame buffer is in use, so all
that needs to be done is simply reset the capture and force the current
output size to 1920x1080 while that custom frame is in use.

They presumably did this in order to ensure the game looks the same at
any resolution.  Instead of having to use power-of-two sprites and
mipmaps for every single game sprite and stretch/skew each of them
(which would risk the final output "not looking quite right" at
different resolutions), they simply use non-pow-2 sprites with no
mipmaps and render them all on to one texture of a fixed size and then
stretch that final output texture.  That ensures that the actual
composite of the game still looks the same at any resolution, while
reducing texture memory by not requiring each sprite to use a
power-of-two texture and mipmaps.
2016-01-26 11:49:28 -08:00
jp9000
7f0f3d25c9 obs-ffmpeg: Remove overly verbose FFmpeg logging
For the time being, FFmpeg logging is disabled due to the fact that it
can just output way too much data.
2016-01-26 11:49:27 -08:00
jp9000
22885713b0 obs-ffmpeg: Add "restart when active" media source property
Adds the option of making the media file restart when the source becomes
active (such as switching to a scene with it).

Due to lack of libff features to start/stop/pause/seek media files,
currently this just destroys the demuxer and recreates it.  Ideally,
libff should have some functions to allow a more optimal means of doing
those things.
2016-01-26 11:49:26 -08:00
jp9000
419d6b1a22 obs-ffmpeg: Refactor media source properties
Reactors a bit of code related to starting up FFmpeg and makes it so the
initial view for the media source's properties displays the most
commonly desired settings.

Instead of the media source properties showing the URL mode by default
along with a whole bunch of properties that are confusing to most users,
starts on file mode and changes defaults to be a bit more sensible
related to file input.

Also, as a temporary measure for fixing color format issues (some video
files would display their color information incorrectly), forced format
conversion is now enabled by default, and has been moved to advanced
settings.  Ideally, the actual bug causing color format issues in either
media-io or libff should be fixed at some point.
2016-01-26 11:49:26 -08:00
jp9000
df4f0c4142 obs-ffmpeg: Fix media source file filter
When browsing for a file, it would also just use *.* for the file
filter, which is a pain to use.  This has been changed to use a
reasonable file filter related to common video/audio files so you don't
have to wade through non-media files just to select a media file.  A
filter to show all files is still available as well.
2016-01-26 11:49:25 -08:00
jp9000
bd6ffd76d0 obs-filters: Make mask filter use gs_image_t helper
Prevents it from loading the entire image in the graphics thread, and
allows for animated gifs in the filter (not that anyone would ever do
that.  ..right?)
2016-01-26 11:49:24 -08:00
jp9000
4f782f2415 obs-filters: Make mask/blend image center w/aspect by default
Fixes what is arguably the most annoying feature of the mask/blend
filter, the fact that the image always stretches to the entire source.
It now centers and preserves aspect ratio by default, with an option to
make it stretch and discard aspect ratio to make it operate as it did
before.
2016-01-26 11:49:23 -08:00
jp9000
423f5ea1fc image-source: Use gs_image_file (adds animated gif support) 2016-01-26 11:49:22 -08:00
jp9000
ebadd359c0 image-source: Have images not unload by default
Images continually loading/unloading every time transitioning occurs
adds a lot of unnecessary transition lag.  The user can always change
this value manually and/or use scene collections, so change the default
setting to make it not unload/reload by default feels a bit more safe.
2016-01-26 11:49:21 -08:00
jp9000
756fec3503 linux-capture: Clear x events when exiting handler
This is probably not necessary but might fix an issue where errors pass
through to other parts of the program, possibly causing the crash on
exit related to the xcomposite capture.
2016-01-26 11:49:21 -08:00
Lucian Poston
c392164f03 linux-capture: Log warning when unable to query windows
Checks whether window manager supports ewmh. Logs warning if ewmh is not
supported.

Closes jp9000/obs-studio#488
2016-01-26 11:49:20 -08:00
Gol-D-Ace
37ce829511 rtmp-services: Update Twitch ingests 2016-01-15 08:12:31 +01:00
Gol-D-Ace
f80fced014 rtmp-services: Update recommended hitbox settings 2015-12-27 06:14:50 +01:00
jp9000
2c8edb8a8a win-capture: Clear GL error flag before initializing capture
Some games don't catch GL errors via glGetError, so there's a
possibility that an error will pass through to the capture calls,
causing a false failure.

The most simple solution is to just clear the error flag on each capture
call.
2015-12-10 15:54:30 -08:00
jp9000
deca80531e win-capture: Add hook exception for Just Cause 3 2015-12-03 17:19:35 -08:00
Palana
d870bbb643 obs-ffmpeg: Add custom muxer options to ffmpeg-mux 2015-11-27 15:48:24 +01:00
Palana
38c9c38b9f obs-ffmpeg: Set mux output context filename
This enables e.g. the HLS muxer to output all files in the same directory, with
appropriate names
2015-11-27 15:37:59 +01:00
jp9000
1bbb18ea3d obs-filters: Mark unused parameter 2015-11-20 14:31:01 -08:00
jp9000
78d5e27abe obs-filters: Reset cx/cy/mul/add crop vals in tick, not render
To first render the filter, the width/height values must be set, but
currently they're only set in the render function, which means that the
crop filter can never be rendered when the program first starts up.
This would cause the filter to fail to render at all under those
circumstances.

This patch moves the calculations from render to tick to ensure that
they're always called and the values are always set.
2015-11-20 14:07:14 -08:00
jp9000
50c61898d0 win-capture: Fall back to creating d3d contexts if offsets bad 2015-11-20 14:07:14 -08:00
jp9000
1755511b2f win-capture: Hook Reset/ResetEx in Present* funcs
The virtual address table values for Reset/ResetEx can sometimes point
to functions that are in libraries outside of D3D8.dll and D3D9.dll, and
will cause a crash if used.  Instead, just hook Reset/ResetEx when one
of the Present* functions are called.
2015-11-20 14:06:37 -08:00
jp9000
d510b629c9 obs-outputs: Fix "sometimes uninitialized" warning
Fixes warning (clang):

variable 'added_packet' is used uninitialized whenever 'if' condition is
false [-Wsometimes-uninitialized]
2015-11-18 14:12:54 -08:00
jp9000
f0cf699c50 obs-outputs: Remove stop thread (unnecessary)
Since the RTMP_Close was moved to the send thread (where it should have
been) the stop thread now has no real purpose.
2015-11-18 14:00:28 -08:00
jp9000
f05f0592e0 obs-outputs: Don't allow new data if disconnected 2015-11-18 12:42:14 -08:00
jp9000
6a27da9bd7 obs-outputs: Use atomic load functions 2015-11-18 12:42:14 -08:00
jp9000
ba7b53f330 obs-outputs: Close stream in send thread 2015-11-18 07:49:51 -08:00
jp9000
ee55dafe24 obs-outputs: Atomically update 'active' variable 2015-11-18 07:48:27 -08:00
jp9000
07254d0390 obs-outputs: Call free_packets in init_connect
This may end up being a bit redundant, but it's just to ensure that the
packet buffer is free before connecting.
2015-11-17 07:51:46 -08:00
jp9000
d4df6c191f obs-outputs: Only log packets remaining if above 0 2015-11-17 07:49:05 -08:00
jp9000
226337a6ca obs-outputs: Check for recv error 2015-11-16 13:57:06 -08:00
Gol-D-Ace
2ee1d82860 Add latest translations from Crowdin 2015-11-16 21:04:55 +01:00
jp9000
7634d1099c win-capture: Add new game capture patches 2015-11-14 14:25:17 -08:00
Palana
fa2311bc4a mac-avcapture: Add color space/video range properties 2015-11-14 17:54:18 +01:00
Palana
3d558d65ba mac-avcapture: Add manual configuration
Currently supported settings:
- Resolution
- Frame rate
- Input format
2015-11-14 15:57:21 +01:00
Palana
520f300f0e mac-avcapture: Refactor code 2015-11-14 15:57:21 +01:00
Palana
b4928a62ad mac-avcapture: Move preset properties initialization 2015-11-14 15:34:46 +01:00
Palana
4d9bd7187b mac-avcapture: Remove obsolete UNUSED_PARAMETER marker 2015-11-14 15:34:46 +01:00
Palana
8a21668477 mac-avcapture: Allow deselecting capture devices 2015-11-14 15:34:46 +01:00
Palana
d1468c186c mac-avcapture: Clear output when capture is stopped 2015-11-14 15:34:46 +01:00
Palana
f3c33c232d mac-avcapture: Improve logging (less LOG_ERRORs) 2015-11-14 15:34:46 +01:00
Palana
5eb5453fcc mac-avcapture: Move to (Objective) C++ + ARC 2015-11-14 15:34:46 +01:00
Palana
8d90c8a44e mac-avcapture: Remove unnecesary file 2015-11-14 15:34:46 +01:00
Palana
404d600d53 mac-avcapture: Remove unused includes 2015-11-14 15:34:46 +01:00
jp9000
ea69f9cf61 obs-outputs: Call recv when data received
Not calling recv when data is received will accumulate data in the
internal recveive buffer until it's full, in which case is will stop
acknowledging.  This can lead to unjustified disconnections.
2015-11-11 17:45:02 -08:00
jp9000
a6b69a0704 obs-outputs: Log network interface information (win32) 2015-11-11 16:52:48 -08:00
Richard Stanway
3474c61085 win-capture: Use MEM_RESERVE to comply with VirtualAllocEx spec 2015-11-06 18:16:29 +01:00
jp9000
b7f64c7482 obs-outputs: Use atomic bool functions 2015-11-03 15:03:40 -08:00
jp9000
40250a62f0 obs-outputs: Remove unnecessary variable
The 'stopping' variable is superfluous due to the fact that 'stop_event'
accomplishes essentially the same exact thing.
2015-11-02 18:36:09 -08:00
jp9000
730132853a obs-outputs: Join with correct thread on destroy
If there was an attempt to destroy the rtmp-stream output while it was
already connecting and stopping at the same time, it would try to join
with the stop thread rather than with the connect thread.  The connect
thread would then continue past destruction.
2015-11-02 15:53:12 -08:00
jp9000
3dab1ebb0a obs-outputs: Send stop signal if no service assigned
The code assumed that the service was valid when that may not be the
case by the time it gets to the code.
2015-11-02 15:52:05 -08:00