Commit Graph

5307 Commits (285d9bd6f1d966153d791b19bafb3692a220dff5)

Author SHA1 Message Date
jp9000 bd9706c8ac UI: Use QT_TO_UTF8 with name dialog
Could potentially use the wrong locale otherwise.
2017-06-20 18:19:30 -07:00
jp9000 b787c796cd obs-ffmpeg: Do not precache if set to close when inactive
In the media source, do not pre-cache frames if the source is set to
close the file when inactive because that setting is designed to allow
the file to be replaced by the user.  If it's replaced, it can
unintentionally keep the old precache frame, playing the frame from the
older video when it starts up.
2017-06-19 22:58:01 -07:00
jp9000 603825ee39 win-capture: Use PROCESS_QUERY_INFORMATION for game capture
PROCESS_QUERY_LIMITED_INFORMATION might be a bit insufficient for what
we need to do.
2017-06-19 16:02:02 -07:00
jp9000 1ca9f8872e win-capture: Add IDXGISwapChain1::Present1 hook support
Allows capturing games/programs that may be using Present1 instead of
the regular Present call for rendering.
2017-06-19 15:45:00 -07:00
jp9000 96f746ce41 UI: Initialize Stats window values after OBSInit/reset
When the statistics window starts up for the first time, it reset values
at that very moment so that stray lagged frames due to OBS' startup
wouldn't be displayed.  However, that's really a bad place to reset
those values because the user could want to view the stats window after
a long stream, and having those values reset when he/she views the
window for the first time would sort of make the point of viewing your
stats moot.

Instead, reset the values only when applicable, such as after OBSInit or
when video is reset.
2017-06-19 15:38:13 -07:00
Michael Fabian Dirks 4e3e67bb8c libobs: Fix an int underflow in log_frame_info
I believe the issue with the next to impossible frame count to be an integer underflow, as in order to achieve those you'd have to have recorded for at least 345 days with 144 fps. So this commit fixes them by using a normal integer first and then deciding on the result if it should be used or be replaced with a 0.
2017-06-19 04:12:06 +02:00
jp9000 bc30c39a03 UI: Ignore first 2.5 seconds of bandwidth test
System network buffers need to be given some time to fill before
starting a bandwidth test.  This prevents the buffers from skewing with
the results.
2017-06-15 20:00:01 -07:00
jp9000 c4036b18bb win-capture/graphics-hook: Fix D3D10/D3D11 detection
When hooking DXGI-based graphics programs in the hook, the first hook
point is IDXGISwapChain::Present.  To be able to initiate a capture, a
pointer to the device context that created the swap chain is required,
which can be retrieved via IDXGISwapChain::GetDevice.  Determining
whether the device context was D3D10 or D3D11 has always been somewhat
of an issue due to D3D10 and D3D11 being nearly identical, as well as
their interoperability/interchangeability.  The GetDevice function would
first be called with the UUID of ID3D10Device, then if that failed,
the UUID of ID3D11Device.

However, with certain specific D3D11 games, GetDevice would for some
unknown reason succeed with the UUID of ID3D10Device, which would cause
capture to fail.  (Conversely, attempting to call GetDevice with the
UUID of ID3D11Device on a device that's actually ID3D10Device would
always succeed, so reversing the order of the test was not an option).
There were originally three known D3D11 games that would erroneously
succeed when querying a D3D10 device interface:  Call of Duty: Ghosts,
Just Cause 3, and theHunter: Call of the Wild.  All other known D3D11
games would work correctly.  Because it was only these three games, a
hack was originally implemented in the form of an executable exception
list that would force them to capture D3D11.

Unfortunately, Oculus games are now failing under the same circumstance
as well, so a simple hack will no longer work.  To fix this, a more
reliable method of detecting which context it is had to be discovered:
simply check the feature level using ID3D11Device::GetFeatureLevel.  If
the feature level is D3D_FEATURE_LEVEL_11_0 or D3D_FEATURE_LEVEL_11_1,
the device is definitely a D3D11 device.  Otherwise, continue the tests
as they were before.  Successfully tested with many D3D10 games, many
D3D11 games, and especially those three D3D11 games that previously were
detected as D3D10 erroneously.
2017-06-15 03:48:43 -07:00
Cephas Reis 33fc279da8 .editorconfig: Add file to speed up editor configuration
VS2017 supports this natively.
VS2015 and earlier can use this with the editorconfig extension.
Most other popular IDEs support this natively or via a plug-in.

For more details please visit: http://editorconfig.org/
2017-06-14 21:35:09 -05:00
jp9000 054148a0af obs-ffmpeg: Don't preload media frames if set to pause on end
Preloading is designed to overwrite the current internal render texture
of the source so it'll be ready to play the first frame right when the
source is first displayed.

However, When the media source is set to pause on the last frame, it
keeps that current render texture visible, so preloading it with the
first frame will essentially overwrite the current render, causing it to
inadvertently show and pause on the first frame rather than the last
frame.  So instead, just disable preloading when the user has it set to
pause on the last frame.
2017-06-14 08:30:44 -07:00
jp9000 d5adfff978 deps/media-playback: Fix playback reset fail after stop
The recent changes in 88ae9af causes av_read_frame to check for
m->stopping, and fail with AVERROR_EXIT if true, which would happen
after each reset.  Moving mp_media_prepare_frames to a line after
m->stopping is reset to false fixes the issue.
2017-06-14 08:20:30 -07:00
jp9000 3f5920ae5d deps/media-playback: Fix AV_NOPTS_VALUE being used as timestamp
With certain media files (wmv in particular), the very last frame will
have a timestamp of AV_NOPTS_VALUE.  This could cause the media to stick
on that frame indefinitely.  Instead, use the estimated next timestamp
that was calculated in the previous frame.
2017-06-14 00:43:31 -07:00
jp9000 c1cf44fd91 deps/media-playback: Add timeout when waiting for frames
Media files that have a very low framerate or very long interval between
frames would cause the media playback to stall indefinitely until the
next frame is played.  This adds a 200ms timeout to ensure that the
media can be destroyed without being forced to wait indefinitely for the
next frame.
2017-06-14 00:39:10 -07:00
Joel Bethke 432e285257 UI: Add new theme, update theme capabilities
I have always felt that the out of the box themes for OBS were quite
lacking, and have spent a lot of time going through and sorting out the
difficulties with the current setup. I've added a new themeID parameter to
several elements that were otherwise impossible to target with QSS in a
theme. Since Qt has pushed for the use of QML over QSS at this point,
these should be considered workarounds. Included is the theme I was
working on that can serve as a base. I'm hoping to encourage others to
make their own themes, so we can grow the available themes for OBS.

I am happy for any feedback on the theme itself, or other updates that
can me made to make creating new themes easier overall.
2017-06-13 14:37:59 -05:00
Richard Stanway da9e247964
UI/updater: Fix incorrect path in portable mode 2017-06-12 16:45:16 +02:00
Jim 26918a2fda Merge pull request #944 from Gol-D-Ace/twitch_ingests
rtmp-services: Add new twitch.tv ingests
2017-06-08 19:32:50 -07:00
Gol-D-Ace b105f60911 rtmp-services: Add new twitch.tv ingests 2017-06-09 04:17:41 +02:00
Gol-D-Ace a4f9ce93fe Revert "rtmp-services: Rename Beam to Mixer"
This reverts commit 8a0b38d84e.
The new Mixer URL's aren't valid yet.
2017-06-04 18:04:19 +02:00
jp9000 88ae9aff6e deps/media-playback: Fix lockup issues
Certain functions such as avformat_open_input and av_read_frame can
block, causing the program to someone wait very long periods of time
when a network URL is used with the media source.  The
interrupt_callback member variable in AVFormatContext allows safely
canceling IO operations when trying to shut down or stop the
media-playback interface.
2017-06-04 00:44:04 -07:00
Shaolin cfcb2f4f39 plugins: Clear warnings about -Wincompatible-pointer-types
Signed-off-by: Shaolin <admshao@gmail.com>
2017-06-01 05:25:55 -03:00
Jim daee6e0759 Merge pull request #935 from admshao/implicit-fallthrough
Suppress -Wimplicit-fallthrough in GCC 7
2017-05-30 01:23:27 -07:00
jp9000 f0ff1c481d deps/media-playback: Call stop callback on failure 2017-05-29 19:30:14 -07:00
jp9000 892a6548e7 obs-ffmpeg: Add network buffering property
(Note: This commit also modifies deps/media-playback)

Allows buffering network-based media sources where supported.  Default
is two megabytes of buffering.
2017-05-29 19:30:13 -07:00
jp9000 0302a4e7f7 deps/media-playback: Start decoding regardless of keyframe
Currently, when media-playback is used with a network address, video has
to wait for the first keyframe before it starts decoding.  This is
probably not wise because the first packet of video may contain
additional header information, and because audio is forced to wait and
buffer while waiting for a keyframe, potentially causing a lot of audio
to get backed up unnecessarily which could inadvertently cause sync or
audio playback issues.

So, instead of waiting for a keyframe before decoding starts, decode
right away, and make it wait for a keyframe before calling the video
callback instead.
2017-05-29 19:30:12 -07:00
jp9000 ea6bdf58e0 deps/media-playback: Output av_read_frame error string 2017-05-29 19:30:11 -07:00
jp9000 0acf86ba04 win-capture: Limit OpenProcess flags to prevent A/C issues
Limits OpenProcess flags to only the flags that are necessary to prevent
any further issues with anti-cheat hooks in the future.
2017-05-29 19:30:10 -07:00
Shaolin cb9f767e45 libobs/plugins/UI: Suppress -Wimplicit-fallthrough introduced by GCC 7
Signed-off-by: Shaolin <admshao@gmail.com>
2017-05-29 21:05:18 -03:00
Jim d4bd7ea052 Merge pull request #931 from DDRBoxman/osxplugin
UI: Look for plugins in ~/Library/Application Support/obs-studio/plug…
2017-05-29 15:57:49 -07:00
Colin Edwards c6e2318eae UI: Look for plugins in ~/Library/Application Support/obs-studio/plugins/ 2017-05-29 17:41:29 -05:00
jp9000 b5581938ca win-wasapi: Fix potential null pointer deref in enumeration 2017-05-28 15:35:34 -07:00
jp9000 847b3013fc UI/installer: Update installer VC redist download link 2017-05-28 15:35:33 -07:00
jp9000 7c72cfc625 UI/installer: Fix broken realsense plugin install locations 2017-05-28 15:35:04 -07:00
jp9000 5e41865f83 UI/installer: Specify "source" in plugins section
When using the full installer, there'll be a section where you can
choose what to install -- one section is a tree view with a "plugins"
section, and in that section there's "Browser plugin" and "Realsense
plugin".  Instead of superfluously saying "plugin" for each of those,
replace with "source" instead -- so browser source and realsense source.
Also somewhat helps prevent the user from getting confused and thinking
we're installing a browser or something.
2017-05-28 15:35:03 -07:00
Ryan Foster d6e43aefc4 libobs: Log *nix system info more like Windows/Mac
Rename "Processor" to "CPU Name" and place it before the number of
cores. Log free RAM for *nix. Log CPU Speed on Linux and FreeBSD. Unify
processor logging on Linux and FreeBSD. Get physical and logical cores
on *nix.

Use the new os_get_logical_cores and os_get_physical_cores function from
commits 6fc74d6 and e4a64f0 to get CPU core counts on *nix systems.
2017-05-26 22:54:12 -04:00
Jim 484f501a19 Merge pull request #927 from derrod/update-ingests
rtmp-services: Rename Beam to Mixer
2017-05-26 11:58:03 -07:00
Ryan Foster e4a64f0efa libobs/util: Fix *nix CPU core counts
Get logical and physical CPU cores on Linux and FreeBSD, even for
multi-core CPUs.
2017-05-26 00:30:36 -04:00
Jim 9e66bca020 Merge pull request #926 from RytoEX/fix-librtmp-freebsd
librtmp: Fix build error with ENODATA on FreeBSD
2017-05-25 10:06:04 -07:00
derrod 8a0b38d84e rtmp-services: Rename Beam to Mixer 2017-05-25 15:23:19 +02:00
Ryan Foster 972c470319 librtmp: Fix build error with ENODATA on FreeBSD
When building on FreeBSD before this patch, it would produce the error
"error: use of undeclared identifier 'ENODATA'". This fixes that.
2017-05-25 03:48:53 -04:00
derrod 110a9bd471 rtmp-services: Update Twitch ingests
Updated Sao Paulo and Rio de Janeiro ingest URLs

Closes jp9000/obs-studio#890
2017-05-22 07:51:22 -07:00
jp9000 870bf6b6fc UI: Fix tooltip for "prefer hardware encoding" 2017-05-21 09:02:14 -07:00
jp9000 1738adf021 Revert "obs-ffmpeg/nvenc: Remove "default" preset"
This reverts commit d1343dc064.

Apparently people are having issues caused by this specific commit.
Going to temporarily revert for the time being.
2017-05-21 02:54:41 -07:00
jp9000 83e7191f33 libobs: Update to version 19.0.2 2017-05-21 02:34:27 -07:00
jp9000 8416c9fbae UI: Fix autoconfig capping bitrate with "custom server"
When custom server is used, it would still use the "common" RTMP service
to cap its bitrate.  So if Twitch was selected and you changed over to
custom RTMP server, it would still cap to Twitch's bitrate limits even
though you're not using Twitch anymore.
2017-05-21 01:40:12 -07:00
jp9000 e6f9a73235 libobs-d3d11: Fix bug where vertex buffers would be reset
There's no need to reset vertex buffers like this anymore.  This would
unintentionally cause certain things (such as the freetype text source
on windows) to stop rendering properly.
2017-05-20 19:37:28 -07:00
Jim abd376f84f Merge pull request #923 from mntone/issue-crashlog
UI: Fix creation of crash log with non-english paths
2017-05-20 19:00:36 -07:00
mntone 2ea7e3b344 UI: Fix creation of crash log with non-english paths 2017-05-21 10:44:54 +09:00
Jim 85dff9d72b Merge pull request #922 from Xaymar/feature-enc-amf
enc-amf: Version 2.1.5
2017-05-20 18:09:54 -07:00
Michael Fabian Dirks dc07c9fccc enc-amf: Version 2.1.5
This has the 32-bit crash workaround as AMD has not yet fixed the AMF runtime logging crash.
2017-05-21 02:57:00 +02:00
jp9000 69dbb2c0bf libobs: Update version to 19.0.1 2017-05-20 14:27:17 -07:00