6868 Commits

Author SHA1 Message Date
jpark37
1fc0a357d2 win-dshow: Add "Default" color range setting
VIDEO_RANGE_DEFAULT uses partial range for YUV and full range for RGB.
Previous default was always partial.
2019-07-10 23:40:53 -07:00
Matt Gajownik
ca12847aa8 UI: Change default recording format to MKV 2019-07-11 15:39:46 +10:00
Colin Edwards
ad85a9fa25 Apply clang-format to objective c code 2019-07-09 13:39:13 -05:00
jp9000
617086b040 obs-ffmpeg: Separate logging code
Cleans up obs-ffmpeg.c and separates all the logging code to a different
file, which can be enabled with ENABLE_FFMPEG_LOGGING.
2019-07-09 10:07:24 -07:00
wang-bin
5b6ee6e66b libobs: Clear module variable in case module reloaded
Closes obsproject/obs-studio#1957
2019-07-09 08:37:43 -07:00
jp9000
eab10d48b2 UI: Add pause support
Adds support for pausing recordings.  When settings are eligible for
recordings, a pause button will appear next to the recording button.  If
the settings are not eligible, it will warn the user in the output
settings that they cannot pause recordings if those settings are used.
2019-07-08 08:11:56 -07:00
jp9000
942ca6f709 obs-ffmpeg: Add support for pausing 2019-07-07 16:38:22 -07:00
jp9000
153fa6337f libobs: Implement pausing of outputs
This implements pausing of outputs.  To accomplish this, raw audio/video
data is halted to the encoders or raw output.  Pausing is as precisely
timed as possible according to the timing of the obs_output_pause call,
and audio data will be spliced down to the exact audio sample in
accordance to that timing at the start/end marks.

Outputs that support this (outputs used for recording) can set the
OBS_OUTPUT_CAN_PAUSE capability flag.
2019-07-07 16:38:22 -07:00
jp9000
3b581a3727 obs-ffmpeg: Remove unnecessary function
This terrible boilerplate code is no longer necessary, as it is now
fixed by the previous commit.
2019-07-07 16:38:21 -07:00
jp9000
85ca1b6918 libobs: Correct raw output starting audio data
If the audio subsystem was buffered to any extent, the audio of a raw
output would start off at a negative offset, requiring each raw output
to implement a "prepare_audio" function (as seen in the FFmpeg output)
in order to ensure proper synchronization with video.  This did not
apply to encoded outputs because it was already being performed by the
obs-encoder code.
2019-07-07 16:38:21 -07:00
jp9000
70ecbcd5d4 libobs: Add obs_get_frame_interval_ns
Returns the current video frame interval between frames, in nanoseconds.
2019-07-07 16:38:21 -07:00
jp9000
3a6a1a4ff8 UI: Don't display MP4/MOV warning if lossless 2019-07-06 09:27:40 -07:00
jp9000
8caa4f938c obs-ffmpeg: Check for replay buffer button press
The replay buffer was triggering on both button press and button
release, which is redundant.
2019-07-06 09:27:40 -07:00
jp9000
be8c063346 UI: Make adv. streaming audio encoder independent
Allows the ability to pause when streaming and recording use the same
tracks in advanced output mode.
2019-07-06 09:27:40 -07:00
James Park
da87f08da4 libobs: Buffer-smoothing enhancements
If an audio source does not provide enough data at a steady pace, the
timestamp update does not happen, and buffering increases until it
maxes out. To counteract this, update the timestamp anyway.

Another issue for decoupled audio sources is that timing is not
adjusted for divergence from system time. Making this adjustment is
better for timing stability.

5+ hours of stable audio without any buffering on my GV-USB2 where it
used to add 21ms every 5 mintues or so.

Fixes https://obsproject.com/mantis/view.php?id=1269
2019-07-05 09:13:18 -07:00
James Park
534c553b23 win-dshow: Decouple audio from video
If a device produces video and audio timestamps atdifferent rates,
this divergence can cause massive buffering on the audio side, leading
to a capped audio buffer, and total sound loss. This change allows a
hardcoded list of devices to use the existing decoupling logic. For
now, only "GV-USB2" has been added.

When combined with another fix, 5+ hours of stable audio without any
buffering on my GV-USB2 where it used to drop sound completely after
an hour or so.

Partially fixes https://obsproject.com/mantis/view.php?id=1269
2019-07-05 09:12:57 -07:00
Richard Stanway
ad233330f3
Merge pull request #1948 from derrod/purge-services
rtmp-services: Update and prune services
2019-07-01 22:02:49 +02:00
derrod
d954853ce9 rtmp-services: Update and prune services 2019-07-01 19:56:31 +02:00
Jim
39dcdae2de
Merge pull request #1940 from bc-lee/feature/git-hyper-blame
.git-blame-ignore-revs: Add file to handle mass reformatting
2019-07-01 02:44:59 -07:00
Jim
ae021213f5
Merge pull request #1945 from jpark37/fix-source-format
libobs: Fix format selection
2019-07-01 02:38:43 -07:00
Jim
84369f60e4
Merge pull request #1946 from jpark37/ternary-type-conversion
libobs-d3d11: Unnecessary type conversions
2019-07-01 02:37:51 -07:00
Richard Stanway
7f1f97a61f libobs-d3d11: Set texture using initializer list 2019-06-29 01:28:16 +02:00
Richard Stanway
0e77a2c75b obs-outputs: Minor pointer fixes 2019-06-29 01:28:16 +02:00
Richard Stanway
183cc920c8 UI: Avoid ternary operator for mixed types 2019-06-29 01:28:16 +02:00
jpark37
2ef25ceb85 libobs: Fix format selection
Fix ternary test to use BGRX render targets for YUV to RGB
conversions. The previous behavior may have been fine though since
the shaders fill the alpha channel with 1.0 anyway.
2019-06-27 08:57:41 -05:00
jpark37
8c4d98195f libobs-d3d11: Unnecessary type conversions
Use raw pointer on both sides of ternary test result to remove
conversions.
2019-06-27 08:55:26 -05:00
Byoungchan Lee
95154a17c3
.git-blame-ignore-revs: Add file to handle mass reformatting
Google's git-hyper-blame command is a variant of git-blame,
but it can ignore certain commits like mass reformatting in f53df7d .
To use git-hyper-blame, it is better to make a .git-blame-ignore-revs file
in the repository root directory and put commits in the file to ignore such
commits.

Ref: https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/git-hyper-blame.html
https://chromium.googlesource.com/chromium/src.git/+/437b870/.git-blame-ignore-revs
https://github.com/mozilla/gecko-dev/commits/03c48ac/.git-blame-ignore-revs
2019-06-27 01:09:31 +09:00
Jim
cff0d6800f
Merge pull request #1938 from Dead133/master
rtmp-services: Update ingest list for Restream.io
2019-06-25 18:35:46 -07:00
Jim
c558b81f34
Merge pull request #1936 from jpark37/empty-vao
libobs-opengl: Empty VAO
2019-06-25 18:34:29 -07:00
jp9000
841bac4981 clang-format: Remove redundant params 2019-06-25 15:52:33 -07:00
Dead133
e0c8aac485 rtmp-services: Update ingest list for Restream.io 2019-06-25 17:18:02 +03:00
jpark37
b8e5cf3a95 libobs-opengl: Empty VAO
Use an empty VAO for shaders that generate their own vertices.
2019-06-24 23:13:04 -05:00
Jim
c938ea712b
Merge pull request #1935 from obsproject/clang-format
Apply clang-format to the project
2019-06-24 19:41:51 -07:00
Richard Stanway
80e9bb4ec7
libobs-d3d11: Fix missing vertex buffer clear in NV12 check 2019-06-25 00:51:01 +02:00
jp9000
8c54b7f393 obs-ffmpeg: Move external headers to external dir
Prevents automatic formatting with clang-format
2019-06-23 23:54:26 -07:00
jp9000
f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
jp9000
53615ee10f clang-format: Add clang-format files 2019-06-23 01:53:56 -07:00
Jim
3180a07d7c
Merge pull request #1911 from jpark37/full-screen-triangle
libobs: Full-screen triangle format conversions
2019-06-22 02:42:32 -07:00
James Park
aa22b61e3e libobs: Full-screen triangle format conversions
The cache coherency of rasterization for full-screen passes is better
using an oversized triangle that is clipped rather than two triangles.
Traversal order of rasterization is GPU-specific, but will almost
certainly be better using an undivided primitive.

A smaller benefit is that quads along the diagonal are not evaluated
multiple times, but that's minor in comparison.

Redo format shaders to bypass vertex buffer, and input layout. Add
global shader bool "obs_glsl_compile" to make API-specific decisions,
i.e. handle upside-down UVs. gl_ortho is not needed for format
conversion because the vertex shader does not use ViewProj anymore.

This can be applied to more situations, but start small first.

Testbed full screen passes, Intel HD Graphics 530:
RGBA -> UYVX: 467 -> 439 us, ~6% savings
UYVX -> uv: 295 -> 239 us, ~19% savings
2019-06-18 22:29:07 -07:00
Jim
6a795d52ea
Merge pull request #1894 from Rosuav/lock-unlock-event
libobs/UI: Implement an item_locked event
2019-06-18 20:31:26 -07:00
Jim
ab70bff4b3
Merge pull request #1913 from jpark37/area-shader-optimization
libobs: Area-resampling shader optimizations
2019-06-17 20:40:25 -07:00
Jim
55740f6f2e
Merge pull request #1920 from jpark37/vector-pop
libobs-d3d11: Clean up device_projection_pop
2019-06-17 19:32:18 -07:00
Jim
6b60b28e51
Merge pull request #1928 from cg2121/no-tracks-selected
UI: Use stream track if no tracks are selected
2019-06-17 17:27:15 -07:00
Clayton Groeneveld
493962330c UI: Use stream track if no tracks are selected 2019-06-17 17:52:30 -05:00
jp9000
74cd1da656 Revert "UI: Use theme colors setting for Projectors too"
This reverts commit 8a22889e3d732532141db6b79b438f01c9cefc98.

After further usage, result is undesirable.  We don't need the theme
applied to projectors.
2019-06-16 17:43:55 -07:00
Jim
fafda14963
Merge pull request #1906 from jpark37/bgr-three
libobs: linux-v412: obs-ffmpeg: Add packed BGR3 video support
2019-06-15 16:40:44 -07:00
Jim
914fffe137
Merge pull request #1889 from jpark37/warm-render-targets
libobs: Remove unnecessary frame pipelining
2019-06-15 16:13:03 -07:00
Chris Angelico
2fe641b8a4 libobs, UI: Implement item_locked event
Similar to item_visible, this event fires whenever a scene item is
locked or unlocked. This allows the UI and libobs to remain in sync
regarding scene elements' statuses.
2019-06-15 16:09:10 -07:00
Jim
dd607b422f
Merge pull request #1881 from jpark37/lowres-fair-sampling
libobs: Improve low-resolution bilinear sampling
2019-06-15 16:03:02 -07:00
jp9000
02e523c125 libobs: Update version to 23.2.1 2019-06-13 22:28:10 -07:00