- 31 5月, 2019 30 次提交
-
-
由 Romain Vimont 提交于
The socket used the device-to-computer direction to stream the video and the computer-to-device direction to send control events. Some features, like copy-paste from device to computer, require to send non-video data from the device to the computer. To make them possible, use two sockets: - one for streaming the video from the device to the client; - one for control/events in both directions.
-
由 Romain Vimont 提交于
A string is serialized as a length (2 bytes) followed by the string data (non nul-terminated). For now, it is used only once, but we will need to serialize strings in other events.
-
由 Romain Vimont 提交于
This will avoid to produce invalid UTF-8 results (although unlikely).
-
由 Romain Vimont 提交于
This will help to avoid truncating a UTF-8 string in the middle of a code point, producing an invalid UTF-8 result.
-
由 Romain Vimont 提交于
Add missing tests for serialization and deserialization of control events.
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
The framework class android.graphics.Point cannot be used in unit tests. Implement our own Point.
-
由 Romain Vimont 提交于
Several commands were grouped under the same event type "command", with a separate field to indicate the actual command. Move these commands at the same level as other control events. It will allow to implement commands with arguments.
-
由 Romain Vimont 提交于
If the stream is stopped, av_read_frame() will be woken up and yield a corrupted packet. Do not try to decode or record it.
-
由 Romain Vimont 提交于
The sockets may be closed and shutdown on server_stop(). This will interrupt the stream and controller threads more quickly and gracefully.
-
由 Romain Vimont 提交于
The cleanup is not linear: for example, the server must be stopped and its sockets must be shutdown after the stream and controller are stopped (so that they don't continue processing garbage), but before they are joined, to avoid a deadlock if they are blocked on a socket read. Simplify the spaghetti-cleanup by keeping trace of initialization at runtime.
-
由 Romain Vimont 提交于
Partial read is impossible for 1 byte, so net_recv_all() is useless.
-
由 Romain Vimont 提交于
Only use 2 branches, using either forward or remote tunnel.
-
由 Romain Vimont 提交于
The resulting socket is accessible from the server instance, there is no need to return it. This paves the way to use several sockets in parallel.
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
Replace the file_handler_request_queue implementation by cbuf.
-
由 Romain Vimont 提交于
Replace the control_event_queue implementation by cbuf.
-
由 Romain Vimont 提交于
Add a circular buffer implementation, to factorize multiple specific queues implementation.
-
由 Romain Vimont 提交于
Add a function to read 16 bits in big-endian to a uint16_t.
-
由 Romain Vimont 提交于
So that they can be used both on const and non-const input buffers.
-
由 Romain Vimont 提交于
control_event_serialize() returns the number of bytes written, so the type should be size_t.
-
由 Romain Vimont 提交于
The variable condition was not destroyed on strdup() failure.
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
This will avoid conflicts with future device events.
-
由 Romain Vimont 提交于
Use parentheses to avoid unexpected results. For example, make: 2 * SERIALIZED_EVENT_MAX_SIZE expand to: 2 * (3 + TEXT_MAX_LENGTH) instead of: 2 * 3 + TEXT_MAX_LENGTH
-
由 Romain Vimont 提交于
The struct control_event does not use mutexes, and net.h does not need SDL_platform.h.
-
由 Romain Vimont 提交于
Previous refactorings broke indentation.
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
Commit dfed1b25 replaced SDL types by standard types in sources, but tests were not updated.
-
由 Romain Vimont 提交于
To avoid mixing SDL_malloc()/SDL_strdup() with free(), or malloc() with SDL_free(), always use the SDL version.
-
- 30 5月, 2019 1 次提交
-
-
由 Romain Vimont 提交于
Checkstyle wants a specific order of imports.
-
- 28 5月, 2019 1 次提交
-
-
由 Romain Vimont 提交于
-
- 27 5月, 2019 1 次提交
-
-
由 Romain Vimont 提交于
On pressing Home key on the computer, move the cursor to the beginning of the line instead of going back to the home screen. <https://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_HOME> <https://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_MOVE_HOME> Fixes (part of) <https://github.com/Genymobile/scrcpy/issues/555>.
-
- 24 5月, 2019 5 次提交
-
-
由 Romain Vimont 提交于
The file handler owns the filename string, so it needs to free it. Therefore, it should not be a pointer-to-const.
-
由 Romain Vimont 提交于
The file handler owns the serial, so it needs to free it. Therefore, it should not be a pointer-to-const.
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
If loading the icon from xpm fails, launch scrcpy without window icon. <https://github.com/Genymobile/scrcpy/issues/539>
-
- 20 5月, 2019 2 次提交
-
-
由 Romain Vimont 提交于
SDL_CreateRGBSurfaceFrom() may return NULL, causing a segfault. <https://github.com/Genymobile/scrcpy/issues/539>
-
由 Romain Vimont 提交于
Some characters may not be injected (e.g. '\r`). Log them instead of ignoring them silently.
-