Compare commits
9 Commits
issue4120
...
v2.1.1-ins
Author | SHA1 | Date | |
---|---|---|---|
637f48f360 | |||
d391fc3b69 | |||
75ad925423 | |||
7e936fa879 | |||
01d785d9a3 | |||
fe6e9acb36 | |||
625934fb1b | |||
85b55b3c4e | |||
7b7076ef85 |
@ -1,4 +1,4 @@
|
|||||||
# scrcpy (v2.1)
|
# scrcpy (v2.1.1)
|
||||||
|
|
||||||
<img src="app/data/icon.svg" width="128" height="128" alt="scrcpy" align="right" />
|
<img src="app/data/icon.svg" width="128" height="128" alt="scrcpy" align="right" />
|
||||||
|
|
||||||
@ -117,7 +117,10 @@ For general questions or discussions, you can also use:
|
|||||||
I'm [@rom1v](https://github.com/rom1v), the author and maintainer of _scrcpy_.
|
I'm [@rom1v](https://github.com/rom1v), the author and maintainer of _scrcpy_.
|
||||||
|
|
||||||
If you appreciate this application, you can [support my open source
|
If you appreciate this application, you can [support my open source
|
||||||
work][donate].
|
work][donate]:
|
||||||
|
- [GitHub Sponsors](https://github.com/sponsors/rom1v)
|
||||||
|
- [Liberapay](https://liberapay.com/rom1v/)
|
||||||
|
- [PayPal](https://paypal.me/rom2v)
|
||||||
|
|
||||||
[donate]: https://blog.rom1v.com/about/#support-my-open-source-work
|
[donate]: https://blog.rom1v.com/about/#support-my-open-source-work
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ BEGIN
|
|||||||
VALUE "LegalCopyright", "Romain Vimont, Genymobile"
|
VALUE "LegalCopyright", "Romain Vimont, Genymobile"
|
||||||
VALUE "OriginalFilename", "scrcpy.exe"
|
VALUE "OriginalFilename", "scrcpy.exe"
|
||||||
VALUE "ProductName", "scrcpy"
|
VALUE "ProductName", "scrcpy"
|
||||||
VALUE "ProductVersion", "2.1"
|
VALUE "ProductVersion", "2.1.1"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
@ -628,8 +628,8 @@ sc_adb_select_device(struct sc_intr *intr,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGD("ADB device found:");
|
LOGI("ADB device found:");
|
||||||
sc_adb_devices_log(SC_LOG_LEVEL_DEBUG, vec.data, vec.size);
|
sc_adb_devices_log(SC_LOG_LEVEL_INFO, vec.data, vec.size);
|
||||||
|
|
||||||
// Move devics into out_device (do not destroy device)
|
// Move devics into out_device (do not destroy device)
|
||||||
sc_adb_device_move(out_device, device);
|
sc_adb_device_move(out_device, device);
|
||||||
|
@ -488,6 +488,7 @@ sc_screen_show_initial_window(struct sc_screen *screen) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SDL_ShowWindow(screen->window);
|
SDL_ShowWindow(screen->window);
|
||||||
|
sc_screen_update_content_rect(screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -848,6 +849,8 @@ sc_screen_convert_drawable_to_frame_coords(struct sc_screen *screen,
|
|||||||
int32_t w = screen->content_size.width;
|
int32_t w = screen->content_size.width;
|
||||||
int32_t h = screen->content_size.height;
|
int32_t h = screen->content_size.height;
|
||||||
|
|
||||||
|
// screen->rect must be initialized to avoid a division by zero
|
||||||
|
assert(screen->rect.w && screen->rect.h);
|
||||||
|
|
||||||
x = (int64_t) (x - screen->rect.x) * w / screen->rect.w;
|
x = (int64_t) (x - screen->rect.x) * w / screen->rect.w;
|
||||||
y = (int64_t) (y - screen->rect.y) * h / screen->rect.h;
|
y = (int64_t) (y - screen->rect.y) * h / screen->rect.h;
|
||||||
|
@ -105,10 +105,6 @@ scrcpy_otg(struct scrcpy_options *options) {
|
|||||||
|
|
||||||
usb_device_initialized = true;
|
usb_device_initialized = true;
|
||||||
|
|
||||||
LOGI("USB device: %s (%04x:%04x) %s %s", usb_device.serial,
|
|
||||||
(unsigned) usb_device.vid, (unsigned) usb_device.pid,
|
|
||||||
usb_device.manufacturer, usb_device.product);
|
|
||||||
|
|
||||||
ok = sc_usb_connect(&s->usb, usb_device.device, &cbs, NULL);
|
ok = sc_usb_connect(&s->usb, usb_device.device, &cbs, NULL);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
goto end;
|
goto end;
|
||||||
|
@ -213,8 +213,8 @@ sc_usb_select_device(struct sc_usb *usb, const char *serial,
|
|||||||
assert(sel_count == 1); // sel_idx is valid only if sel_count == 1
|
assert(sel_count == 1); // sel_idx is valid only if sel_count == 1
|
||||||
struct sc_usb_device *device = &vec.data[sel_idx];
|
struct sc_usb_device *device = &vec.data[sel_idx];
|
||||||
|
|
||||||
LOGD("USB device found:");
|
LOGI("USB device found:");
|
||||||
sc_usb_devices_log(SC_LOG_LEVEL_DEBUG, vec.data, vec.size);
|
sc_usb_devices_log(SC_LOG_LEVEL_INFO, vec.data, vec.size);
|
||||||
|
|
||||||
// Move device into out_device (do not destroy device)
|
// Move device into out_device (do not destroy device)
|
||||||
sc_usb_device_move(out_device, device);
|
sc_usb_device_move(out_device, device);
|
||||||
|
@ -77,7 +77,7 @@ pip3 install meson
|
|||||||
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
|
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
|
||||||
|
|
||||||
# client build dependencies
|
# client build dependencies
|
||||||
sudo dnf install SDL2-devel ffms2-devel libusb-devel meson gcc make
|
sudo dnf install SDL2-devel ffms2-devel libusb1-devel meson gcc make
|
||||||
|
|
||||||
# server build dependencies
|
# server build dependencies
|
||||||
sudo dnf install java-devel
|
sudo dnf install java-devel
|
||||||
@ -233,10 +233,10 @@ install` must be run as root)._
|
|||||||
|
|
||||||
#### Option 2: Use prebuilt server
|
#### Option 2: Use prebuilt server
|
||||||
|
|
||||||
- [`scrcpy-server-v2.1`][direct-scrcpy-server]
|
- [`scrcpy-server-v2.1.1`][direct-scrcpy-server]
|
||||||
<sub>SHA-256: `5b8bf1940264b930c71a1c614c57da2247f52b2d4240bca865cc6d366dff6688`</sub>
|
<sub>SHA-256: `9558db6c56743a1dc03b38f59801fb40e91cc891f8fc0c89e5b0b067761f148e`</sub>
|
||||||
|
|
||||||
[direct-scrcpy-server]: https://github.com/Genymobile/scrcpy/releases/download/v2.1/scrcpy-server-v2.1
|
[direct-scrcpy-server]: https://github.com/Genymobile/scrcpy/releases/download/v2.1.1/scrcpy-server-v2.1.1
|
||||||
|
|
||||||
Download the prebuilt server somewhere, and specify its path during the Meson
|
Download the prebuilt server somewhere, and specify its path during the Meson
|
||||||
configuration:
|
configuration:
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
|
|
||||||
Download the [latest release]:
|
Download the [latest release]:
|
||||||
|
|
||||||
- [`scrcpy-win64-v2.1.zip`][direct-win64] (64-bit)
|
- [`scrcpy-win64-v2.1.1.zip`][direct-win64] (64-bit)
|
||||||
<sub>SHA-256: `57b98813322c8b5b560ada68714a2cd7b7efe64086fa61d03e389c23212c803d`</sub>
|
<sub>SHA-256: `f77281e1bce2f9934617699c581f063d5b327f012eff602ee98fb2ef550c25c2`</sub>
|
||||||
- [`scrcpy-win32-v2.1.zip`][direct-win32] (32-bit)
|
- [`scrcpy-win32-v2.1.1.zip`][direct-win32] (32-bit)
|
||||||
<sub>SHA-256: `4d261d391a60ea975440d83cdc22f8250b3c8985f2ece8c7e53d6fb26c0d74ed`</sub>
|
<sub>SHA-256: `ef7ae7fbe9449f2643febdc2244fb186d1a746a3c736394150cfd14f06d3c943`</sub>
|
||||||
|
|
||||||
[latest release]: https://github.com/Genymobile/scrcpy/releases/latest
|
[latest release]: https://github.com/Genymobile/scrcpy/releases/latest
|
||||||
[direct-win64]: https://github.com/Genymobile/scrcpy/releases/download/v2.1/scrcpy-win64-v2.1.zip
|
[direct-win64]: https://github.com/Genymobile/scrcpy/releases/download/v2.1.1/scrcpy-win64-v2.1.1.zip
|
||||||
[direct-win32]: https://github.com/Genymobile/scrcpy/releases/download/v2.1/scrcpy-win32-v2.1.zip
|
[direct-win32]: https://github.com/Genymobile/scrcpy/releases/download/v2.1.1/scrcpy-win32-v2.1.1.zip
|
||||||
|
|
||||||
and extract it.
|
and extract it.
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
BUILDDIR=build-auto
|
BUILDDIR=build-auto
|
||||||
PREBUILT_SERVER_URL=https://github.com/Genymobile/scrcpy/releases/download/v2.1/scrcpy-server-v2.1
|
PREBUILT_SERVER_URL=https://github.com/Genymobile/scrcpy/releases/download/v2.1.1/scrcpy-server-v2.1.1
|
||||||
PREBUILT_SERVER_SHA256=5b8bf1940264b930c71a1c614c57da2247f52b2d4240bca865cc6d366dff6688
|
PREBUILT_SERVER_SHA256=9558db6c56743a1dc03b38f59801fb40e91cc891f8fc0c89e5b0b067761f148e
|
||||||
|
|
||||||
echo "[scrcpy] Downloading prebuilt server..."
|
echo "[scrcpy] Downloading prebuilt server..."
|
||||||
wget "$PREBUILT_SERVER_URL" -O scrcpy-server
|
wget "$PREBUILT_SERVER_URL" -O scrcpy-server
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
project('scrcpy', 'c',
|
project('scrcpy', 'c',
|
||||||
version: '2.1',
|
version: '2.1.1',
|
||||||
meson_version: '>= 0.48',
|
meson_version: '>= 0.48',
|
||||||
default_options: [
|
default_options: [
|
||||||
'c_std=c11',
|
'c_std=c11',
|
||||||
|
@ -7,8 +7,8 @@ android {
|
|||||||
applicationId "com.genymobile.scrcpy"
|
applicationId "com.genymobile.scrcpy"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 33
|
targetSdkVersion 33
|
||||||
versionCode 20100
|
versionCode 20101
|
||||||
versionName "2.1"
|
versionName "2.1.1"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
SCRCPY_DEBUG=false
|
SCRCPY_DEBUG=false
|
||||||
SCRCPY_VERSION_NAME=2.1
|
SCRCPY_VERSION_NAME=2.1.1
|
||||||
|
|
||||||
PLATFORM=${ANDROID_PLATFORM:-33}
|
PLATFORM=${ANDROID_PLATFORM:-33}
|
||||||
BUILD_TOOLS=${ANDROID_BUILD_TOOLS:-33.0.0}
|
BUILD_TOOLS=${ANDROID_BUILD_TOOLS:-33.0.0}
|
||||||
|
@ -118,7 +118,7 @@ public final class AudioCapture {
|
|||||||
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.R) {
|
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.R) {
|
||||||
startWorkaroundAndroid11();
|
startWorkaroundAndroid11();
|
||||||
try {
|
try {
|
||||||
tryStartRecording(3, 100);
|
tryStartRecording(5, 100);
|
||||||
} finally {
|
} finally {
|
||||||
stopWorkaroundAndroid11();
|
stopWorkaroundAndroid11();
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import android.media.MediaCodecInfo;
|
|||||||
import android.media.MediaFormat;
|
import android.media.MediaFormat;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
|
import android.os.Looper;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.view.Surface;
|
import android.view.Surface;
|
||||||
|
|
||||||
@ -285,6 +286,10 @@ public class ScreenEncoder implements Device.RotationListener, Device.FoldListen
|
|||||||
@Override
|
@Override
|
||||||
public void start(TerminationListener listener) {
|
public void start(TerminationListener listener) {
|
||||||
thread = new Thread(() -> {
|
thread = new Thread(() -> {
|
||||||
|
// Some devices (Meizu) deadlock if the video encoding thread has no Looper
|
||||||
|
// <https://github.com/Genymobile/scrcpy/issues/4143>
|
||||||
|
Looper.prepare();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
streamScreen();
|
streamScreen();
|
||||||
} catch (ConfigurationException e) {
|
} catch (ConfigurationException e) {
|
||||||
|
Reference in New Issue
Block a user