-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for v4l2loopback #2232
Support for v4l2loopback #2232
Commits on Jan 4, 2021
-
Configuration menu - View commit details
-
Copy full SHA for aa8b571 - Browse repository at this point
Copy the full SHA aa8b571View commit details
Commits on Jan 8, 2021
-
Split command into process and adb
The process API provides the system-specific implementation, the adb API uses it to expose adb commands.
Configuration menu - View commit details
-
Copy full SHA for 4bd9da4 - Browse repository at this point
Copy the full SHA 4bd9da4View commit details -
Move conditional src files in meson.build
Declare all the source files (including the platform-specific ones) at the beginning.
Configuration menu - View commit details
-
Copy full SHA for cc6f502 - Browse repository at this point
Copy the full SHA cc6f502View commit details -
Rename process_simple_wait to process_wait
Adding "simple" in the function name brings no benefit.
Configuration menu - View commit details
-
Copy full SHA for 821c175 - Browse repository at this point
Copy the full SHA 821c175View commit details -
Separate process wait and close
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.
Configuration menu - View commit details
-
Copy full SHA for d580ee3 - Browse repository at this point
Copy the full SHA d580ee3View commit details -
Remove unused struct port_range
It had been replaced by struct sc_port_range in scrcpy.h.
Configuration menu - View commit details
-
Copy full SHA for 1e21519 - Browse repository at this point
Copy the full SHA 1e21519View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 037be4a - Browse repository at this point
Copy the full SHA 037be4aView commit details -
Move common structs to coords.h
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.
Configuration menu - View commit details
-
Copy full SHA for 6385b8c - Browse repository at this point
Copy the full SHA 6385b8cView commit details -
Group common includes into common.h
Include config.h and compat.h in common.h, and include common.h from all source files.
Configuration menu - View commit details
-
Copy full SHA for 59feb2a - Browse repository at this point
Copy the full SHA 59feb2aView commit details
Commits on Jan 17, 2021
-
Define feature test macros in common.h
This enables necessary functions once for all. As a consequence, define common.h before any other header.
Configuration menu - View commit details
-
Copy full SHA for ab912c2 - Browse repository at this point
Copy the full SHA ab912c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8dbb167 - Browse repository at this point
Copy the full SHA 8dbb167View commit details -
Fix size_t incorrectly assigned to int
The function control_msg_serialize() returns a size_t.
Configuration menu - View commit details
-
Copy full SHA for 94eff0a - Browse repository at this point
Copy the full SHA 94eff0aView commit details
Commits on Jan 22, 2021
-
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.
Configuration menu - View commit details
-
Copy full SHA for b8edcf5 - Browse repository at this point
Copy the full SHA b8edcf5View commit details
Commits on Jan 24, 2021
-
Expose a single process_wait()
There were two versions: process_wait() and process_wait_noclose(). Expose a single version with a flag (it was already implemented that way internally).
Configuration menu - View commit details
-
Copy full SHA for 6a50231 - Browse repository at this point
Copy the full SHA 6a50231View commit details -
Fix file_handler process race condition
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.
Configuration menu - View commit details
-
Copy full SHA for 7afd149 - Browse repository at this point
Copy the full SHA 7afd149View commit details -
Kill process with SIGKILL signal
An "adb push" command is not terminated by SIGTERM.
Configuration menu - View commit details
-
Copy full SHA for b566700 - Browse repository at this point
Copy the full SHA b566700View commit details -
Improve file handler error message
Terminating the file handler current process may be either a "push" or "install" command.
Configuration menu - View commit details
-
Copy full SHA for d8e9ad2 - Browse repository at this point
Copy the full SHA d8e9ad2View commit details -
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'
Configuration menu - View commit details
-
Copy full SHA for 97b001e - Browse repository at this point
Copy the full SHA 97b001eView commit details
Commits on Feb 14, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 8e83f3e - Browse repository at this point
Copy the full SHA 8e83f3eView commit details -
Remove unused port_range field
The port_range is used from "struct server_params", the copy in "struct server" was unused.
Configuration menu - View commit details
-
Copy full SHA for ace438e - Browse repository at this point
Copy the full SHA ace438eView commit details
Commits on Feb 17, 2021
-
Configuration menu - View commit details
-
Copy full SHA for c0dde0f - Browse repository at this point
Copy the full SHA c0dde0fView commit details -
Replace SDL_strdup() by strdup()
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.
Configuration menu - View commit details
-
Copy full SHA for 30e619d - Browse repository at this point
Copy the full SHA 30e619dView commit details -
Wrap SDL thread functions into scrcpy-specific API
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.
Configuration menu - View commit details
-
Copy full SHA for f6320c7 - Browse repository at this point
Copy the full SHA f6320c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for d2689fc - Browse repository at this point
Copy the full SHA d2689fcView commit details -
Add a function to assert that the mutex is held (or not).
Configuration menu - View commit details
-
Copy full SHA for 21d206f - Browse repository at this point
Copy the full SHA 21d206fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 54f5c42 - Browse repository at this point
Copy the full SHA 54f5c42View commit details -
Configuration menu - View commit details
-
Copy full SHA for c53bd4d - Browse repository at this point
Copy the full SHA c53bd4dView commit details -
Add intermediate frame in video buffer
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.
Configuration menu - View commit details
-
Copy full SHA for c0c4ba7 - Browse repository at this point
Copy the full SHA c0c4ba7View commit details -
The flag is used only locally, there is no need to store it in the screen structure.
Configuration menu - View commit details
-
Copy full SHA for 862948b - Browse repository at this point
Copy the full SHA 862948bView commit details -
Configuration menu - View commit details
-
Copy full SHA for a566635 - Browse repository at this point
Copy the full SHA a566635View commit details -
Handle window events only once visible
This will avoid corner cases where we need to resize while no frame has been received yet.
Configuration menu - View commit details
-
Copy full SHA for 626094a - Browse repository at this point
Copy the full SHA 626094aView commit details
Commits on Feb 25, 2021
-
Improve error handling in screen initialization
After the struct screen is initialized, the window, the renderer and the texture are necessarily valid, so there is no need to check in screen_destroy().
Configuration menu - View commit details
-
Copy full SHA for 0538e96 - Browse repository at this point
Copy the full SHA 0538e96View commit details -
Reference video buffer from screen
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.
Configuration menu - View commit details
-
Copy full SHA for ea2369f - Browse repository at this point
Copy the full SHA ea2369fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 50b4a73 - Browse repository at this point
Copy the full SHA 50b4a73View commit details -
Now that all screen-related events are handled from screen.c, there is no need for a separate method for window events.
Configuration menu - View commit details
-
Copy full SHA for 76a3d98 - Browse repository at this point
Copy the full SHA 76a3d98View commit details -
Configuration menu - View commit details
-
Copy full SHA for 24b637b - Browse repository at this point
Copy the full SHA 24b637bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9cd1a73 - Browse repository at this point
Copy the full SHA 9cd1a73View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0207e3d - Browse repository at this point
Copy the full SHA 0207e3dView commit details -
Configuration menu - View commit details
-
Copy full SHA for a3aa5ac - Browse repository at this point
Copy the full SHA a3aa5acView commit details -
It makes sense to extract default values for bitrate and port range (which are arbitrary and might be changed in the future). However, the default values for "max size" and "lock video orientation" are naturally unlimited/unlocked, and will never be changed. Extracting these options just added complexity for no benefit, so hardcode them.
Configuration menu - View commit details
-
Copy full SHA for b16b65a - Browse repository at this point
Copy the full SHA b16b65aView commit details
Commits on Mar 3, 2021
-
Inject touch events with smallest detectable size
A value of 1 means the "largest detectable size", a value of 0 means the "smallest detectable size". https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#size https://developer.android.com/reference/android/view/MotionEvent#AXIS_SIZE Fixes #2125 <#2125>
Configuration menu - View commit details
-
Copy full SHA for 218636d - Browse repository at this point
Copy the full SHA 218636dView commit details
Commits on Mar 6, 2021
-
Move fps counter out of video buffer
In order to make video buffer more generic, move out its specific responsibility to count the fps between the decoder and the renderer.
Configuration menu - View commit details
-
Copy full SHA for cb197ee - Browse repository at this point
Copy the full SHA cb197eeView commit details -
Make video buffer more generic
Video buffer is a tool between a frame producer and a frame consumer. For now, it is used between a decoder and a renderer, but in the future another instance might be used to swscale decoded frames.
Configuration menu - View commit details
-
Copy full SHA for 441d3fb - Browse repository at this point
Copy the full SHA 441d3fbView commit details -
Initialize screen before starting the stream
As soon as the stream is started, the video buffer could notify a new frame available. In order to pass this event to the screen without race condition, the screen must be initialized before the screen is started.
Configuration menu - View commit details
-
Copy full SHA for c50b958 - Browse repository at this point
Copy the full SHA c50b958View commit details -
Use a callback to notify a new frame
Make the decoder independant of the SDL even mechanism, by making the consumer register a callback on the video_buffer.
Configuration menu - View commit details
-
Copy full SHA for fb9f984 - Browse repository at this point
Copy the full SHA fb9f984View commit details -
Use a callback to notify frame skip
A skipped frame is detected when the producer offers a frame while the current pending frame has not been consumed. However, the producer (in practice the decoder) is not interested in the fact that a frame has been skipped, only the consumer (the renderer) is. Therefore, notify frame skip via a consumer callback. This allows to manage the skipped and rendered frames count at the same place, and remove fps_counter from decoder.
Configuration menu - View commit details
-
Copy full SHA for cb9c42b - Browse repository at this point
Copy the full SHA cb9c42bView commit details -
Remove screen static initializer
Most of the fields are initialized dynamically.
Configuration menu - View commit details
-
Copy full SHA for 955da3b - Browse repository at this point
Copy the full SHA 955da3bView commit details -
Group screen parameters into a struct
The function screen_init_rendering had too many parameters.
Configuration menu - View commit details
-
Copy full SHA for 597c54f - Browse repository at this point
Copy the full SHA 597c54fView commit details -
Simplify screen initialization
Use a single function to initialize the screen instance.
Configuration menu - View commit details
-
Copy full SHA for cc48b24 - Browse repository at this point
Copy the full SHA cc48b24View commit details -
Configuration menu - View commit details
-
Copy full SHA for 386f017 - Browse repository at this point
Copy the full SHA 386f017View commit details -
Release frame data as soon as possible
During a frame swap, one of the two frames involved can be released.
Configuration menu - View commit details
-
Copy full SHA for eb7e107 - Browse repository at this point
Copy the full SHA eb7e107View commit details
Commits on Mar 9, 2021
-
Configuration menu - View commit details
-
Copy full SHA for d1789f0 - Browse repository at this point
Copy the full SHA d1789f0View commit details
Commits on Mar 11, 2021
-
Fix encoder parameter suggestion
The option is --encoder, not --encoder-name.
Configuration menu - View commit details
-
Copy full SHA for 429fdef - Browse repository at this point
Copy the full SHA 429fdefView commit details
Commits on Mar 14, 2021
-
Use device id 0 for touch/mouse events
Virtual device is only for keyboard sources, not mouse or touchscreen sources. Here is the value of InputDevice.getDevice(-1).toString(): Input Device -1: Virtual Descriptor: ... Generation: 2 Location: built-in Keyboard Type: alphabetic Has Vibrator: false Has mic: false Sources: 0x301 ( keyboard dpad ) InputDevice.getDeviceId() documentation says: > An id of zero indicates that the event didn't come from a physical > device and maps to the default keymap. <https://developer.android.com/reference/android/view/InputEvent#getDeviceId()> However, injecting events with a device id of 0 causes event.getDevice() to be null on the client-side. Commit 26529d3 used -1 as a workaround to avoid a NPE on a specific Android TV device. But this is a bug in the device system, which wrongly assumes that input device may not be null. A similar issue was present in Flutter, but it is now fixed: - <flutter/flutter#30665> - <flutter/engine#7986> On the other hand, using an id of -1 for touchscreen events (which is invalid) causes issues for some apps: <#2125 (comment)> Therefore, use a device id of 0. An alternative could be to find an existing device matching the source, like "adb shell input" does. See getInputDeviceId(): <https://android.googlesource.com/platform/frameworks/base.git/+/master/cmds/input/src/com/android/commands/input/Input.java> But it seems better to indicate that the event didn't come from a physical device, and it would not solve #962 anyway, because an Android TV has no touchscreen. Refs #962 <#962> Fixes #2125 <#2125>
Configuration menu - View commit details
-
Copy full SHA for 40febf4 - Browse repository at this point
Copy the full SHA 40febf4View commit details
Commits on Mar 15, 2021
-
Do not set buttons on touch events
BUTTON_PRIMARY must not be set for touch events: > This button constant is not set in response to simple touches with a > finger or stylus tip. The user must actually push a button. <https://developer.android.com/reference/android/view/MotionEvent#BUTTON_PRIMARY> Fixes #2169 <#2169>
Configuration menu - View commit details
-
Copy full SHA for 0308ef4 - Browse repository at this point
Copy the full SHA 0308ef4View commit details
Commits on Mar 16, 2021
-
Configuration menu - View commit details
-
Copy full SHA for dd453ad - Browse repository at this point
Copy the full SHA dd453adView commit details -
Configuration menu - View commit details
-
Copy full SHA for fb0bcae - Browse repository at this point
Copy the full SHA fb0bcaeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d615a0 - Browse repository at this point
Copy the full SHA 1d615a0View commit details
Commits on Apr 3, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 77447ff - Browse repository at this point
Copy the full SHA 77447ffView commit details