Remove two unused variables that are causing a compiler warning on gcc.
The size was probably added in the past to calculate the the packet
size, but in the end was not actually needed.
Fix a warning from gcc about one of the const keywords being ignored.
This happens because the returned type is not a reference contrary to
the methods above.
This fixes a case where the user sets an IP but then that IP is no longer
valid, resulting in OBS showing "Default" in the settings but still trying
to bind to the invalid IP internally.
Make sure the target file exists before attempting to create a backup.
This will allow for the function to work correctly if the target does
not yet exist.
The auto-configuration wizard is designed to allow first-time or
novice/uneducated users or to set up video and encoding settings in a
very quick and easy way. It'll automatically perform a bandwidth test,
and/or test the user's video settings to determine the most ideal
settings for streaming and recording (assuming a 1-pc setup).
Adds 1920x1080 and 1280x720 to the drop-down list of "default"
base/canvas resolutions rather than just the user's monitor resolutions,
in case the user wants to set the canvas to 1920x1080 or 1280x720
without having to manually type it in. Added as a minor convenience.
The reasoning behind this is because having a very large canvas size can
negatively affect the user experience -- most sources end up seeming
smaller than they need to be to users, resulting in the user needing to
size up the sources, or in the case of webcams it makes the user try to
use much larger webcam resolutions than they should reasonably need to
do, resulting in higher unintentional resource usage. The program will
additionally require more fillrate to render and downscale things as
well.
This applies only to the default starting base/canvas resolution for new
users only.
Additionally, users that ran the program pre-19 will be unaffected by
this change, as it will detect that and set the old defaults to prevent
an unexpected change in resolution for those users.
If defaults change for the base or output resolutions, it could
unintentionally affect users who are using defaults by chance and have
never changed those values.
Instead, save those values are soon as defaults are set if the users
haven't already set them.
x264 on ultrafast won't drop any b-frames, so it might buffer packets a
bit too much in that case.
The frame drop duration calculation now searches for the first valid
video frame within the packets buffer. Additionally, it no longer
prevents frame dropping for a specific time after dropping frames,
because the first case eliminates the need for that.
Prevents lagged frames (frames that took too long to render) to be
counted as skipped frames (frames that are skipped due to encoding
taking too long to process)
Originally, obs_get_video_info would recreate the obs_video_info
structure that was originally passed to it from obs_reset_video. This
changes that to just store a copy of the obs_video_info when calling
obs_reset_video, and then copying that to the parameter of
obs_get_video_info when called.
When frames are skipped the skipped frame count would increment, but the
total frame count would not increment, causing the percentage
calculation to fail.
Additionally, the skipped frames log reporting has been moved to
media-io/video-io.c instead of each output.
libobs' shader language is basically HLSL, and tex.Load uses an int3 for
2D textures, with texture mipmap index for the last component. This bug
bypassed testing because the front-end automatically switches to OpenGL
if D3D11 initialization fails, and when converted to GLSL, works fine
because texelFetch only requires two components. This also means
there's a bug in GLSL shader conversion code, because it's essentially
ignoring the third component when it shouldn't be.
Fix a double free in the settings window that occurs on linux only.
The UI Element already gets deleted above as a child of the
advAudioGroupBox which is not present on linux.
Apart from making the code even more unreadable, this will likely
come back to haunt us if the advAudioGroup will ever be shown on linux.
Eventually, most things should be replaced with Load where applicable
(though in some cases sub-pixel sampling is desired).
This commit also fixes a bug where NV12 async sources wouldn't render
correctly.
On macs, some fonts can be in sub-folders of the font folder, and may
not properly be found. This fixes that to detect directories and make
the lookup recursive.
Allows safely/atomically replacing a file and creating a backup of the
original. The reason for adding this function is because Microsoft
provides a ReplaceFile function which does this in a single call.
A file rename will automatically replace the old file if an older file
exists, and will do so automatically. Unlinking is unnecessary, and may
have a chance of preventing that move operation from being atomic.
Fixes an issue where scene data would reset if the file was not found,
even if a backup file existed. This should prevent those remaining
stray cases where user's scenes would seem to be suddenly deleted if the
original file was deleted for some reason or another. The backup files
should always be available, so this should clear up that last remaining
case.
When building with VS2017 the compiler shows some warnings which is
undesirable.
The compiler rightly complains about declarations which hide older ones
which are trivially fixed.
Finally only POD types should be passed to variadic functions which is
why the String should be converted to c_str().
Relying on the current undefined behavior is a bad idea as it can change
with compilers and compiler versions.
Closesjp9000/obs-studio#902