Commit Graph

582 Commits (439b009a794983a738f3d48e1d07cd721dca112d)
 

Author SHA1 Message Date
Romain Vimont 439b009a79 Fix expected parameters count in error message 5 years ago
Romain Vimont 91ecb4f218 Close socket on error
Suggested-by: barry-ran

<https://github.com/Genymobile/scrcpy/issues/607>
5 years ago
Romain Vimont bfb3f0842f Prevent to turn screen off if no control
If --no-control is set, then the controller is not initialized (both in
the client and the server), so it is not possible to control the device
to turn its screen off.

See <https://github.com/Genymobile/scrcpy/issues/608>.
5 years ago
Romain Vimont 87d7a157a9 Reference USBaudio from README 5 years ago
Romain Vimont b91ecf5225 Fix --serial help
Make explicit that --serial excepts a parameter.
5 years ago
Romain Vimont 1807de4955 Merge pull request #595 from taaem/fix_build_fedora
The Java JDK is needed to build the server
5 years ago
taaem 0a233fd27f Fix required java package for Fedora
The Java JDK is needed to build the server. The relevant Fedora package
is java-devel, not java.

Signed-off-by: Romain Vimont <rom@rom1v.com>
5 years ago
Romain Vimont 4940746bcb Remove useless else
The if-block ends with a return.
5 years ago
Romain Vimont fe758e6e15 Improve comment
Rephrase to simplify and add a link to the issue.
5 years ago
Romain Vimont b29a568f08
Merge pull request #587 from schwabe/fix_586_screen_off_qbeta
Use getPhysicalDisplayToken if getBuiltInDisplay is not found
5 years ago
Arne Schwabe b769083a5b Use getPhysicalDisplayToken on Anroid Q+ instead of getBuiltInDisplay
This makes the -S (screen off) parameter work on Android Q beta 4

Closes #586
5 years ago
Romain Vimont 8ca36406b9 Remove compilation flag "skip_frames"
It is unused since ebccb9f6cc.
5 years ago
Romain Vimont 53310a925a Disable portable build by default
The default value of a boolean meson option is true. We want
non-portable build by default.
5 years ago
Romain Vimont 0cb902d58b Merge pull request #587 from zzndb/patch-1 5 years ago
zzndb bcd0a876f7 Fix a spell mistake
After commented default portable option in `app/meson.build` get some
error and then find this. :)

Signed-off-by: Romain Vimont <rom@rom1v.com>
5 years ago
Romain Vimont de2016a48e Add link to Snap package in README
<https://github.com/Genymobile/scrcpy/issues/523>
5 years ago
Romain Vimont 19ca6a0d66 Fix typo in README 5 years ago
Romain Vimont e2996e85c0 Update links to v1.9 in README and BUILD 5 years ago
Romain Vimont c2df0228a3 Merge branch 'dev' 5 years ago
Romain Vimont 259d3aee93 Bump version to 1.9 5 years ago
Romain Vimont 90859f1dcf Upgrade tarketSdkVersion to 29
This fixes a lint warning.
5 years ago
Romain Vimont 1afe9ce2ee Fix deprecation warning in Java unit test 5 years ago
Romain Vimont 273cec8a92 Fix typo in test name 5 years ago
Romain Vimont 02f189b1de Remove obsolete detail in README
Now that scrcpy-server.jar is found in the same directory as the
scrcpy executable, using SCRCPY_SERVER_PATH is not particularly useful
on Windows anymore
5 years ago
Romain Vimont 4abe163233 Remove obsolete explanation in FAQ
Issue 9 was about stdout/stderr not printed in Windows console. This is
solved since the Windows version is cross-compiled from Linux.
5 years ago
Romain Vimont 5ffdcbb7be Update DEVELOP.md 5 years ago
Romain Vimont ffe0417228 Update platform-tools (29.0.1) for Windows
Include the latest version of adb in Windows releases.
5 years ago
Romain Vimont e3afb67e7f Downgrade SDL to 2.0.8 for Windows
Revert "Update SDL (2.0.9) for Windows"

Several users experienced freezes with SDL 2.0.9.

This reverts commit a5787dccd6.

See:
 - <https://github.com/Genymobile/scrcpy/issues/425>
 - <https://discourse.libsdl.org/t/unstable-frame-rate-unexpectedly/25783>
5 years ago
Romain Vimont 4ee1391361 Upgrade FFmpeg (4.1.3) for Windows
Include the latest version of FFmpeg in Windows releases.
5 years ago
Romain Vimont 2755bfc255 Improve portable builds
In portable builds, scrcpy-server.jar was supposed to be present in the
current directory, so in practice it worked only if scrcpy was launched
from its own directory.

Instead, find the absolute path of the executable and build a suitable
path to use scrcpy-server.jar from the same directory.
5 years ago
Romain Vimont 3b17ff7c86 Add functions to convert wide char to UTF-8
There was already utf8_to_wide_char(), used to correctly execute
commands on Windows.

Add the reverse converter: utf8_from_wide_char(). We will need it to
build the scrcpy-server path based on the executable directory.
5 years ago
Romain Vimont 4eb6b26c93 Extract "scrcpy-server.jar" string
The filename is used at several places.
5 years ago
Romain Vimont eb34098add Simplify portable build configuration
To create a portable build (with scrcpy-server.jar accessible from the
scrcpy directory), replace OVERRIDE_SERVER_PATH by a simple compilation
flag: PORTABLE.

This paves the way to use more complex rules to determine the path of
scrcpy-server.jar in portable builds.
5 years ago
Romain Vimont b777760bca Simplify scrcpy-server path configuration
The full path of scrcpy-server.jar was partially configured from
meson.build then concatenated by C code.

Instead, directly write the path in C.
5 years ago
Romain Vimont 72bdfbc7a6 Never return 0 for stream protocol
On socket disconnection, on Linux, recv() returns -1 and errno is set.
But on Windows, errno is 0.

In that case, AVERROR(errno) == 0, leading to the warning:

> Invalid return value 0 for stream protocol

To avoid the problem, if errno is 0, return AVERROR_EOF.

Ref: commit 2876463d39
5 years ago
Romain Vimont 8604f16b30 Truncate device name at UTF-8 code point boundary
Just in case.
5 years ago
Romain Vimont 5d11339259 Inline lock_util functions
They are just tiny wrappers.
5 years ago
Romain Vimont e2a272bf99 Improve framerate counting
The FPS counter was called only on new frames, so it could not print
values regularly, especially when there are very few FPS (when the
device surface does not change).

To the extreme, it was never able to display 0 fps.

Add a separate thread to print framerate every second.
5 years ago
Romain Vimont d104d3bda9 Add cond_wait_timeout()
Add a "timed out" version of cond_wait().
5 years ago
Romain Vimont eda44b6068 Fix controller cleanup
After commit bfb86ca2c2, the controller
was not stopped and destroyed on quit.
5 years ago
Romain Vimont ebccb9f6cc Add runtime option to render expired frames
Replace the compilation flag SKIP_FRAMES by a runtime flag to force
rendering of expired frames. By default, the expired frames are skipped.
5 years ago
Romain Vimont a143b8b07a Indent command-line options
Prepare indentation for --render-expired-frames.
5 years ago
Romain Vimont 9253996873 Add README section explaining --turn-screen-off 5 years ago
Romain Vimont a13524e7f9 Replace android-tools-adb by adb
Here is the description of the adb package in Debian:

> Description: Android Debug Bridge
>
> A versatile command line tool that lets you communicate with an
> emulator instance or connected Android-powered device.
>
> This package recommends "android-sdk-platform-tools-common" which
> contains the udev rules for Android devices. Without this package, adb
> and fastboot need to be running with root permission.

And android-tools-adb:

> Description: transitional package
>
> This is a transitional package. It can safely be removed.
5 years ago
Romain Vimont f3f3433163
Merge pull request #574 from crow1170/patch-1
Fix dependencies
5 years ago
Chris Knowles 232aaa386e
Fix dependencies
Some missing or misspelled dependencies. Checked on Ubuntu 19.04.
5 years ago
Romain Vimont 8e66b33000 Add option to turn device screen off
In addition to the shortcut (Ctrl+o) to turn the device screen off, add
a command-line argument to turn it off on start.
5 years ago
Romain Vimont 7f07b13446 Indent command-line options
Preparse indentation for --turn-screen-off.
5 years ago
Romain Vimont acc4dcd520 Disable server controller if --no-control
If --no-control is disabled, there is no need for a controller.

It also avoids to power on the device on start if control is disabled.
5 years ago
Romain Vimont ca767ba364 Group server params in a struct
Starting the server requires more and more parameters. For clarity,
group them in a struct.
5 years ago