Romain Vimont
5ee59e0f13
Add thread priority API
...
Expose an API to change the priority of the current thread.
2023-03-10 22:22:16 +01:00
Romain Vimont
d66b0b3dcc
Add compat support for FFmpeg < 5.1
...
The new chlayout API has been introduced in FFmpeg 5.1. Use the old
channel_layout API on older versions.
PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757 >
2023-03-10 22:22:15 +01:00
Romain Vimont
6dceb32817
Add compat for reallocarray()
...
This function fails safely in the case where the multiplication would
overflow.
2023-03-10 22:22:15 +01:00
Romain Vimont
059ec45f82
Add jrand48()/nrand48() compat functions
...
These functions are not available on all platforms.
2023-01-26 18:11:23 +01:00
Romain Vimont
fa5b2a29e9
Add missing SC_ prefix to header guards
2022-04-12 23:59:01 +02:00
Romain Vimont
8c50342fb2
Move SC_PRIsizet to compat.h
...
Define the printf format macro for size_t in compat.h so that it can be
used from anywhere.
PR #3005 <https://github.com/Genymobile/scrcpy/pull/3005 >
2022-02-09 09:53:19 +01:00
Romain Vimont
dca2c5f94f
Require SDL >= 2.0.5
...
Icon loading uses SDL_CreateRGBSurfaceWithFormatFrom(), available since
SDL 2.0.5 (in 2016).
Refs #2862 <https://github.com/Genymobile/scrcpy/issues/2862 >
2021-12-06 23:49:55 +01:00
Romain Vimont
d5f6697f3a
Add (v)asprintf compatibility functions
...
In case they are not available on the platform.
2021-11-24 19:55:00 +01:00
Romain Vimont
2d5525eac1
Move PRIu64 Windows workaround to compat.h
...
So that we can use it from several files.
PR #2814 <https://github.com/Genymobile/scrcpy/pull/2814 >
2021-11-23 21:15:05 +01:00
Romain Vimont
ba547e3895
Configure feature test macros in meson
...
Refs #2807 <https://github.com/Genymobile/scrcpy/pull/2807 >
Co-authored-by: RipleyTom <RipleyTom@users.noreply.github.com>
2021-11-21 00:20:11 +01:00
Romain Vimont
226f3b2c91
Add missing include config.h
2021-11-21 00:13:25 +01:00
Romain Vimont
13c4aa1a3b
Disable synthetic mouse events from touch events
...
Touch events with id SDL_TOUCH_MOUSEID are ignored anyway, but it is
better not to generate them in the first place.
2021-10-31 12:45:59 +01:00
Romain Vimont
af228706f1
Fix compatibility with old FFmpeg
...
V4L2 sink used a "url" field format AVFormatContext which has been
introduced in lavf 58.7.100.
Fixes #2382 <https://github.com/Genymobile/scrcpy/issues/2382 >
Refs <ea3672b7d6
>
Refs <fa8308d3d4
>
2021-06-13 19:20:57 +02:00
Romain Vimont
5d9e96dc4e
Remove compat with old FFmpeg codec params API
...
The new API has been introduced in 2016 in libavformat 57.xx, it's very
old.
This will avoid to maintain two code paths for codec parameters.
2021-04-25 14:38:42 +02:00
Romain Vimont
de9b79ec2d
Remove compat with old FFmpeg decoding API
...
The new API has been introduced in 2016 in libavcodec 57.xx, it's very
old.
This will avoid to maintain two code paths for decoding.
2021-04-25 14:38:42 +02:00
Romain Vimont
c0dde0fade
Provide strdup() compat
...
Make strdup() available on all platforms.
2021-02-17 09:53:25 +01:00
Romain Vimont
ab912c23e7
Define feature test macros in common.h
...
This enables necessary functions once for all.
As a consequence, define common.h before any other header.
2021-01-17 14:08:48 +01:00
Romain Vimont
037be4af21
Fix compat missing include
...
The header libavformat/version.h was included, but not
libavcodec/version.h.
As a consequence, the LIBAVCODEC_VERSION_INT definition depended on the
caller includes.
2021-01-08 19:21:54 +01:00
Sebastian Krzyszkowiak
b941854c73
Disable X11 compositor bypass
...
Compositor bypass is meant for fullscreen games consuming lots of GPU
resources. For a light app that will usually be windowed, this only
causes unnecessary compositor suspends, especially visible (and
annoying) with complying window manager like KWin.
Signed-off-by: Romain Vimont <rom@rom1v.com>
2019-05-05 17:35:00 +02:00
Romain Vimont
1c1fe5ec53
Use "always on top" only for SDL >= 2.0.5
...
The flag SDL_WINDOW_ALWAYS_ON_TOP is available since SDL 2.0.5.
Do not use it if SDL is older, to fix compilation failure.
Fixes <https://github.com/Genymobile/scrcpy/issues/432 >
2019-02-16 15:28:56 +01:00
Romain Vimont
751600a7f9
Move all compat ifdefs definitions to compat.h
...
This allows to give a proper name to features requirements.
2019-02-16 15:28:56 +01:00