- 16 2月, 2018 1 次提交
-
-
由 Romain Vimont 提交于
SDL_net is not very suitable for scrcpy. For example, SDLNet_TCP_Accept() is non-blocking, so we have to wrap it by calling many SDL_Net-specific functions to make it blocking. But above all, SDLNet_TCP_Open() is a server socket only when no IP is provided; otherwise, it's a client socket. Therefore, it is not possible to create a server socket bound to localhost, so it accepts connections from anywhere. This is a problem for scrcpy, because on start, the application listens for nearly 1 second until it accepts the first connection, supposedly from the device. If someone on the local network manages to connect to the server socket first, then they can stream arbitrary H.264 video. This may be troublesome, for example during a public presentation ;-) Provide our own simplified API (net.h) instead, implemented for the different platforms.
-
- 15 2月, 2018 3 次提交
-
-
由 Romain Vimont 提交于
The "screen control" handled user input, which happened to be only used to control the screen. The controller and screen were passed to every function. Instead, group them in a struct input_manager. The purpose is to add a new shortcut to enable/disable FPS counter. This feature is not related to "screen control", and will require access to the "frames" instance.
-
由 Romain Vimont 提交于
It can be initially configured by: meson builddir -Dskip_frames=false Or on an existing builddir by: mesonconf builddir -Dskip_frames=false
-
由 Romain Vimont 提交于
Remove frame counter from scrcpy.c and add a new FPS counter, logging as INFO the measured frame rate every second (on new frame).
-
- 14 2月, 2018 3 次提交
-
-
由 Romain Vimont 提交于
Older versions of Meson are too limited, and it's simple to install a newer version ("pip3 install meson").
-
由 Romain Vimont 提交于
Since Meson 0.44, subproject_dir may not be '.' anymore. This implies we must move app/ and server/ to a subprojects/ directory, which requires to also change some gradle files. Instead, just use subdir(), with options to disable building of the app or the server.
-
由 Romain Vimont 提交于
The client was built with Meson, the server with Gradle, and were run by a Makefile. Add a Meson script for the server (which delegates to Gradle), and a parent script to build and install both the client and the server to the system, typically with: meson --buildtype release build cd build ninja sudo ninja install In addition, use a separate Makefile to build a "portable" version of the application (where the client expects the server to be in the current directory). Typically: make release-portable cd dist/scrcpy ./scrcpy This is especially useful for Windows builds, which are not "installed".
-
- 13 2月, 2018 2 次提交
-
-
由 Romain Vimont 提交于
The current meson version is able to generate a config.h from a configuration data object without any template. However, older versions of meson require a template, so provide it for compatibility.
-
由 Romain Vimont 提交于
Old versions of meson do not support set_quoted(). Replace the call by the old-fashioned manual quotation.
-
- 12 2月, 2018 1 次提交
-
-
由 Romain Vimont 提交于
In release mode, use the default log priorities.
-
- 09 2月, 2018 2 次提交
-
-
由 Romain Vimont 提交于
Move the code handling user input from scrcpy.c to a separate file, screencontrol.c.
-
由 Romain Vimont 提交于
Move the code to read the initial device info from scrcpy.c to a separate file, device.c.
-
- 08 2月, 2018 2 次提交
-
-
由 Romain Vimont 提交于
The file scrcpy.c contains too many different things in addition to the main logic, so move the screen code to a separate file, screen.c.
-
由 Romain Vimont 提交于
The struct decoder is defined in decoder.h. For naming consistency, define the struct controller in controller.h.
-
- 07 2月, 2018 3 次提交
-
-
由 Romain Vimont 提交于
Expose scrcpy version via -v or --version.
-
由 Romain Vimont 提交于
The skip_frames flag was a non-configurable runtime flag. Since it is not exposed to the user, there is no need for a (possible) runtime cost. For testing purpose, we still want it to be configurable, so make it a compilation flag.
-
由 Romain Vimont 提交于
Make meson generate config.h with configured values.
-
- 06 2月, 2018 1 次提交
-
-
由 Romain Vimont 提交于
We encounter some problems with SDL2_image on MSYS2 (Windows), so implement our own XPM parsing which does not depend on SDL_image. The input XPM is considered safe (it's in our source repo), so do not check XPM format errors. This implies that read_xpm() is not safe to call on any unsafe input. Although less straightforward, use SDL_CreateRGBSurfaceFrom() instead of SDL_CreateRGBSurfaceWithFormatFrom() because it is available with SDL versions older than 2.0.5.
-
- 05 2月, 2018 1 次提交
-
-
由 Romain Vimont 提交于
Add a bugdroid icon loaded from an XPM.
-
- 23 1月, 2018 1 次提交
-
-
由 Romain Vimont 提交于
Rename scrcpy.c to main.c (this file handles the command line parsing), and screen.c to scrcpy.c (it exposes the entry point scrcpy()).
-
- 22 1月, 2018 1 次提交
-
-
由 Romain Vimont 提交于
To lighten screen.c, move start_server() and stop_server() to a separate file.
-
- 19 1月, 2018 3 次提交
-
-
由 Romain Vimont 提交于
Test serialization of the 4 types of events (keycode, text, mouse, scroll).
-
由 Romain Vimont 提交于
Test our custom string handling functions.
-
由 Romain Vimont 提交于
To control the device from the computer: - retrieve mouse and keyboard SDL events; - convert them to Android events; - serialize them; - send them on the same socket used by the video stream (but in the opposite direction); - deserialize the events on the Android side; - inject them using the InputManager.
-
- 04 1月, 2018 1 次提交
-
-
由 Romain Vimont 提交于
Move unix/ and win/ to sys/, so that we can use android/ for android headers without confusion.
-
- 18 12月, 2017 1 次提交
-
-
由 Romain Vimont 提交于
This duplicates chars in the final binary.
-
- 12 12月, 2017 1 次提交
-
-
由 Romain Vimont 提交于
Start a new clean history from here.
-