Merge branch 'master' into dev
This commit is contained in:
commit
b449c09442
2 changed files with 25 additions and 13 deletions
32
README.md
32
README.md
|
@ -11,25 +11,26 @@ and _MacOS_.
|
||||||
|
|
||||||
The Android part requires at least API 21 (Android 5.0).
|
The Android part requires at least API 21 (Android 5.0).
|
||||||
|
|
||||||
You need [adb] (recent enough so that `adb reverse` is implemented, it works
|
You need [adb]. It is available in the [Android SDK platform
|
||||||
with 1.0.36). It is available in the [Android SDK platform
|
tools][platform-tools], or packaged in your distribution (`android-adb-tools`).
|
||||||
tools][platform-tools], on packaged in your distribution (`android-adb-tools`).
|
|
||||||
|
|
||||||
On Windows, just download the [platform-tools][platform-tools-windows] and
|
On Windows, if you use the [prebuilt application](#windows), it is already
|
||||||
extract the following files to a directory accessible from your `PATH`:
|
included. Otherwise, just download the [platform-tools][platform-tools-windows]
|
||||||
|
and extract the following files to a directory accessible from your `PATH`:
|
||||||
- `adb.exe`
|
- `adb.exe`
|
||||||
- `AdbWinApi.dll`
|
- `AdbWinApi.dll`
|
||||||
- `AdbWinUsbApi.dll`
|
- `AdbWinUsbApi.dll`
|
||||||
|
|
||||||
Make sure you [enabled adb debugging][enable-adb] on your device(s).
|
Make sure you [enabled adb debugging][enable-adb] on your device(s).
|
||||||
|
|
||||||
|
The client requires [FFmpeg] and [LibSDL2].
|
||||||
|
|
||||||
[adb]: https://developer.android.com/studio/command-line/adb.html
|
[adb]: https://developer.android.com/studio/command-line/adb.html
|
||||||
[enable-adb]: https://developer.android.com/studio/command-line/adb.html#Enabling
|
[enable-adb]: https://developer.android.com/studio/command-line/adb.html#Enabling
|
||||||
[platform-tools]: https://developer.android.com/studio/releases/platform-tools.html
|
[platform-tools]: https://developer.android.com/studio/releases/platform-tools.html
|
||||||
[platform-tools-windows]: https://dl.google.com/android/repository/platform-tools-latest-windows.zip
|
[platform-tools-windows]: https://dl.google.com/android/repository/platform-tools-latest-windows.zip
|
||||||
|
[ffmpeg]: https://en.wikipedia.org/wiki/FFmpeg
|
||||||
The client requires _FFmpeg_ and _LibSDL2_.
|
[LibSDL2]: https://en.wikipedia.org/wiki/Simple_DirectMedia_Layer
|
||||||
|
|
||||||
|
|
||||||
## Build and install
|
## Build and install
|
||||||
|
|
||||||
|
@ -124,16 +125,23 @@ Use [Homebrew] to install the packages:
|
||||||
brew install sdl2 ffmpeg
|
brew install sdl2 ffmpeg
|
||||||
|
|
||||||
# client build dependencies
|
# client build dependencies
|
||||||
brew install gcc pkg-config meson
|
brew install pkg-config meson
|
||||||
```
|
```
|
||||||
|
|
||||||
Java (>= 7) is not available in Homebrew, so if you plan to build the server,
|
Additionally, if you want to build the server, install Java 8 from Caskroom, and
|
||||||
install it manually and make it available from the `PATH`:
|
make it avaliable from the `PATH`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
brew tap caskroom/versions
|
||||||
|
brew cask install java8
|
||||||
|
export JAVA_HOME="$(/usr/libexec/java_home --version 1.8)"
|
||||||
export PATH="$JAVA_HOME/bin:$PATH"
|
export PATH="$JAVA_HOME/bin:$PATH"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Docker
|
||||||
|
|
||||||
|
See [pierlon/scrcpy-docker](https://github.com/pierlon/scrcpy-docker).
|
||||||
|
|
||||||
### Common steps
|
### Common steps
|
||||||
|
|
||||||
Install the [Android SDK] (_Android Studio_), and set `ANDROID_HOME` to
|
Install the [Android SDK] (_Android Studio_), and set `ANDROID_HOME` to
|
||||||
|
@ -262,7 +270,7 @@ To run without installing:
|
||||||
| click on `VOLUME_UP` | `Ctrl`+`+` |
|
| click on `VOLUME_UP` | `Ctrl`+`+` |
|
||||||
| click on `VOLUME_DOWN` | `Ctrl`+`-` |
|
| click on `VOLUME_DOWN` | `Ctrl`+`-` |
|
||||||
| click on `POWER` | `Ctrl`+`p` |
|
| click on `POWER` | `Ctrl`+`p` |
|
||||||
| turn screen on | _Right-click¹_ |
|
| turn screen on | _Right-click²_ |
|
||||||
| paste computer clipboard to device | `Ctrl`+`v` |
|
| paste computer clipboard to device | `Ctrl`+`v` |
|
||||||
| enable/disable FPS counter (on stdout) | `Ctrl`+`i` |
|
| enable/disable FPS counter (on stdout) | `Ctrl`+`i` |
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ static int run_decoder(void *data) {
|
||||||
packet.data = NULL;
|
packet.data = NULL;
|
||||||
packet.size = 0;
|
packet.size = 0;
|
||||||
|
|
||||||
while (!av_read_frame(format_ctx, &packet) && !avio_ctx->eof_reached) {
|
while (!av_read_frame(format_ctx, &packet)) {
|
||||||
// the new decoding/encoding API has been introduced by:
|
// the new decoding/encoding API has been introduced by:
|
||||||
// <http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=7fc329e2dd6226dfecaa4a1d7adf353bf2773726>
|
// <http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=7fc329e2dd6226dfecaa4a1d7adf353bf2773726>
|
||||||
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 37, 0)
|
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 37, 0)
|
||||||
|
@ -125,6 +125,10 @@ static int run_decoder(void *data) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
av_packet_unref(&packet);
|
av_packet_unref(&packet);
|
||||||
|
|
||||||
|
if (avio_ctx->eof_reached) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGD("End of frames");
|
LOGD("End of frames");
|
||||||
|
|
Loading…
Reference in a new issue