The reasoning behind removing this flag is because the whole point of
having it in was so we could replace chromium's audio output. But there
are too many obstacles in our path from doing that for now, so it's
better to not have this flag because it just causes a lot of browser
sources to initialize audio monitoring unnecessarily. We can change
this in the future, but for now, it's best to let the user choose to
turn on audio monitoring for the source if they choose to turn on audio
rerouting to OBS.
Note that this only changes default behavior for newly created sources;
it will not change settings of existing sources the user had before this
change.
This reverts commit 22aa66a6eb520444c492f6a7c595fd7a5de98bdc.
Apparently, starting audio on the fly like this can introduce latency in
to the audio playback, so for now revert it. It was a bit of a
precautionary thing rather than an actual fix anyway, so it probably
wasn't all that necessary to begin with.
Because this did not have WINAPI (stdcall) specified as the calling
convention on the gdi32 export, caused a crash due to stack corruption
on the 32bit version of OBS.
Apparently, using the old chromium network implementation changes the
way cookies are handled, causing cookies to reset. So instead of doing
that, continue to use the new network implementation on Windows, and
only use the old network implementation on macOS for the time being.
Not in love with STL, but lets at least use the semantically-correct
collection. It's also a shame this is a global variable with gross
pre-main allocations, but attaching it to the device instance would
break the interface.
Make duplicator_capture_tick the sole creater, and reference adder of
IDXGIOutputDuplication objects. This prevents a situation where
duplicator_capture::showing cause be false while
duplicator_capture::duplicator was not null at startup on background
scenes, preventing IDXGIOutputDuplication from being recreated when
DXGI_ERROR_ACCESS_LOST.
This prevents audio monitoring from actually initializing unless audio
is actually played back through the source. This prevents many browser
sources from initializing audio monitoring all at once needlessly if
audio is not being rerouted to OBS.
This uses the older network implementation rather than the new
NetworkService chromium has implemented until a later version of CEF is
used. The newer NetworkService implementation has caused some lag with
playback when hardware acceleration is not available for whatever
reason. This doesn't fix media playback issues with software rendering
on windows, but it does on macOS. All playback issues with software
rendering appear to be fixed in later version of CEF, however those
versions do not currently have hardware accelerated OSR or audio capture
support, so we must deal with 3770 until we can upgrade CEF again (which
hopefully won't be too long).
(This commit also modifies the UI)
This solves the issue where OBS would be deprioritized by Windows over
fullscreen games, causing OBS to lag out whereas the games would still
run fine.
Unfortunately, due to some conflicts between FFZ and BTTV (particularly
the fact that having FFZ enabled removes the BTTV settings menu items),
one of them needs to be removed. For the time being, we'll remove FFZ,
because BTTV shows FFZ emojis anyway.
Unbuffered mode is causing the frames of media sources to potentially
have some slight jitter in playback, so instead of using unbuffered mode
with media sources, just leave buffering on. There may be a frame or so
of latency, but it shouldn't be noticeable to most users.
The file duration is a bit of an estimate. This adds 500ms to the
estimated stinger media file duration to help ensure stinger videos
play back in full without getting cut off prematurely.
Lookahead requires examining frame data over a large number of frames,
so when pkv added the change to fully reset the encoder when the bitrate
changes, nvenc will invalidate all buffers and basically starts over
from a completely clean slate.
It's possible to make lookahead work when changing the bitrate, but due
to how lookahead seems to works internally in nvenc, it will cause
continually increasing latency every time the bitrate is updated, which
is unideal.
Additionally, when lookahead is enabled, deadlocks can occur when
changing the bitrate in a thread other than the graphics thread.
Currently we allow it to be reset outside of the graphics thread. From
limited investigating, it would appear this deadlock occurs because
nvenc is locking and releasing old textures.
So instead of dealing with all these potential issues, disable the
ability to adjust bitrate when the user has lookahead enabled on nvenc.
It's not really worth implementing dynamic bitrate support when
lookahead is enabled if the latency is just going to continually
increase for every bitrate adjustment anyway.
This reverts commit d9a48426042d184f5ab2a64a160a2fcd7464c173.
Some people have been reporting that this is being triggered despite
having plenty of disk space. So revert this until this issue is
investigated in more detail.
When using custom FFmpeg output mode, the check would instead use the
standard recording path which is no longer visible in the settings. This
commit also simplifies the checks by moving the duplicated code to a new
function.
If a user has a tremendous amount of media files, this can cause
instability. Instead, make hardware decoding something the user has to
explicitly enable.
Although hardware decoding was technically enabled by default even
before we fixed it, fixing it was essentially a change to defaults for
users because it was just not even available before version 24.
This fixes a freeze that can occur if you try to destroy browser while
another browser is being created. The CEF UI thread has to wait on a
window message to the main application UI thread, meanwhile the destroy
call in the main application UI thread is waiting on the CEF UI thread,
thus causes a deadlock.
Now that we have the SetParent(hwnd, nullptr) code that detaches the CEF
window from the Qt window, we no longer have to worry about
synchronously shutting down the browser, so instead of waiting for that
operation to finish, just allow it to occur asynchronously.
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.
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.