For AV1, the config packet must not be merged with the next non-config
packet.
This fixes the following error when passing --video-codec=av1:
> INFO: [FFmpeg] libdav1d 1.3.0
> ERROR: [FFmpeg] Unknown OBU type 0 of size 29393
> ERROR: [FFmpeg] Error parsing OBU data
> ERROR: Decoder 'video': could not send video packet: -1094995529
PR #4487 <https://github.com/Genymobile/scrcpy/pull/4487>
The SDL video subsystem may be initialized so that clipboard
synchronization works even without video playback.
But if the video subsystem initialization fails (e.g. because no video
device is available), consider it as an error only if video playback is
enabled.
Refs 5e59ed3135Fixes#4477 <https://github.com/Genymobile/scrcpy/issues/4477>
On some Samsung devices, DisplayManagerGlobal.getDisplayInfoLocked()
calls ActivityThread.currentActivityThread().getConfiguration(), which
requires a non-null ConfigurationController.
Fixes <https://github.com/Genymobile/scrcpy/issues/4467>
Fix the following warning/error:
../app/src/cli.c:2158:17: warning: a label can only be part of a
statement and a declaration is not a statement [-Wpedantic]
With some compilers, this is an error rather than a pedantic warning.
Refs <https://github.com/Genymobile/scrcpy/issues/2256#issuecomment-1467008307>
Install all the prebuilt dependencies for Windows to a specific folder,
and use meson command line options to specify their location.
This removes crossbuild-specific code from the meson scripts and will
simplify dependency upgrades.
PR #4460 <https://github.com/Genymobile/scrcpy/pull/4460>
On Android 14 (Pixel 8), a device rotation while the camera app was
running resulted in an incorrect capture.
Destroying and recreating the display fixes the issue.
Audio PTS are retrieved by AudioRecord.getTimestamp(), so they do not
necessarily exactly match the number of samples (this allows to take
drift and lag into account).
As a consequence, two consecutive timestamps in microseconds may
sometimes end up within the same millisecond, causing the warning. This
is particularly true for the Matroska muxer which uses a timebase of
1/1000 (1 ms precision).
Since this is "expected", lower the log level from warning to debug.
If the difference of PTS between two consecutive blocks of audio is less
than 1 sample, then it will be considered as non-increasing by FFmpeg
muxers having a time_base of 1/sample_rate.
Increase the PTS by 1 sample instead.
If several reads are performed for a single captured audio block (e.g.
if the read size is smaller than the captured block), then the provided
timestamp was the same for all packets.
Recompute the timestamp for each of them.
In practice, the system captures audio samples by blocks of 1024
samples.
Remplace the hardcoded value of 5 milliseconds (240 samples), and let
AudioRecord fill the input buffer provided by MediaCodec (or by
AudioRawRecorder), with a maximum size of 1024 samples (just in case).
FLAC is not low latency: the default encoder produces blocks of 4096
samples, which represent ~85.333ms.
Increase the audio buffer by default so that audio playback works.