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.
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.
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.
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.
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.
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.
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.
Audio latency can get really low, and if it's low enough, the timestamp
can be passed by the audio subsystem before it's had a chance to pause
with it. So instead, make the pause have a little bit of extra delay to
ensure that doesn't occur.
This fixes crashes that could occur while processing Qt events during a
source's destruction.
Originally the processEvents code was added to make sure that any window
messages being sent to the browsers were being processed by Qt.
However, that was only necessary for browser panels as they are actually
associated with windows/views. Browser sources are OCR, thus they do
not need this.
Cuda appears to be a bit buggy and can result in corruption where as
it's not being seen with other hardware decoders. Remove cuda for now
as a hardware decoder to prevent the possibility of corruption.
Fixes a bug where hardware frames would not transfer to RAM for the last
few frames of a video. The 'ret' variable can be 0 even though there
are still frames ready.
Fixes same issue as 5c04876de1, but reverts that and changes it so that
external_begin_frame_enabled is not used instead, which seems to fix
that issue.
This fixes a race condition where the audio/video backends/threads may
start using sources before their obs_source_info::create function has
been called.
Also increase weight precision by premultiplying UV in VS.
Intel HD Graphics 530, Intel GPA, SetStablePowerState
256x224 -> 1323x1080: 1221 us -> 1020 us