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

7115 Commits

Author SHA1 Message Date
jp9000
e200a8a8a9 obs-browser: Signal whether audio active/inactive
Uses the new obs_source_set_audio_active function to signal to the UI
whether audio is active or inactive depending upon whether the user is
currently allowing OBS to control the audio or whether the user is
allowing CEF to control the audio.  Ensures that the browser does not
show up in the mixer if CEF is playing back the audio itself.
2019-09-19 23:43:36 -07:00
jp9000
94cab1e536 UI: Hide mixer sources if audio deactivated
If audio is determined to be deactivated via the audio source (via the
new "audio_activate" and "audio_deactivate" signals), hide the audio
source in the mixer.
2019-09-19 23:38:53 -07:00
jp9000
33c09d91c2 libobs: Add funcs to determine whether audio active
Adds functions to allow sources to inform the UI whether the audio is
currently active or not.  Allows the ability to turn on/off the items in
the mixer.
2019-09-19 23:37:29 -07:00
jp9000
3baa75c7ca obs-browser: Turn rerouting audio off by default
It was determined that rerouting audio through OBS currently isn't the
best idea even with monitoring enabled, primarily due to the fact that
audio monitoring has never had this wide of testing before, and that
many users complained that they were not getting audio for (as of yet)
unknown reasons from audio monitoring.  It would appear that we need to
address the issues with audio monitoring first before attempting to use
audio monitoring with any sources by default.  For now, audio will
reroute through CEF by default, and then the user must explicitly use
the option "Control audio via OBS", (renamed from "reroute audio", and
now disabled by default), to enable browser audio control through OBS.

There are other issues that need to be resolved as well, and once all
the various issues are addressed, the setting default can be allowed to
change back.
2019-09-19 19:14:21 -07:00
jp9000
6464d5f853 UI: Check for null pointer
This was actually the line of code that the mixer dock widget crash was
triggered by.  This technically shouldn't ever be null, but better to be
safe than sorry.
2019-09-19 05:39:25 -07:00
jp9000
9730578230 UI: Fix crash closing mixer dock panels
The function added to the BrowserDock class is SetWidget, not setWidget.

I realize now that using the same exact function name but with an
uppercase starting letter rather than a lowercase starting letter wasn't
smart.
2019-09-19 05:29:02 -07:00
jp9000
eee40ec6d6 win-dshow: Do not allow H264 to have same priority as MJPEG
This prevents VideoFormat::Any from unintentionally selecting H264 when
MJPEG is the only other format available.

This fixes a bug where certain devices (Logitech C920 with latest
drivers) will only have H264 and MJPEG available, and using
VideoFormat::Any will then select H264 over MJPEG because it's the first
format value and has the same priority as MJPEG.  So now, MJPEG will be
prioritized over H264 instead.
2019-09-19 00:12:07 -07:00
jp9000
6f1cb5a8f8 win-dshow: Disable HW decode in DirectShow for now
This did not get enough testing, so disable it for now until more
devices can be tested (especially the live gamer portable).
2019-09-18 18:14:22 -07:00
Gol-D-Ace
add59d5253 UI: Adjust locale name for zh-TW 2019-09-18 13:28:27 +02:00
Gol-D-Ace
5d95cfc361 obs-browser: Update translations from crowdin 2019-09-17 23:29:34 +02:00
Gol-D-Ace
03b5be75e4 Update translations from Crowdin 2019-09-17 23:21:00 +02:00
jp9000
0048b74ed9 libobs: Update version to 24.0.0 2019-09-17 13:51:40 -07:00
jp9000
abaed69627 libobs: Check to swap BGRX/BGRA in async filters
If for whatever reason the format is swapped between BGRA/BGRX in an
async filter, swap the texture to compensate for that.  This allows
plugins to change the format if necessary.
2019-09-17 13:51:40 -07:00
Jim
888a7ad3fb
Merge pull request #2071 from jpark37/mjpeg-default-range
win-dshow: Fix color range when using FFmpeg decode
2019-09-16 15:21:22 -07:00
jp9000
4ff1195768 obs-browser: Map absolute to file URLs
Fixes a bug where where if http://absolute/ are used directly by the
user, the local files used with it would not function correctly.
2019-09-15 18:53:51 -07:00
jp9000
3f28d44d00 UI: Fix extra browser panels always creating on startup
The extra browser panels would always create on startup due to the
visibility change.  This fixes that by ensuring that this call blocks
signals, and ensures that the call only happens on first creation by the
user and not when the user is loading on startup.
2019-09-15 13:18:13 -07:00
jp9000
e61984c2cf obs-browser: Fix panels not remembering last URL set 2019-09-15 13:17:45 -07:00
jp9000
5d19786e04 UI: Fix browser docks being unchecked when created
In the view -> Docks menu, when a user first creates a custom browser
dock, the menu item associated with them used to hide/show them will be
unchecked in the menu by mistake.  This ensures they're checked when
first created.
2019-09-14 19:37:37 -07:00
jpark37
f60b820fee win-dshow: Fix color range when using FFmpeg decode
Full color range seems to be active when decoding video with FFMmpeg
even when partial is explicitly selected. This should keep the range
synchronized.
2019-09-14 17:12:29 -07:00
jp9000
3064887ae2 Revert "UI: Various screen reader fixes"
This reverts commit b5843caa48.

This breaks some hotkeys because the signals are tied to a signal which
is now triggered because "toggled" is used instead of "clicked", so just
revert it for now for the release and look at it later post-patch.
2019-09-12 13:55:31 -07:00
jp9000
5287518044 UI: Fix pause hotkey not working properly
Setting the check state cause the toggle signal to trigger, so it would
pause and immediately unpause.
2019-09-12 12:06:09 -07:00
jp9000
656873ab94 obs-browser: Fix portable mode not saving cookies
Request contexts don't appear to work with relative paths, only absolute
paths.  This fixes the bug where when using portable mode,
cookies/session wouldn't save because obs_module_config_path() was
returning a relative path rather than an absolute path.
2019-09-10 17:42:59 -07:00
jp9000
333fcb3664 obs-browser: Fix minor bug when using older CEF versions
Fixes duplicate visibility notifications when using 3440.
2019-09-10 12:05:15 -07:00
jp9000
b486cc6f9e UI: Disable NVENC lookahead if dynamic bitrate on
Lookahead causes playback issues when bitrate changes mid-stream.
Bitrate can suddenly drop to 0, and other issues such as audio
stuttering on Twitch have been observed.  Turning off lookahead fixed
the issue.  Lookahead is normally off by default anyway.
2019-09-10 12:01:10 -07:00
jp9000
70c9688e99 obs-browser: Fix browser panel visibility bug
Browser panels were having their initial visibility state always being
set to false.  This fixes that by only setting visibility state on
browser objects which explicitly call the visibility message (i.e. only
browser sources).
2019-09-07 21:27:41 -07:00
Colin Edwards
977f0397ab
Merge pull request #2065 from DDRBoxman/cefupdate
CI: Update CEF on osx to 3770
2019-09-07 18:22:03 -05:00
Colin Edwards
1507db7b1b CI: Update CEF on osx to 3770 2019-09-07 17:44:12 -05:00
jp9000
91825f236f obs-browser: Fix large local media file access
In newer CEF builds the http://absolute/ scheme handler factory seems to
never complete when accessing large media files due to an apparent bug
in the Chromium media player (XHR requests complete fine).  At the same
time, file:// URLs are working just fine.

file:// URLs will be used where available (CEF 3440+) falling back to
BrowserSchemeHandlerFactory on older CEF versions.
2019-09-07 10:54:15 -07:00
Jim
05e29d1679
Merge pull request #2062 from VodBox/screen-reader-fixes
UI: Various screen reader fixes
2019-09-06 17:50:05 -07:00
jp9000
e981c15749 Revert "image-source: Set default size of color source to canvas size"
This reverts commit 46c5780a77.

This needs to be reverted for now because users who did not set a size
on it (left it at default and just stretched it) will now suddenly have
the source's size change out of nowhere.  There needs to be backward
compatibility implementation for this.
2019-09-05 17:02:33 -07:00
jp9000
1b1a431c86 obs-browser: Fix build error on macOS 2019-09-05 11:28:18 -07:00
jp9000
fe1a3718ea obs-browser: Fix browser panel crash
Reverts the container widget, then decouples the browser's window handle
from its parent instead.  This allows calling DestroyBrowser() safely.
2019-09-04 21:19:15 -07:00
jp9000
65eac02cda UI: Shut down browsers when browser docks hidden
Shuts down the actual browsers internally when the browser docks are
hidden by user.
2019-09-03 19:12:36 -07:00
jp9000
7dd465cae1 UI: Refactor all browser dock classes in to one
Refactors all cases where a window class was created to show a browser
dock in to one class: BrowserDock.  Removes some unnecessary code
duplication.
2019-09-03 19:12:36 -07:00
VodBox
b5843caa48 UI: Various screen reader fixes
This commit fixes various issues with screen readers in the main OBS
interface. These were tested using NVDA on Windows 10 1903.

Checkboxes or buttons which toggle, when receiving an activate signal
from the screen reader would visually update, but not perform any
action. This is because they're listening only for clicks. They should
all now be listening for toggles instead.

The screen reader would navigate through the UI in the order that
elements are defined in the .ui XML, and not by their row positions.
The XML has been reordered so that things should be defined in their row
order.

Audio track selection now says Track 1, 2, etc, rather than just the
number. Various checkboxes that just say "Enable" now have accessible
text that says what the enable is for (since it says "checkbox", the
fact it's an enable should hopefully be clear). Type in the recording
tab of output now has accessible text which says "Recording Type".

All the right side buttons in hotkeys now have tooltips, and by
extension, accessible text. Currently it does not yet say what hotkey
the action is in relation to, but that would require more locales.
2019-09-04 12:43:56 +12:00
Jim
04d1f04bd3
Merge pull request #2060 from craftwar/format
Fix Variable type and format specifier
2019-09-03 13:09:32 -07:00
jp9000
93aa528d2b obs-browser: Allow users to use CEF audio instead of OBS
Allows the ability for users to use audio through CEF (previous
behavior) by unchecking the "Reroute audio through OBS" checkbox if they
so choose.
2019-09-02 17:46:25 -07:00
craftwar
6ffc4f590a UI/updater: Fix variable type to format specifier 2019-09-02 21:14:21 +08:00
craftwar
e004ce8064 graphics-hook: Fix format specifier 2019-09-02 21:12:27 +08:00
jp9000
297f9fb0fd obs-browser: Do not use WasHidden() for visibility on 3507+
Using WasHidden() for the purposes of visibility no longer can be relied
upon due to some sort of bug with OSR in Chromium.  This issue does not
happen when using 3440.  The browser works fine without WasHidden()
calls, so we must remove its usage or be forced to use 3440.  For those
who need the visibility handling, an alternative will have to be used
once it's available.

Additionally, this reverts the failed workaround to use OBS FPS in place
of SignalBeginFrame() because that code is no longer needed due to the
WasHidden() removal.
2019-09-01 10:40:26 -07:00
Jim
9a5cb0ae36
Merge pull request #2057 from jpark37/area-downscale-rgb
libobs: Fix Area shaders missing for RGB output
2019-08-31 21:16:58 -07:00
Jim
e4594f00bd
Merge pull request #2056 from jpark37/qsv-warning
obs-qsv11: Remove leftover stack variable
2019-08-31 21:16:40 -07:00
Jim
1523acd726
Merge pull request #2055 from jpark37/video-warnings
Fix video format warnings
2019-08-31 21:16:23 -07:00
Jim
997698750e
Merge pull request #2051 from jpark37/d3d11-const-ref
Minor D3D11 cleanup
2019-08-31 21:15:25 -07:00
Jim
9ef993ad13
Merge pull request #2044 from Palakis/bugfix/output-aoi-access-violation
libobs: add pointer check in reset_raw_output
2019-08-31 21:14:36 -07:00
jp9000
dc6a0bf8e9 obs-browser: Fix browser panel crash
Before, we were calling DestroyWindow on the browser panel HWND from the
CEF UI thread, which meant that the main program thread had to process
window messages in order for that message to successfully through as
DestroyWindow blocks on the WM_DESTROY/WM_NCDESTROY window messages.
Unfortunately, this also had the side-effect of processing all queued Qt
events, which, when called in the destructor of a window like this, can
result in undefined behavior; specifically crashes, which were occurring
due to this.  Especially when browser panels were in docks and docked to
the main window.

So, instead of calling DestroyWindow in another thread and then
processing events in the main thread, call DestroyWindow directly in the
main thread to get WM_DESTROY/WM_NCDESTROY and only those processed on
the spot.  This appears to fix the crashes due to the undefined
behavior when closing browser panels.
2019-08-31 21:10:26 -07:00
jp9000
23111c317f libobs: Remove redundant function param and for loop
Originally when the audio_submix function was created, it used all mixer
tracks, but at a certain point that was removed because it can only use
the first track, so some older code was unintentionally left over,
causing the same code to be executed 6 times mistakenly.  This cleans
that up by removing the unnecessary function parameter and for loop.
2019-08-31 01:15:19 -07:00
jp9000
1a72b04951 libobs: Make sure to offset unpause audio data
When an unpause occurs, it takes an audio segment and splits it at the
exact point corresponding to the pause timestamp, and then it's supposed
to only send the ending part of the split.  However, the audio pointers
were not being incremented, therefore it was sending the front of the
audio segment to instead of the back of the audio segment by mistake.
2019-08-31 01:15:19 -07:00
jp9000
03e008fd2e libobs: Fix pause cutting out video data prematurely
When pause has been activated, the video_pause_check() function is used
when receiving raw frames in order to filter out frames that are in the
pause window, that way they aren't sent to the encoder or output.

However, when pause was enabled, it was unintentionally filtering out
some frames before the specified starting timestamp as well, causing
extra video data to get cut out prematurely.  This fixes that issue.
2019-08-31 01:15:19 -07:00
jp9000
f6d1887675 libobs: Fail pause/unpause if still waiting for them
When a pause/unpause occurs, a timestamp is set and the actual
pause/unpause does not occur until the output/encoders reach the
specified timestamps.  Do not allow pausing/unpausing unless that point
has been reached with all encoders of an encoded output or the output
itself when using a raw output.

This fixes a bug where pause data could get corrupted if
pausing/unpausing too fast, because the audio/video encoders aren't
necessarily synchronized and although one encoder may have unpaused, the
other encoder(s) may not have yet.  Checking all encoders first before
allowing a pause/unpause ensures that doesn't occur.
2019-08-31 01:15:19 -07:00