- 20 2月, 2021 1 次提交
-
-
由 Romain Vimont 提交于
Since Android 12, secure displays could not be created with shell permissions anymore. Refs commit 1fdde490 Fixes #2129 <https://github.com/Genymobile/scrcpy/issues/2129>
-
- 17 2月, 2021 17 次提交
-
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
Now that all screen-related events are handled from screen.c, there is no need for a separate method for window events.
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
This paves the way to handle EVENT_NEW_FRAME from screen.c, by allowing to call screen_update_frame() without an explicit video_buffer instance.
-
由 Romain Vimont 提交于
After the struct screen is initialized, the window and the renderer are necessarily valid, so there is no need o check in screen_destroy().
-
由 Romain Vimont 提交于
This will avoid corner cases where we need to resize while no frame has been received yet.
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
The flag is used only locally, there is no need to store it in the screen structure.
-
由 Romain Vimont 提交于
There were only two frames simultaneously: - one used by the decoder; - one used by the renderer. When the decoder finished decoding a frame, it swapped it with the rendering frame. Adding a third frame provides several benefits: - the decoder do not have to wait for the renderer to release the mutex; - it simplifies the video_buffer API; - it makes the rendering frame valid until the next call to video_buffer_take_rendering_frame(), which will be useful for swscaling on window resize.
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
Add a function to assert that the mutex is held (or not).
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
The goal is to expose a consistent API for system tools, and paves the way to make the "core" independant of SDL in the future.
-
由 Romain Vimont 提交于
The functions SDL_malloc(), SDL_free() and SDL_strdup() were used only because strdup() was not available everywhere. Now that it is available, use the native version of these functions.
-
由 Romain Vimont 提交于
Make strdup() available on all platforms.
-
- 14 2月, 2021 2 次提交
-
-
由 Romain Vimont 提交于
The port_range is used from "struct server_params", the copy in "struct server" was unused.
-
由 Romain Vimont 提交于
-
- 24 1月, 2021 5 次提交
-
-
由 Romain Vimont 提交于
Small unsigned integers promote to signed int. As a consequence, if v is a uint8_t, then (v << 24) yields an int, so the left shift is undefined if the MSB is 1. Cast to uint32_t to yield an unsigned value. Reported by USAN (meson x -Db_sanitize=undefined): runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
-
由 Romain Vimont 提交于
Terminating the file handler current process may be either a "push" or "install" command.
-
由 Romain Vimont 提交于
An "adb push" command is not terminated by SIGTERM.
-
由 Romain Vimont 提交于
The current process could be waited both by run_file_handler() and file_handler_stop(). To avoid the race condition, wait the process without closing, then close with mutex locked.
-
由 Romain Vimont 提交于
There were two versions: process_wait() and process_wait_noclose(). Expose a single version with a flag (it was already implemented that way internally).
-
- 23 1月, 2021 1 次提交
-
-
由 Romain Vimont 提交于
The function process_wait() returned a bool (true if the process terminated successfully) and provided the exit code via an output parameter exit_code. But the returned value was always equivalent to exit_code == 0, so just return the exit code instead.
-
- 18 1月, 2021 2 次提交
-
-
由 Romain Vimont 提交于
The function control_msg_serialize() returns a size_t.
-
由 Romain Vimont 提交于
-
- 17 1月, 2021 1 次提交
-
-
由 Romain Vimont 提交于
This enables necessary functions once for all. As a consequence, define common.h before any other header.
-
- 09 1月, 2021 4 次提交
-
-
由 Romain Vimont 提交于
Include config.h and compat.h in common.h, and include common.h from all source files.
-
由 Romain Vimont 提交于
The size, point and position structs were defined in common.h. Move them to coords.h so that common.h could be used for generic code to be included in all source files.
-
由 Romain Vimont 提交于
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.
-
由 Romain Vimont 提交于
It had been replaced by struct sc_port_range in scrcpy.h.
-
- 08 1月, 2021 4 次提交
-
-
由 Romain Vimont 提交于
On Linux, waitpid() both waits for the process to terminate and reaps it (closes its handle). On Windows, these actions are separated into WaitForSingleObject() and CloseHandle(). Expose these actions separately, so that it is possible to send a signal to a process while waiting for its termination without race condition. This allows to wait for server termination normally, but kill the process without race condition if it is not terminated after some delay.
-
由 Romain Vimont 提交于
Adding "simple" in the function name brings no benefit.
-
由 Romain Vimont 提交于
Declare all the source files (including the platform-specific ones) at the beginning.
-
由 Romain Vimont 提交于
The process API provides the system-specific implementation, the adb API uses it to expose adb commands.
-
- 04 1月, 2021 2 次提交
-
-
由 Romain Vimont 提交于
Some devices use big display id values. Refs #2009 <https://github.com/Genymobile/scrcpy/issues/2009>
-
由 Romain Vimont 提交于
Due to gotos, "ret" may be returned uninitialized.
-
- 03 1月, 2021 1 次提交
-
-
由 clesiemo3 提交于
PR #2004 <https://github.com/Genymobile/scrcpy/pull/2004> Signed-off-by: NRomain Vimont <rom@rom1v.com>
-