Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d391fc3b69 | ||
|
|
75ad925423 | ||
|
|
7e936fa879 | ||
|
|
01d785d9a3 | ||
|
|
fe6e9acb36 | ||
|
|
625934fb1b | ||
|
|
85b55b3c4e | ||
|
|
7b7076ef85 | ||
|
|
808bd14e30 |
@@ -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);
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,6 +103,11 @@ public final class Device {
|
|||||||
ServiceManager.getWindowManager().registerDisplayFoldListener(new IDisplayFoldListener.Stub() {
|
ServiceManager.getWindowManager().registerDisplayFoldListener(new IDisplayFoldListener.Stub() {
|
||||||
@Override
|
@Override
|
||||||
public void onDisplayFoldChanged(int displayId, boolean folded) {
|
public void onDisplayFoldChanged(int displayId, boolean folded) {
|
||||||
|
if (Device.this.displayId != displayId) {
|
||||||
|
// Ignore events related to other display ids
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
synchronized (Device.this) {
|
synchronized (Device.this) {
|
||||||
DisplayInfo displayInfo = ServiceManager.getDisplayManager().getDisplayInfo(displayId);
|
DisplayInfo displayInfo = ServiceManager.getDisplayManager().getDisplayInfo(displayId);
|
||||||
if (displayInfo == null) {
|
if (displayInfo == null) {
|
||||||
|
|||||||
@@ -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