In the recorder, if the video or audio stream is disabled, do not wait
for its initialization (it will never happen) to process the header.
In that case (scrcpy --no-audio --record=file.mp4), this caused the
whole content to be buffered in memory, and written only on exit.
The sc_cond_wait() in sc_recorder_process_header() needs to be notified
of changes to video_init/audio_init (protected by stream_cond) and
video_queue/audio_queue (protected by queue_cond).
Use only one condition variable to simplify.
The flag is used to reset the capture (restart the encoding) on rotation
change. It will also be used for other events (on folding change), so
rename it.
PR #3979 <https://github.com/Genymobile/scrcpy/pull/3979>
The comment was outdated:
- the "meta" header is now always present (not only when recording is
enabled);
- it is not only used for the video stream, but also for the audio
stream.
On some window managers (e.g. on Windows), performing a resize while the
window is minimized does nothing (the restored window keeps its old
size).
Therefore, like for maximized and fullscreen states, wait for the window
to be restored to apply a resize.
Refs #3947 <https://github.com/Genymobile/scrcpy/issues/3947>
When the scrcpy window is minimized on Windows with D3D9, texture
creation and update fail.
In that case, do not terminate scrcpy. Instead, store the pending size
or frame to update, to attempt again during the next update or
rendering.
Fixes#3947 <https://github.com/Genymobile/scrcpy/issues/3947>
Some server parameters may depend on one another. For example,
audio_bit_rate is meaningless if audio is false.
But it is inconsistent to disable some parameters based on these
dependencies checks, but not others. Handling all dependencies between
parameters would add too much complexity for no benefit.
So just pass individual parameters independently.
PR #3978 <https://github.com/Genymobile/scrcpy/pull/3978>
Contrary to the other tasks (controller and audio capture/encoding), the
screen encoder was executed synchronously. As a consequence,
scrcpy-server could not terminate until the screen encoder returned.
Convert it to an async processor. This allows to terminate on controller
error, and this paves the way to disable video mirroring.
PR #3978 <https://github.com/Genymobile/scrcpy/pull/3978>
The async processors use the socket file descriptors from the
connection. Therefore, the connection must not be closed before all
async processor threads are joined.
PR #3978 <https://github.com/Genymobile/scrcpy/pull/3978>
Reword the supported API versions for audio forwarding sentence to
clarify that it supports API >= 30
PR #3949 <https://github.com/Genymobile/scrcpy/pull/3949>
Signed-off-by: Romain Vimont <rom@rom1v.com>
By default, SDL creates an OpenGL 2.1 context on macOS for an OpenGL
renderer. As a consequence, mipmapping is not supported.
Force to use a core profile context, to get a higher version.
Before:
INFO: Renderer: opengl
INFO: OpenGL version: 2.1 NVIDIA-14.0.32 355.11.11.10.10.143
WARN: Trilinear filtering disabled (OpenGL 3.0+ or ES 2.0+ required)
After:
INFO: Renderer: opengl
DEBUG: Creating OpenGL Core Profile context
INFO: OpenGL version: 4.1 NVIDIA-14.0.32 355.11.11.10.10.143
INFO: Trilinear filtering enabled
when running with:
scrcpy --verbosity=debug --render-driver=opengl
Note: Since SDL_CreateRenderer() causes a fallback to OpenGL 2.1, the
profile and version attributes have to be set and the context created
_after_.
PR #3895 <https://github.com/Genymobile/scrcpy/pull/3895>
Signed-off-by: Romain Vimont <rom@rom1v.com>