-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make available resources about building/using newer versions with Meizu phones #2656
Comments
I'm pretty sure we can make it work nevertheless, but I have no Meizu device. Could you please help by testing this: #240 (comment) Otherwise, building steps are described here: https://github.com/Genymobile/scrcpy/blob/master/BUILD.md |
Following the instructions in 240-comment, I get the same "freezing" problem, but there's no message displayed after
Are there any logs I can try to get and paste here? If so, how can I do it? |
Please replace the server from v1.19 release by this one: Does it freeze? Please post the whole console output. diffdiff --git a/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java b/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java
index 2f7109c5..df73d60a 100644
--- a/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java
+++ b/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java
@@ -9,6 +9,7 @@ import android.media.MediaCodecList;
import android.media.MediaFormat;
import android.os.Build;
import android.os.IBinder;
+import android.os.Looper;
import android.view.Surface;
import java.io.FileDescriptor;
@@ -55,7 +56,10 @@ public class ScreenEncoder implements Device.RotationListener {
}
public void streamScreen(Device device, FileDescriptor fd) throws IOException {
- Workarounds.prepareMainLooper();
+ Ln.i("Manufacturer: [" + Build.MANUFACTURER + "]");
+ Ln.i("Brand: [" + Build.BRAND + "]");
+ Ln.i("Model: [" + Build.MODEL + "]");
+ Looper.prepare();
try {
internalStreamScreen(device, fd); |
I get this:
and then nothing happens. Anything else I could try? |
And this one?
diffdiff --git a/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java b/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java
index 2f7109c5..ec9330bb 100644
--- a/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java
+++ b/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java
@@ -56,6 +56,9 @@ public class ScreenEncoder implements Device.RotationListener {
public void streamScreen(Device device, FileDescriptor fd) throws IOException {
Workarounds.prepareMainLooper();
+ if (Build.BRAND.equalsIgnoreCase("meizu")) {
+ Workarounds.fillAppInfo();
+ }
try {
internalStreamScreen(device, fd); |
I've yet to try the encoder options though, but for now, no success. |
Oops, the last link was incorrect (it was the same as the first one). I fixed it. Could you retry, please? |
It worked! Thanks a lot! I still have to check the new features (I got really attracted by the --max-fps option), but so far it's working fine. |
Workarounds.fillAppInfo() is necessary for Meizu devices even before the first call to internalStreamScreen(), but it is harmful on other devices (#940). Therefore, simplify the workaround, by calling fillAppInfo() only if Build.BRAND equals "meizu" (case insensitive). Fixes #240 <#240> (again) Fixes #2656 <#2656>
Fixed on Just to be sure, could you test the final version: |
It worked fine too. Would be nice having this server file "pinned" or something like that, if possible. Thanks a lot for your help! |
What do you mean? |
Pinned is not the correct word for it, I suppose, but it would be nice to have the "alternative server" someplace easier to come by (though the ones who need it will probably search for it anyways, so not having that isn't a problem), Somewhere like in the Releases page for each version? Only if it isn't troublesome, of course. |
The problem is fixed on It was just a "bug" like many others, there are no backports to older versions. |
Oh, good to hear that then. Thanks! |
Workarounds.fillAppInfo() is necessary for Meizu devices even before the first call to internalStreamScreen(), but it is harmful on other devices (#940). Therefore, simplify the workaround, by calling fillAppInfo() only if Build.BRAND equals "meizu" (case insensitive). Fixes #240 <#240> (again) Fixes #2656 <#2656>
@veselcraft Please test #3801 (comment). Does it work? |
Sure it does! It's smooth and the mouse controls works perfectly. But i still have some glitches here, i think this is a problem on Flyme's side, not on scrcpy. Thanks for the fix anyways! |
If you record with |
It's present in any third-party screen recorder |
Is your feature request related to a problem? Please describe.
I can't seem to make scrcpy work with my Meizu M6 Note phone whenever I use any version above 1.13. I've seen in another issue that the "culprit commit" was identified and that it did pose other problems, so I can understand it might be needed.
But there are some changes and new features that are present in newer versions that are pretty much inaccessible on some setups for that reason.
Describe the solution you'd like
However, if it's possible, I'd like to see an alternative to the phones that don't work with the change introduced in 1.14 and above. It doesn't even need to be prebuilt; having written resources about how to do it would be enough.
Describe alternatives you've considered
I've tried all the workarounds I've found in all related issues (like changing bitrate, encoder and even cables/ports). But none of them worked on newer versions.
The text was updated successfully, but these errors were encountered: