Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
139b3e688a | ||
|
c27d116a66 | ||
|
eac711ace6 | ||
|
af15c72f9c | ||
|
5b1229a55f | ||
|
69858c6f43 | ||
|
e0423653c8 | ||
|
5387644160 | ||
|
2f44da76f4 | ||
|
95c4f03c1b | ||
|
fb47b87eeb | ||
|
dc2fcc46f5 | ||
|
69264703b1 | ||
|
ec4e826976 | ||
|
17e205e54f | ||
|
f751274b17 | ||
|
6469054b15 |
26
.github/workflows/release.yml
vendored
26
.github/workflows/release.yml
vendored
@ -74,6 +74,7 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y meson ninja-build nasm ffmpeg libsdl2-2.0-0 \
|
||||
libsdl2-dev libavcodec-dev libavdevice-dev libavformat-dev \
|
||||
libavutil-dev libswresample-dev libusb-1.0-0 libusb-1.0-0-dev \
|
||||
@ -83,7 +84,7 @@ jobs:
|
||||
run: release/test_client.sh
|
||||
|
||||
build-linux-x86_64:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Check architecture
|
||||
run: |
|
||||
@ -99,6 +100,7 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y meson ninja-build nasm ffmpeg libsdl2-2.0-0 \
|
||||
libsdl2-dev libavcodec-dev libavdevice-dev libavformat-dev \
|
||||
libavutil-dev libswresample-dev libusb-1.0-0 libusb-1.0-0-dev \
|
||||
@ -129,14 +131,12 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y meson ninja-build nasm ffmpeg libsdl2-2.0-0 \
|
||||
libsdl2-dev libavcodec-dev libavdevice-dev libavformat-dev \
|
||||
libavutil-dev libswresample-dev libusb-1.0-0 libusb-1.0-0-dev \
|
||||
mingw-w64 mingw-w64-tools libz-mingw-w64-dev
|
||||
|
||||
- name: Workaround for old meson version run by Github Actions
|
||||
run: sed -i 's/^pkg-config/pkgconfig/' cross_win32.txt
|
||||
|
||||
- name: Build
|
||||
run: release/build_windows.sh 32
|
||||
|
||||
@ -162,14 +162,12 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y meson ninja-build nasm ffmpeg libsdl2-2.0-0 \
|
||||
libsdl2-dev libavcodec-dev libavdevice-dev libavformat-dev \
|
||||
libavutil-dev libswresample-dev libusb-1.0-0 libusb-1.0-0-dev \
|
||||
mingw-w64 mingw-w64-tools libz-mingw-w64-dev
|
||||
|
||||
- name: Workaround for old meson version run by Github Actions
|
||||
run: sed -i 's/^pkg-config/pkgconfig/' cross_win64.txt
|
||||
|
||||
- name: Build
|
||||
run: release/build_windows.sh 64
|
||||
|
||||
@ -208,6 +206,13 @@ jobs:
|
||||
libtool
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
# the default Xcode (and macOS SDK) version can be found at
|
||||
# <https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md#xcode>
|
||||
#
|
||||
# then the minimal supported deployment target of that macOS SDK can be found at
|
||||
# <https://developer.apple.com/support/xcode/#minimum-requirements>
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.13
|
||||
run: release/build_macos.sh aarch64
|
||||
|
||||
# upload-artifact does not preserve permissions
|
||||
@ -244,6 +249,13 @@ jobs:
|
||||
# autoconf and libtool are already installed on macos-13
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
# the default Xcode (and macOS SDK) version can be found at
|
||||
# <https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#xcode>
|
||||
#
|
||||
# then the minimal supported deployment target of that macOS SDK can be found at
|
||||
# <https://developer.apple.com/support/xcode/#minimum-requirements>
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.13
|
||||
run: release/build_macos.sh x86_64
|
||||
|
||||
# upload-artifact does not preserve permissions
|
||||
|
@ -192,19 +192,19 @@ datadir = get_option('datadir') # by default 'share'
|
||||
install_man('scrcpy.1')
|
||||
install_data('data/icon.png',
|
||||
rename: 'scrcpy.png',
|
||||
install_dir: join_paths(datadir, 'icons/hicolor/256x256/apps'))
|
||||
install_dir: datadir / 'icons/hicolor/256x256/apps')
|
||||
install_data('data/zsh-completion/_scrcpy',
|
||||
install_dir: join_paths(datadir, 'zsh/site-functions'))
|
||||
install_dir: datadir / 'zsh/site-functions')
|
||||
install_data('data/bash-completion/scrcpy',
|
||||
install_dir: join_paths(datadir, 'bash-completion/completions'))
|
||||
install_dir: datadir / 'bash-completion/completions')
|
||||
|
||||
# Desktop entry file for application launchers
|
||||
if host_machine.system() == 'linux'
|
||||
# Install a launcher (ex: /usr/local/share/applications/scrcpy.desktop)
|
||||
install_data('data/scrcpy.desktop',
|
||||
install_dir: join_paths(datadir, 'applications'))
|
||||
install_dir: datadir / 'applications')
|
||||
install_data('data/scrcpy-console.desktop',
|
||||
install_dir: join_paths(datadir, 'applications'))
|
||||
install_dir: datadir / 'applications')
|
||||
endif
|
||||
|
||||
|
||||
@ -279,3 +279,9 @@ if get_option('buildtype') == 'debug'
|
||||
test(t[0], exe)
|
||||
endforeach
|
||||
endif
|
||||
|
||||
if meson.version().version_compare('>= 0.58.0')
|
||||
devenv = environment()
|
||||
devenv.set('SCRCPY_ICON_PATH', meson.current_source_dir() / 'data/icon.png')
|
||||
meson.add_devenv(devenv)
|
||||
endif
|
||||
|
@ -4,9 +4,10 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "adb_device.h"
|
||||
#include "adb_parser.h"
|
||||
#include "adb/adb_device.h"
|
||||
#include "adb/adb_parser.h"
|
||||
#include "util/env.h"
|
||||
#include "util/file.h"
|
||||
#include "util/log.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "adb_device.h"
|
||||
#include "adb/adb_device.h"
|
||||
#include "util/intr.h"
|
||||
|
||||
#define SC_ADB_NO_STDOUT (1 << 0)
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "util/vector.h"
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "util/log.h"
|
||||
#include "util/str.h"
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "adb_device.h"
|
||||
#include "adb/adb_device.h"
|
||||
|
||||
/**
|
||||
* Parse the available devices from the output of `adb devices`
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "adb_tunnel.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "adb.h"
|
||||
#include "adb/adb.h"
|
||||
#include "util/log.h"
|
||||
#include "util/net_intr.h"
|
||||
#include "util/process_intr.h"
|
||||
|
||||
static bool
|
||||
listen_on_port(struct sc_intr *intr, sc_socket socket, uint16_t port) {
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stdatomic.h>
|
||||
#include <stdbool.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL2/SDL_audio.h>
|
||||
|
||||
#include "audio_regulator.h"
|
||||
#include "trait/frame_sink.h"
|
||||
|
@ -1,5 +1,9 @@
|
||||
#include "audio_regulator.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavutil/opt.h>
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
#include <stdatomic.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libswresample/swresample.h>
|
||||
#include "util/audiobuf.h"
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "options.h"
|
||||
@ -13,6 +14,7 @@
|
||||
#include "util/str.h"
|
||||
#include "util/strbuf.h"
|
||||
#include "util/term.h"
|
||||
#include "util/tick.h"
|
||||
|
||||
#define STR_IMPL_(x) #x
|
||||
#define STR(x) STR_IMPL_(x)
|
||||
|
@ -1,11 +1,9 @@
|
||||
#include "decoder.h"
|
||||
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#include <libavutil/channel_layout.h>
|
||||
#include <errno.h>
|
||||
#include <libavcodec/packet.h>
|
||||
#include <libavutil/avutil.h>
|
||||
|
||||
#include "events.h"
|
||||
#include "trait/frame_sink.h"
|
||||
#include "util/log.h"
|
||||
|
||||
/** Downcast packet_sink to decoder */
|
||||
|
@ -3,13 +3,11 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <libavcodec/avcodec.h>
|
||||
|
||||
#include "trait/frame_source.h"
|
||||
#include "trait/packet_sink.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavformat/avformat.h>
|
||||
|
||||
struct sc_decoder {
|
||||
struct sc_packet_sink packet_sink; // packet sink trait
|
||||
struct sc_frame_source frame_source; // frame source trait
|
||||
|
@ -2,9 +2,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <libavutil/avutil.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
|
||||
#include "util/log.h"
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <libavutil/frame.h>
|
||||
|
||||
#include "clock.h"
|
||||
#include "trait/frame_source.h"
|
||||
|
@ -1,14 +1,11 @@
|
||||
#include "demuxer.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavutil/channel_layout.h>
|
||||
#include <libavutil/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "decoder.h"
|
||||
#include "events.h"
|
||||
#include "packet_merger.h"
|
||||
#include "recorder.h"
|
||||
#include "util/binary.h"
|
||||
#include "util/log.h"
|
||||
|
||||
|
@ -4,12 +4,8 @@
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavformat/avformat.h>
|
||||
|
||||
#include "trait/packet_source.h"
|
||||
#include "trait/packet_sink.h"
|
||||
#include "util/net.h"
|
||||
#include "util/thread.h"
|
||||
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#define DEVICE_MSG_MAX_SIZE (1 << 18) // 256k
|
||||
// type: 1 byte; length: 4 bytes
|
||||
|
@ -1,6 +1,8 @@
|
||||
#include "display.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
#include <libavutil/pixfmt.h>
|
||||
|
||||
#include "util/log.h"
|
||||
|
@ -4,7 +4,8 @@
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#include <stdint.h>
|
||||
#include <libavutil/frame.h>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include "coords.h"
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "events.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "util/log.h"
|
||||
#include "util/thread.h"
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "file_pusher.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "adb/adb.h"
|
||||
#include "util/log.h"
|
||||
#include "util/process_intr.h"
|
||||
|
||||
#define DEFAULT_PUSH_TARGET "/sdcard/Download/"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "fps_counter.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "util/log.h"
|
||||
|
||||
|
@ -5,9 +5,9 @@
|
||||
|
||||
#include <stdatomic.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "util/thread.h"
|
||||
#include "util/tick.h"
|
||||
|
||||
struct sc_fps_counter {
|
||||
sc_thread thread;
|
||||
|
@ -1,8 +1,6 @@
|
||||
#include "frame_buffer.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <libavutil/avutil.h>
|
||||
#include <libavformat/avformat.h>
|
||||
|
||||
#include "util/log.h"
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <libavutil/frame.h>
|
||||
|
||||
#include "util/thread.h"
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define SC_HID_MAX_SIZE 15
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "util/binary.h"
|
||||
#include "util/log.h"
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "hid/hid_event.h"
|
||||
#include "input_events.h"
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "hid_keyboard.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "util/log.h"
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "hid/hid_event.h"
|
||||
#include "input_events.h"
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "hid_mouse.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// 1 byte for buttons + padding, 1 byte for X position, 1 byte for Y position,
|
||||
// 1 byte for wheel motion
|
||||
#define SC_HID_MOUSE_INPUT_SIZE 4
|
||||
|
@ -3,8 +3,6 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "hid/hid_event.h"
|
||||
#include "input_events.h"
|
||||
|
||||
|
@ -2,17 +2,22 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#include <libavutil/avutil.h>
|
||||
#include <libavutil/pixdesc.h>
|
||||
#include <libavutil/pixfmt.h>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "compat.h"
|
||||
#include "util/env.h"
|
||||
#include "util/file.h"
|
||||
#ifdef PORTABLE
|
||||
# include "util/file.h"
|
||||
#endif
|
||||
#include "util/log.h"
|
||||
#include "util/str.h"
|
||||
|
||||
#define SCRCPY_PORTABLE_ICON_FILENAME "icon.png"
|
||||
#define SCRCPY_DEFAULT_ICON_PATH \
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#include <SDL2/SDL_surface.h>
|
||||
|
||||
SDL_Surface *
|
||||
scrcpy_icon_load(void);
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include <SDL2/SDL_events.h>
|
||||
|
||||
#include "coords.h"
|
||||
#include "options.h"
|
||||
|
||||
/* The representation of input events in scrcpy is very close to the SDL API,
|
||||
* for simplicity.
|
||||
|
@ -1,8 +1,12 @@
|
||||
#include "input_manager.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <SDL2/SDL_keycode.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include "android/input.h"
|
||||
#include "android/keycodes.h"
|
||||
#include "input_events.h"
|
||||
#include "screen.h"
|
||||
#include "shortcut_mod.h"
|
||||
|
@ -4,12 +4,12 @@
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
#include <stdint.h>
|
||||
#include <SDL2/SDL_events.h>
|
||||
#include <SDL2/SDL_keycode.h>
|
||||
|
||||
#include "controller.h"
|
||||
#include "file_pusher.h"
|
||||
#include "fps_counter.h"
|
||||
#include "options.h"
|
||||
#include "trait/gamepad_processor.h"
|
||||
#include "trait/key_processor.h"
|
||||
|
@ -1,8 +1,13 @@
|
||||
#include "keyboard_sdk.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "android/input.h"
|
||||
#include "android/keycodes.h"
|
||||
#include "control_msg.h"
|
||||
#include "controller.h"
|
||||
#include "input_events.h"
|
||||
|
@ -1,9 +1,6 @@
|
||||
#include "common.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#ifdef HAVE_V4L2
|
||||
# include <libavdevice/avdevice.h>
|
||||
#endif
|
||||
|
@ -1,12 +1,12 @@
|
||||
#include "mouse_sdk.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "android/input.h"
|
||||
#include "control_msg.h"
|
||||
#include "controller.h"
|
||||
#include "input_events.h"
|
||||
#include "util/intmap.h"
|
||||
#include "util/log.h"
|
||||
|
||||
/** Downcast mouse processor to sc_mouse_sdk */
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "controller.h"
|
||||
#include "screen.h"
|
||||
#include "trait/mouse_processor.h"
|
||||
|
||||
struct sc_mouse_sdk {
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include "SDL2/SDL.h"
|
||||
#include <string.h>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
void
|
||||
sc_opengl_init(struct sc_opengl *gl) {
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "options.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
const struct scrcpy_options scrcpy_options_default = {
|
||||
.serial = NULL,
|
||||
.crop = NULL,
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "util/tick.h"
|
||||
|
@ -1,5 +1,9 @@
|
||||
#include "packet_merger.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <libavutil/avutil.h>
|
||||
|
||||
#include "util/log.h"
|
||||
|
||||
void
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavcodec/packet.h>
|
||||
|
||||
/**
|
||||
* Config packets (containing the SPS/PPS) are sent in-band. A new config
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
#include <SDL2/SDL_clipboard.h>
|
||||
|
||||
#include "device_msg.h"
|
||||
|
@ -1,6 +1,9 @@
|
||||
#include "recorder.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#include <libavutil/time.h>
|
||||
|
@ -4,9 +4,10 @@
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <libavcodec/packet.h>
|
||||
#include <libavformat/avformat.h>
|
||||
|
||||
#include "coords.h"
|
||||
#include "options.h"
|
||||
#include "trait/packet_sink.h"
|
||||
#include "util/thread.h"
|
||||
|
@ -1,10 +1,11 @@
|
||||
#include "scrcpy.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#include <sys/time.h>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
@ -37,9 +38,9 @@
|
||||
#endif
|
||||
#include "util/acksync.h"
|
||||
#include "util/log.h"
|
||||
#include "util/net.h"
|
||||
#include "util/rand.h"
|
||||
#include "util/timeout.h"
|
||||
#include "util/tick.h"
|
||||
#ifdef HAVE_V4L2
|
||||
# include "v4l2_sink.h"
|
||||
#endif
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "options.h"
|
||||
|
||||
enum scrcpy_exit_code {
|
||||
|
@ -1,11 +1,14 @@
|
||||
#ifndef SCREEN_H
|
||||
#define SCREEN_H
|
||||
#ifndef SC_SCREEN_H
|
||||
#define SC_SCREEN_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavutil/frame.h>
|
||||
#include <libavutil/pixfmt.h>
|
||||
|
||||
#include "controller.h"
|
||||
#include "coords.h"
|
||||
@ -14,7 +17,6 @@
|
||||
#include "frame_buffer.h"
|
||||
#include "input_manager.h"
|
||||
#include "mouse_capture.h"
|
||||
#include "opengl.h"
|
||||
#include "options.h"
|
||||
#include "trait/key_processor.h"
|
||||
#include "trait/frame_sink.h"
|
||||
|
@ -1,19 +1,18 @@
|
||||
#include "server.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <SDL2/SDL_timer.h>
|
||||
#include <SDL2/SDL_platform.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "adb/adb.h"
|
||||
#include "util/binary.h"
|
||||
#include "util/env.h"
|
||||
#include "util/file.h"
|
||||
#include "util/log.h"
|
||||
#include "util/net_intr.h"
|
||||
#include "util/process_intr.h"
|
||||
#include "util/process.h"
|
||||
#include "util/str.h"
|
||||
|
||||
#define SC_SERVER_FILENAME "scrcpy-server"
|
||||
|
@ -1,19 +1,17 @@
|
||||
#ifndef SERVER_H
|
||||
#define SERVER_H
|
||||
#ifndef SC_SERVER_H
|
||||
#define SC_SERVER_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stdatomic.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "adb/adb_tunnel.h"
|
||||
#include "coords.h"
|
||||
#include "options.h"
|
||||
#include "util/intr.h"
|
||||
#include "util/log.h"
|
||||
#include "util/net.h"
|
||||
#include "util/thread.h"
|
||||
#include "util/tick.h"
|
||||
|
||||
#define SC_DEVICE_NAME_FIELD_LENGTH 64
|
||||
struct sc_server_info {
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <SDL2/SDL_keycode.h>
|
||||
|
@ -1,10 +1,11 @@
|
||||
#include "util/file.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#ifdef __APPLE__
|
||||
# include <mach-o/dyld.h> // for _NSGetExecutablePath()
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "frame_source.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
void
|
||||
sc_frame_source_init(struct sc_frame_source *source) {
|
||||
source->sink_count = 0;
|
||||
|
@ -3,7 +3,9 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "frame_sink.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "trait/frame_sink.h"
|
||||
|
||||
#define SC_FRAME_SOURCE_MAX_SINKS 2
|
||||
|
||||
|
@ -3,9 +3,6 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "input_events.h"
|
||||
|
||||
/**
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "input_events.h"
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "input_events.h"
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "packet_source.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
void
|
||||
sc_packet_source_init(struct sc_packet_source *source) {
|
||||
source->sink_count = 0;
|
||||
|
@ -3,7 +3,9 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "packet_sink.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "trait/packet_sink.h"
|
||||
|
||||
#define SC_PACKET_SOURCE_MAX_SINKS 2
|
||||
|
||||
|
@ -1,5 +1,10 @@
|
||||
#include "gamepad_uhid.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
#include <SDL2/SDL_gamecontroller.h>
|
||||
|
||||
#include "hid/hid_gamepad.h"
|
||||
#include "input_events.h"
|
||||
#include "util/log.h"
|
||||
|
@ -3,8 +3,6 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "controller.h"
|
||||
#include "hid/hid_gamepad.h"
|
||||
#include "trait/gamepad_processor.h"
|
||||
|
@ -1,6 +1,12 @@
|
||||
#include "keyboard_uhid.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <SDL2/SDL_keyboard.h>
|
||||
#include <SDL2/SDL_keycode.h>
|
||||
|
||||
#include "util/log.h"
|
||||
#include "util/thread.h"
|
||||
|
||||
/** Downcast key processor to keyboard_uhid */
|
||||
#define DOWNCAST(KP) container_of(KP, struct sc_keyboard_uhid, key_processor)
|
||||
|
@ -1,5 +1,8 @@
|
||||
#include "mouse_uhid.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "hid/hid_mouse.h"
|
||||
#include "input_events.h"
|
||||
#include "util/log.h"
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "uhid_output.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "uhid/keyboard_uhid.h"
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
|
@ -1,13 +1,16 @@
|
||||
#include "util/log.h"
|
||||
#include "aoa_hid.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <libusb-1.0/libusb.h>
|
||||
|
||||
#include "aoa_hid.h"
|
||||
#include "events.h"
|
||||
#include "util/log.h"
|
||||
#include "util/str.h"
|
||||
#include "util/tick.h"
|
||||
#include "util/vector.h"
|
||||
|
||||
// See <https://source.android.com/devices/accessories/aoa2#hid-support>.
|
||||
|
@ -3,16 +3,13 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <libusb-1.0/libusb.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "hid/hid_event.h"
|
||||
#include "usb.h"
|
||||
#include "usb/usb.h"
|
||||
#include "util/acksync.h"
|
||||
#include "util/thread.h"
|
||||
#include "util/tick.h"
|
||||
#include "util/vecdeque.h"
|
||||
|
||||
enum sc_aoa_event_type {
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "gamepad_aoa.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "input_events.h"
|
||||
#include "util/log.h"
|
||||
|
||||
|
@ -3,10 +3,8 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "aoa_hid.h"
|
||||
#include "hid/hid_gamepad.h"
|
||||
#include "usb/aoa_hid.h"
|
||||
#include "trait/gamepad_processor.h"
|
||||
|
||||
struct sc_gamepad_aoa {
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "aoa_hid.h"
|
||||
#include "hid/hid_keyboard.h"
|
||||
#include "usb/aoa_hid.h"
|
||||
#include "trait/key_processor.h"
|
||||
|
||||
struct sc_keyboard_aoa {
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "mouse_aoa.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "hid/hid_mouse.h"
|
||||
#include "input_events.h"
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "aoa_hid.h"
|
||||
#include "usb/aoa_hid.h"
|
||||
#include "trait/mouse_processor.h"
|
||||
|
||||
struct sc_mouse_aoa {
|
||||
|
@ -1,10 +1,19 @@
|
||||
#include "scrcpy_otg.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include "adb/adb.h"
|
||||
#ifdef _WIN32
|
||||
# include "adb/adb.h"
|
||||
#endif
|
||||
#include "events.h"
|
||||
#include "screen_otg.h"
|
||||
#include "usb/screen_otg.h"
|
||||
#include "usb/aoa_hid.h"
|
||||
#include "usb/gamepad_aoa.h"
|
||||
#include "usb/keyboard_aoa.h"
|
||||
#include "usb/mouse_aoa.h"
|
||||
#include "util/log.h"
|
||||
|
||||
struct scrcpy_otg {
|
||||
|
@ -1,7 +1,11 @@
|
||||
#include "screen_otg.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "icon.h"
|
||||
#include "options.h"
|
||||
#include "util/acksync.h"
|
||||
#include "util/log.h"
|
||||
|
||||
static void
|
||||
|
@ -4,12 +4,13 @@
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include "keyboard_aoa.h"
|
||||
#include "mouse_aoa.h"
|
||||
#include "mouse_capture.h"
|
||||
#include "gamepad_aoa.h"
|
||||
#include "usb/gamepad_aoa.h"
|
||||
#include "usb/keyboard_aoa.h"
|
||||
#include "usb/mouse_aoa.h"
|
||||
|
||||
struct sc_screen_otg {
|
||||
struct sc_keyboard_aoa *keyboard;
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "acksync.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include "util/log.h"
|
||||
|
||||
bool
|
||||
sc_acksync_init(struct sc_acksync *as) {
|
||||
|
@ -3,7 +3,10 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "thread.h"
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "util/thread.h"
|
||||
#include "util/tick.h"
|
||||
|
||||
#define SC_SEQUENCE_INVALID 0
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <assert.h>
|
||||
#include <stdatomic.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
|
@ -3,9 +3,6 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct sc_average {
|
||||
// Current average value
|
||||
float avg;
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include "common.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
static inline void
|
||||
|
@ -2,7 +2,9 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "util/str.h"
|
||||
#ifdef _WIN32
|
||||
# include "util/str.h"
|
||||
#endif
|
||||
|
||||
char *
|
||||
sc_get_env(const char *varname) {
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct sc_intmap_entry {
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "intr.h"
|
||||
|
||||
#include "util/log.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "util/log.h"
|
||||
|
||||
bool
|
||||
sc_intr_init(struct sc_intr *intr) {
|
||||
bool ok = sc_mutex_init(&intr->mutex);
|
||||
|
@ -6,9 +6,9 @@
|
||||
#include <stdatomic.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "net.h"
|
||||
#include "process.h"
|
||||
#include "thread.h"
|
||||
#include "util/net.h"
|
||||
#include "util/process.h"
|
||||
#include "util/thread.h"
|
||||
|
||||
/**
|
||||
* Interruptor to wake up a blocking call from another thread
|
||||
|
@ -4,7 +4,10 @@
|
||||
# include <windows.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <libavutil/log.h>
|
||||
|
||||
static SDL_LogPriority
|
||||
log_level_sc_to_sdl(enum sc_log_level level) {
|
||||
|
@ -1,28 +1,27 @@
|
||||
#include "net.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "log.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <ws2tcpip.h>
|
||||
typedef int socklen_t;
|
||||
#else
|
||||
# include <sys/types.h>
|
||||
# include <sys/socket.h>
|
||||
# include <arpa/inet.h>
|
||||
# include <fcntl.h>
|
||||
# include <netinet/in.h>
|
||||
# include <netinet/tcp.h>
|
||||
# include <arpa/inet.h>
|
||||
# include <unistd.h>
|
||||
# include <fcntl.h>
|
||||
# include <sys/socket.h>
|
||||
# include <sys/types.h>
|
||||
# define SOCKET_ERROR -1
|
||||
typedef struct sockaddr_in SOCKADDR_IN;
|
||||
typedef struct sockaddr SOCKADDR;
|
||||
typedef struct in_addr IN_ADDR;
|
||||
#endif
|
||||
|
||||
#include "util/log.h"
|
||||
|
||||
bool
|
||||
net_init(void) {
|
||||
#ifdef _WIN32
|
||||
|
@ -4,14 +4,15 @@
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <winsock2.h>
|
||||
typedef SOCKET sc_raw_socket;
|
||||
# define SC_RAW_SOCKET_NONE INVALID_SOCKET
|
||||
#else // not _WIN32
|
||||
# include <sys/socket.h>
|
||||
typedef int sc_raw_socket;
|
||||
# define SC_RAW_SOCKET_NONE -1
|
||||
#endif
|
||||
|
@ -3,8 +3,13 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "intr.h"
|
||||
#include "net.h"
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "util/intr.h"
|
||||
#include "util/net.h"
|
||||
|
||||
bool
|
||||
net_connect_intr(struct sc_intr *intr, sc_socket socket, uint32_t addr,
|
||||
|
@ -1,8 +1,6 @@
|
||||
#include "process.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <libgen.h>
|
||||
#include "log.h"
|
||||
|
||||
enum sc_process_result
|
||||
sc_process_execute(const char *const argv[], sc_pid *pid, unsigned flags) {
|
||||
|
@ -4,7 +4,9 @@
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include "util/thread.h"
|
||||
#include "util/tick.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
|
@ -5,7 +5,7 @@ sc_pipe_read_intr(struct sc_intr *intr, sc_pid pid, sc_pipe pipe, char *data,
|
||||
size_t len) {
|
||||
if (intr && !sc_intr_set_process(intr, pid)) {
|
||||
// Already interrupted
|
||||
return false;
|
||||
return -1;
|
||||
}
|
||||
|
||||
ssize_t ret = sc_pipe_read(pipe, data, len);
|
||||
@ -22,7 +22,7 @@ sc_pipe_read_all_intr(struct sc_intr *intr, sc_pid pid, sc_pipe pipe,
|
||||
char *data, size_t len) {
|
||||
if (intr && !sc_intr_set_process(intr, pid)) {
|
||||
// Already interrupted
|
||||
return false;
|
||||
return -1;
|
||||
}
|
||||
|
||||
ssize_t ret = sc_pipe_read_all(pipe, data, len);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user