0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 21:13:04 +02:00
Commit Graph

4983 Commits

Author SHA1 Message Date
jp9000
4494e927f7 libobs-opengl: Disable v-sync on mac
Sets the swap interval to 0 to prevent v-sync from affecting any of the
preview panes on mac.
2017-10-06 06:35:56 -07:00
jp9000
3399f7b822 libobs: Disable pulseaudio dependency lookup on mac
The cmake script code used to find and depend on pulseaudio for audio
monitoring on linux was unintentionally being triggered on mac.  This
patch makes it so that the pulseaudio cmake code is ignored on mac.
2017-10-06 05:16:27 -07:00
jp9000
720a28aeb9 UI: Log generic stream startup failures
These code paths had no logging on failure, resulting in a log file that
would confuse people attempting to perform support for users.
2017-10-06 04:52:25 -07:00
jp9000
a0e8c7a5c1 win-dshow: Fix video playback when default format is MJPEG
Video playback doesn't work if the default format is MJPEG and there are
other formats to use; this is because the useDefaultConfig variable is
still set to true, which overrides the format value that would normally
tell it to convert to RGB.
2017-10-04 15:58:06 -07:00
jp9000
9321b822bf vlc-video: Fix shuffle not being quite that random
This changes it so that the chooses indices at random from an index list
until the index list is exhausted.
2017-10-03 18:48:57 -07:00
jp9000
3ea23320b8 libobs: Initialize randomization seed in video thread
Ensures that any rand() calls in the video thread will have a unique
seed to start from.
2017-10-03 18:48:56 -07:00
jp9000
e5d660e944 graphics-hook: Blacklist specific game from GL capture
"Life is Feudal: Your Own" will use Direct3D to render the game, then
OpenGL to render its in-game menus, which causes a conflict with itself.
This specifically blacklists the game from capturing OpenGL to prevent
that from happening.
2017-10-02 15:29:04 -07:00
jp9000
c914c1c23b vlc-video: Set properties to defer update mode
Makes it so that the settings do not update every time the user touches
a property of the source, but instead update when the user is finished.
2017-10-02 07:36:02 -07:00
jp9000
849944ca79 libobs/media-io: Fix decompress_420 function
This function had a number of bugs and just wasn't working properly at
all.  This function is currently not used in public builds because GPU
is used for color conversion instead (hence why it had probably not
really been tested), but a need came up where CPU conversion was useful
for the sake of testing something else in the back-end, and it needed to
be fixed before CPU conversion could be used.
2017-10-02 07:36:02 -07:00
jp9000
292a6e59f4 test: Add sync tests
The async source sync test verifies that async sources are playing back
in sync properly, and the "sync pair (video)" and "sync pair (audio)"
sources test the back-end syncing down to the exact sample via inserting
audio data directly in to the back-end with system timestamps.

For these sources, when the video is white, a C sinewave should be
playing, and when the video is black audio is mute.
2017-10-02 07:36:02 -07:00
jp9000
5b20942247 win-wasapi: Subtract frame duration from timestamp
It would appear that the timestamp values returned by devices are not
perfectly accurate, and in some cases may be calculated on the spot --
to combat that, it's best to subtract the audio segment's duration from
the current audio segment's timestamp to ensure the timing is as
accurate as possible.
2017-10-02 07:36:02 -07:00
jp9000
008e38f5b6 win-capture: Remove buffering from window capture
Removes the unnecessary buffering from window capture to prevent window
capture from being one frame out of sync
2017-10-02 07:36:02 -07:00
jp9000
ef97f15d6b libobs: Set video timing_adjust to obs video time
When an async video frame comes in and it sets the timing_adjust value
(used to sync audio to video based upon their timestamps), it would use
os_gettime_ns as a base.  Instead, it should use OBS' current video
frame time so that the audio and video playback is as accurate as
possible relative to the actual exact timestamp of the video frame.
(Results are almost insignificant, but it's nice to be as precise as
possible)
2017-10-02 07:36:02 -07:00
jp9000
54e80661b6 obs-outputs: Fix up the internal FLV output
Fixes up the FLV output to ensure it functions properly.
2017-10-02 07:36:02 -07:00
jp9000
260de35be6 libobs: When interleaving packets, make video come first
During packet interleaving (for outputs), ensure that if two packets
coincide with the same timestamp, that the video packet always comes
first instead of the audio packet.

This fix is required to make FLV demux properly with certain demuxers;
some FLV demuxers expect the video packet before the audio packet when
two packets coincide with the same timestamps.
2017-10-02 07:36:02 -07:00
jp9000
8d424cf1c7 obs-outputs: Fix FLV muxing bug
The end of an FLV tag would contain the size of the tag, but the code
was erroneously including the end size value in addition, which it's not
supposed to do normally.
2017-10-02 07:36:02 -07:00
jp9000
dc1e233168 libobs: Move macro to internal C file
Modifying this value would cause the entire project to recompile when
it's only used in one file in the first place.
2017-10-02 07:36:02 -07:00
jp9000
4a5ac39749 libobs: Fix starting video packet offset in outputs
(This commit also modifies the obs-outputs module)

The first video packet video offset (the value used to set the starting
point of video data) would be set to the DTS value of the first video
packet.  However, when b-frames are used, the first DTS value will be
negative.  This was originally done because FLV muxing requires that the
first packet's DTS start from 0.  Unfortunately, this would also
effectively cause the first packet's PTS/DTS value to be shifted forward
by the negative amount, which would cause video sync to be off by a
video frame or two.

This fixes it to start at the PTS value instead and preserve any
negative offsets.  Additionally, the FLV muxing code has been fixed to
ensure that it adjusts the starting video DTS to 0, and now correctly
adjusts the first audio packet's timestamp according to that DTS as well
(which it didn't do before).
2017-10-02 07:36:02 -07:00
jp9000
2f04010a4a libobs: Fix paired audio encoder discarding one segment
On audio encoder startup, audio encoders paired with a video encoder
would unintentionally discard a single audio data segment, causing it to
be 1024 audio frames out of sync.
2017-10-02 07:36:02 -07:00
Richard Stanway
05fb67717e
UI/updater: Use TLS 1.2 with WinHTTP
On Windows 7, WinHTTP defaults to using only SSL3 and TLS 1.0. The
obsproject.com server was updated to remove TLS 1.0 support and
this has caused updates to stop working on Windows 7.
2017-10-02 15:33:34 +02:00
Richard Stanway
27d16f961b
libobs: Restore Windows Vista compatibility
Certain PSAPI functions moved to KERNEL32 after Vista, setting
PSAPI_VERSION 1 uses the old PSAPI exports for compatibility. Vista
support was unintentionally broken by a6318ff.
2017-09-28 13:28:46 +02:00
jp9000
c9182a9878 obs-ffmpeg: Fix potential seek issues with media source
(This commit also modifies deps/media-playback)

Before, the media-playback library would detect whether something was
seekable by checking the filename for "://", which is unideal because
there are other cases where targets may not be seekable.  So instead, an
explicit "seekable" property (off by default) is now in place in the
media source when not in "local file" mode.  Seeking will only be
enabled if local file mode is on, or if "seekable" is explicitly checked
by the user.

Closes jp9000/obs-studio#1022
2017-09-17 05:55:56 -07:00
jp9000
8f43934be6 UI: Lock graphics context when adding new sources
Prevents a potential cross-lock deadlock.  The UI thread would lock the
scene's mutex in obs_scene_atomic_update, then the item would lock the
graphics context to create a texture.  Meanwhile in the video thread, it
could lock the graphics context in the render loop, then lock the
scene's mutex when rendering.  When doing anything graphics-related, the
graphics context is always supposed to be locked before the scene's
mutex is supposed to be locked (it's designed that way), and the
obs_scene_atomic_update would just bypass that.
2017-09-17 02:47:54 -07:00
jp9000
2386bd6556 obs-transitions: Fix integer conversion warning 2017-09-16 13:59:53 -07:00
Makeenon
006fc35a2d obs-transition: Add crossfade option to stinger
Add option in properties that let you choose how audio is mixed during
transition:
- Fade Out/Fade In (existing behavior, default)
- Crossfade

Closes jp9000/obs-studio#1028
2017-09-16 13:59:49 -07:00
Michel
dab278e1b6 obs-transitions: Add audio monitoring to stinger
Closes jp9000/obs-studio#1001
2017-09-16 12:35:17 -07:00
Benjamin Schubert
9cba5660e4 UI: Enable Replay Buffer in Advanced Mode
Replay buffer is currently only supported in simple mode.  This change
adds support to advanced mode and is, for the most part, a mirror of the
addition of replay buffer to simple mode.

Mantis-bug: https://obsproject.com/mantis/view.php?id=792

Closes jp9000/obs-studio#1019
2017-09-16 05:55:18 -07:00
Jim
48cc90d5bb Merge pull request #996 from twitchalerts/audio-subsystem-crash-fix
libobs: Fix a potential divide by zero crash
2017-09-15 13:12:41 -07:00
Jim
1e1808dbd9 Merge pull request #1005 from SuslikV/patch-1
UI: Fix parent window geometry loading
2017-09-15 10:30:39 -07:00
Jim
34b0f29dc5 Merge pull request #1003 from Fenrirthviti/theme-updates
UI: Allow volume peak to be customized via .qss
2017-09-15 09:33:52 -07:00
Jimi Huotari
73c4ebc289 libobs: Adjust grammar of an error message
Change 'but both were not found' to 'but neither were found.'

Closes jp9000/obs-studio#1018
2017-09-15 08:23:58 -07:00
Jimi Huotari
068874bc3e libobs: Stop configure if ImageMagick is preferred, but not found
With certain combinations of CMake (<3.9) and ImageMagick (>=7),
configure will silently fail setting up support for ImageMagick,
even if the user requested for it, and the build will move on
(as long as FFMPEG_AVCODEC is found).  This commit adds a check
that will stop configure in such cases.

Closes jp9000/obs-studio#1018
2017-09-15 08:23:54 -07:00
Jimi Huotari
fef71c4b7c libobs: Fix ImageMagick header path
Since ImageMagick 7, the header path has been changed.  This commit
implements a check for the version being used, and includes the
header as is appropriate.

Special thanks to Hu.

Mantis-Bug: https://obsproject.com/mantis/view.php?id=966

Gentoo-Bug: https://bugs.gentoo.org/627520

Closes jp9000/obs-studio#1018
2017-09-15 08:23:32 -07:00
chinasarft
1ef4de7ce3 obs-ffmpeg: Don't mark to destroy media unless valid
Closes jp9000/obs-studio#1021
2017-09-15 05:51:52 -07:00
Jim
dcd3e627c2 Merge pull request #1027 from SuslikV/patch-2
UI: Add missing option to context menu
2017-09-15 04:13:28 -07:00
Christoph Hohmann
27a8f69eea UI: Use Qt standard buttons in source properties
Use the Qt standard buttons in the source properties dialog to make the
UI consistent.  Also remove the right alignment of the button box to
allow Qt to align standard buttons on the left side of the dialog.

Closes jp9000/obs-studio#1013
2017-09-15 04:05:32 -07:00
SuslikV
2b175d6da9 UI: Add missing option to context menu
Add 'Advanced Audio Properties' option to context menu over empty area
of the Mixer's pane.
2017-09-14 15:01:15 +02:00
cg2121
76b6266689 UI: Allow hiding/unhiding sources in the mixer
Allows the ability to hide/unhide sources in the mixer that the user
doesn't care about or doesn't necessarily want to see (such as video
sources that have audio but don't have any audio playing).  If all
sources are hidden, the user can right-click the mixer's empty area and
choose "unhide all" via a context menu.

Closes jp9000/obs-studio#1002
2017-09-13 21:17:44 -07:00
jp9000
7bde1eb6af UI: Allow right-clicking mixer sources to bring up menu
Allows bringing up properties/filters/etc via right-clicking mixer items
in addition instead of only being able to click the gear icon.  Minor
QoL improvement.
2017-09-13 21:17:44 -07:00
jp9000
2ef00ecec4 libobs: Add private settings to scene items/sources
Allows setting and sharing of user data for sources and scene items.
2017-09-13 21:17:44 -07:00
Palana
db1da73647 libobs: Fix I420 shader for (width/2)%4 == 2 resolutions
For those resolutions the last two chroma samples of every other
line would be overwritten by the last chroma samples of the previous
line (depending on sampler used), producing artifacts on the left
edge of the resulting image (e.g. any color present on the right
edge of the image would "bleed" to every other line on
the left edge)
2017-09-13 16:39:36 +02:00
Palana
9ce9c35b0d libobs: Fix texture_ready feedback for CPU conversion path 2017-09-13 16:39:27 +02:00
Jim
dde03af95e Merge pull request #987 from seirl/master
Add fix to watch for VisibilityNotify events.
2017-09-12 05:30:36 -07:00
Jim
ee5b371576 Merge pull request #988 from ishitatsuyuki/xcb-segfault
Fix XCB keyboard mapping size calculation
2017-09-12 05:23:15 -07:00
Christoph Hohmann
5813a4bfbf linux-pulseaudio: Use actual sink device names
Uses the sink device names rather than the "Monitor of" names.

Closes jp9000/obs-studio#990
2017-09-12 04:01:06 -07:00
Shaolin
1bae6f3c18 UI: Enable audio monitoring on linux if pulse available
Closes jp9000/obs-studio#940
2017-09-12 03:37:58 -07:00
Shaolin
b6042d91ea libobs: Add Pulseaudio audio monitoring support
Checks if the system has Pulseaudio and enables support via the
HAVE_PULSEAUDIO flag.

Closes jp9000/obs-studio#940
2017-09-12 03:37:54 -07:00
Jim
b1f2b72628 Merge pull request #929 from RytoEX/nix-sysinfo
Make *nix system info logging more like Windows/Mac
2017-09-12 01:58:49 -07:00
mntone
9ffdaff984 UI: Add memory usage to Stats window on linux/mac
Closes jp9000/obs-studio#953
2017-09-12 01:56:40 -07:00
mntone
a6318ffdca libobs/util: Add memory usage functions
Closes jp9000/obs-studio#953
2017-09-12 01:49:11 -07:00