Commit graph

22 commits

Author SHA1 Message Date
PatTheMav aa137f0766 deps: Update CMake target source lists with alphabetic sorting
Also manually updates some CMake script files to make code more
readable.
2023-12-19 17:59:44 -05:00
Ryan Foster 41a915db9e deps: Update CMake minimum to 3.22
Since Ubuntu 22.04 is now our minimum supported Ubuntu version, and it
has CMake 3.22, let's make CMake 3.22 the minimum CMake version.
2023-08-05 16:45:46 -07:00
PatTheMav 6e07b86729 cmake: Remove EXCLUDE_FROM_ALL directive from interface libraries 2023-04-04 17:27:54 +00:00
PatTheMav d5e894ebb3 deps: Fix lower version boundary for file-updater
Version 3.16 required for Linux compatibility.
2023-03-29 13:11:33 -04:00
PatTheMav 349372b3b3 cmake: Add changes for CMake build framework 3.0
New code path only taken if OBS_CMAKE_VERSION is set to 3.0.0 or
greater, old functionality remains unchanged.
2023-03-26 18:20:38 -04:00
gxalpha 283b6a4789 deps/file-updater: Use LOG_INFO log priority for info logging 2023-03-18 15:32:35 -07:00
Richard Stanway 85addc3dac UI, file-updater, rtmp-services: Enable curl ALPN support
In the years since this code was added, ALPN is now widely supported,
and NPN is being removed entirely in the latest version of nginx. It's
time to start using ALPN!
2022-03-24 17:10:01 -07:00
PatTheMav dba1041034
deps: Update CMakeLists.txt for dependencies 2022-03-16 23:11:07 +01:00
Richard Stanway 5889e2905e CMake: Set PIC for all library targets
Fixes https://github.com/obsproject/obs-studio/issues/3436
2020-09-09 01:55:50 +02:00
jp9000 7993179466 cmake: Add cmake folders 2020-05-13 06:52:37 -07:00
Richard Stanway 49bd76755b Make cert revocation check fails non-fatal on Win
Instead of erroring out completely when it can't determine if the
certificate is valid, proceed anyway.  This matches how web browsers
treat failed cert revocation checks.  schannel just has somewhat
paranoid defaults.
2020-03-13 07:48:47 -07:00
Richard Stanway dd3ed096f8
file-updater: Use transparent HTTP compression 2019-07-17 17:22:09 +02: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
Thomas De Schampheleire 379137d039 file-updater: fix crash due to network timeout
If there is no network connection, OBS crashes after 5 minutes idling
with following crash:

*** longjmp causes uninitialized stack frame ***: obs terminated
======= Backtrace: =========
/lib64/libc.so.6(+0x6f1e3)[0x7f8f95f901e3]
/lib64/libc.so.6(__fortify_fail+0x37)[0x7f8f96018ba7]
/lib64/libc.so.6(+0xf7add)[0x7f8f96018add]
/lib64/libc.so.6(__longjmp_chk+0x29)[0x7f8f96018a39]
/usr/lib64/libcurl.so.4(+0xa5d5)[0x7f8f979b75d5]
/lib64/libpthread.so.0(+0x10e30)[0x7f8f962cae30]
/lib64/libc.so.6(__poll+0x2d)[0x7f8f95fff46d]
/usr/lib64/libglib-2.0.so.0(+0x4a64c)[0x7f8f91b5564c]
/usr/lib64/libglib-2.0.so.0(g_main_context_iteration+0x2c)[0x7f8f91b5575c]
/usr/lib64/libQt5Core.so.5(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x5f)[0x7f8f9706c1ff]
/usr/lib64/libQt5Core.so.5(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xfa)[0x7f8f9701defa]
/usr/lib64/libQt5Core.so.5(_ZN16QCoreApplication4execEv+0x9c)[0x7f8f970258fc]
obs(main+0x5ac)[0x4773dc]
/lib64/libc.so.6(__libc_start_main+0xf0)[0x7f8f95f41700]
obs(_start+0x29)[0x478389]

Internet search [1] revealed that this is a libcurl bug that can be worked
around by asking curl not to install signal handlers.

[1] https://stackoverflow.com/a/10755612
2017-10-05 13:57:27 +02:00
jp9000 81fa5179cd deps/file-updater: Add func to get single remote file 2017-07-31 13:56:20 -07:00
jp9000 45015db9d8 file-updater: Fix warning parameter
The parameter was being passed as a pointer instead of being
dereferenced
2016-04-24 12:59:55 -07:00
jp9000 672d0b3716 file-updater: Only use SSL ALPN opt if curl version up to date 2016-04-23 08:17:47 -07:00
Richard Stanway 15bec2a4d2
file-updater: Add missing dstr_free calls 2016-04-22 18:16:53 +02:00
Richard Stanway 5ddc3d258e
file-updater: Fix format string 2016-04-21 02:06:23 +02:00
Richard Stanway f7fce1c802
file-updater: Add support for HTTP 304 Not Modified using ETag, disable ALPN 2016-04-21 02:03:14 +02:00
jp9000 4a767e01ec deps/file-updater: Fix warning 2015-08-21 18:37:11 -07:00
jp9000 d3eaeda27c deps/file-updater: Add file updater util. lib
This allows plugins to update and cache data files from a remote source.

Here are the steps that occur when the API initiates an update check:

1.) It checks to see if the local files are greater than the cached
    files.  If the local version is newer (for whatever reason), it
    replaces the cached version(s) with the local version.

2.) A packages.json file is downloaded from the specified URL.  That
    packages.json file contains a version number and a list of files to
    be updated.

3.) If the downloaded package version is greater than the cached
    version, executes step 4-5 on each file.

4.) Checks the version for the file to update in packages.json, and if
    the version is greater than the cached version, proceeds to step 5,
    otherwise repeat step 4-5 for other files.

5.) Calls the callback given to the update function (if any) with the
    file information (file name, buffer, etc), and if the callback
    returns true, allows the cached file to be updated and replaced,
    otherwise goes back to step 4-6 for the rest of the files.

NOTE: Files are never modified directly.  All file saving/modification
is performed in a temporary directory, and then files are moved to their
destination.  This should eliminate any possibility of file corruption
(or at least dramatically reduce the possibility).
2015-08-19 15:48:04 -07:00