Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c8f996822 |
6
BUILD.md
6
BUILD.md
@@ -204,12 +204,12 @@ brew install pkg-config meson
|
|||||||
```
|
```
|
||||||
|
|
||||||
Additionally, if you want to build the server, install Java 8 from Caskroom, and
|
Additionally, if you want to build the server, install Java 8 from Caskroom, and
|
||||||
make it available from the `PATH`:
|
make it avaliable from the `PATH`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
brew tap homebrew/cask-versions
|
brew tap homebrew/cask-versions
|
||||||
brew install adoptopenjdk/openjdk/adoptopenjdk11
|
brew cask install adoptopenjdk/openjdk/adoptopenjdk8
|
||||||
export JAVA_HOME="$(/usr/libexec/java_home --version 1.11)"
|
export JAVA_HOME="$(/usr/libexec/java_home --version 1.8)"
|
||||||
export PATH="$JAVA_HOME/bin:$PATH"
|
export PATH="$JAVA_HOME/bin:$PATH"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ There are two [frames][video_buffer] simultaneously in memory:
|
|||||||
- the **rendering** frame, rendered in a texture from the main thread.
|
- the **rendering** frame, rendered in a texture from the main thread.
|
||||||
|
|
||||||
When a new decoded frame is available, the decoder _swaps_ the decoding and
|
When a new decoded frame is available, the decoder _swaps_ the decoding and
|
||||||
rendering frame (with proper synchronization). Thus, it immediately starts
|
rendering frame (with proper synchronization). Thus, it immediatly starts
|
||||||
to decode a new frame while the main thread renders the last one.
|
to decode a new frame while the main thread renders the last one.
|
||||||
|
|
||||||
If a [recorder] is present (i.e. `--record` is enabled), then it muxes the raw
|
If a [recorder] is present (i.e. `--record` is enabled), then it muxes the raw
|
||||||
|
|||||||
15
README.md
15
README.md
@@ -127,18 +127,13 @@ brew install scrcpy
|
|||||||
You need `adb`, accessible from your `PATH`. If you don't have it yet:
|
You need `adb`, accessible from your `PATH`. If you don't have it yet:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
brew install android-platform-tools
|
# Homebrew >= 2.6.0
|
||||||
|
brew install --cask android-platform-tools
|
||||||
|
|
||||||
|
# Homebrew < 2.6.0
|
||||||
|
brew cask install android-platform-tools
|
||||||
```
|
```
|
||||||
|
|
||||||
It's also available in [MacPorts], which sets up adb for you:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo port install scrcpy
|
|
||||||
```
|
|
||||||
|
|
||||||
[MacPorts]: https://www.macports.org/
|
|
||||||
|
|
||||||
|
|
||||||
You can also [build the app manually][BUILD].
|
You can also [build the app manually][BUILD].
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define _ANDROID_INPUT_H
|
#define _ANDROID_INPUT_H
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Meta key / modifier state.
|
* Meta key / modifer state.
|
||||||
*/
|
*/
|
||||||
enum android_metastate {
|
enum android_metastate {
|
||||||
/** No meta keys are pressed. */
|
/** No meta keys are pressed. */
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ scrcpy_print_usage(const char *arg0) {
|
|||||||
" Default is 0 (automatic).\n"
|
" Default is 0 (automatic).\n"
|
||||||
"\n"
|
"\n"
|
||||||
" --window-height value\n"
|
" --window-height value\n"
|
||||||
" Set the initial window height.\n"
|
" Set the initial window width.\n"
|
||||||
" Default is 0 (automatic).\n"
|
" Default is 0 (automatic).\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Shortcuts:\n"
|
"Shortcuts:\n"
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ convert_keycode_action(SDL_EventType from, enum android_keyevent_action *to) {
|
|||||||
|
|
||||||
static enum android_metastate
|
static enum android_metastate
|
||||||
autocomplete_metastate(enum android_metastate metastate) {
|
autocomplete_metastate(enum android_metastate metastate) {
|
||||||
// fill dependent flags
|
// fill dependant flags
|
||||||
if (metastate & (AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_RIGHT_ON)) {
|
if (metastate & (AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_RIGHT_ON)) {
|
||||||
metastate |= AMETA_SHIFT_ON;
|
metastate |= AMETA_SHIFT_ON;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -252,7 +252,13 @@ recorder_write(struct recorder *recorder, AVPacket *packet) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
recorder_rescale_packet(recorder, packet);
|
recorder_rescale_packet(recorder, packet);
|
||||||
return av_write_frame(recorder->ctx, packet) >= 0;
|
int ret = av_write_frame(recorder->ctx, packet);
|
||||||
|
if (ret < 0) {
|
||||||
|
LOGE("Could not write frame: %d\n", ret);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ size_t
|
|||||||
xstrncpy(char *dest, const char *src, size_t n);
|
xstrncpy(char *dest, const char *src, size_t n);
|
||||||
|
|
||||||
// join tokens by sep into dst
|
// join tokens by sep into dst
|
||||||
// returns the number of chars actually written (max n-1) if no truncation
|
// returns the number of chars actually written (max n-1) if no trucation
|
||||||
// occurred, or n if truncated
|
// occurred, or n if truncated
|
||||||
size_t
|
size_t
|
||||||
xstrjoin(char *dst, const char *const tokens[], char sep, size_t n);
|
xstrjoin(char *dst, const char *const tokens[], char sep, size_t n);
|
||||||
|
|||||||
Reference in New Issue
Block a user