Commit Graph

1224 Commits (ea233d811d20827212dc6344004a9b0d71e530d7)
 

Author SHA1 Message Date
Stefan Huber ea233d811d Fix typo in DEVELOP.md
PR #2540 <https://github.com/Genymobile/scrcpy/pull/2540>

Signed-off-by: Romain Vimont <rom@rom1v.com>
3 years ago
Romain Vimont ab12b6c981 Update scrcpy-server in install-release.sh
Make the install script download the new prebuilt server (v1.18).

Fixes #2409 <https://github.com/Genymobile/scrcpy/issues/2409>
3 years ago
Romain Vimont 376201a83c Update links to v1.18 in README and BUILD 3 years ago
Romain Vimont 60c4e886d4 Bump version to 1.18
Make the versionCode a decimal representation of the scrcpy version.

This will for example allow to correctly number the versionCode of
v1.17.1 after a v1.18 is released:
 - v1.18   -> 11800
 - v1.17.1 -> 11701
 - v1.18.1 -> 11801
3 years ago
Romain Vimont ff7baad709 Upgrade platform-tools (31.0.2) for Windows
Include the latest version of adb in Windows releases.
3 years ago
Romain Vimont e712f30ceb Merge branch 'master' into dev 3 years ago
Wirtos_new a9d9cbf8b5 Replace VLA by dynamic allocation
And increase the command buffer size.

Refs #1358 <https://github.com/Genymobile/scrcpy/issues/1358#issuecomment-862989748>
PR #2405 <https://github.com/Genymobile/scrcpy/pull/2405>

Signed-off-by: Romain Vimont <rom@rom1v.com>
3 years ago
Wirtos_new fda32928c1 Rename cmd to argv
This is more explicit.

PR #2405 <https://github.com/Genymobile/scrcpy/pull/2405>

Signed-off-by: Romain Vimont <rom@rom1v.com>
3 years ago
Romain Vimont 710e80aa0d Return build_cmd() success via a boolean
For consistency with other functions in the codebase.
3 years ago
Romain Vimont 77e96d745b Suggest --record-format instead of -F on error
The short option -F has been deprecated by
ff061b4f30. On error, suggest the long
option --record-format instead.
3 years ago
Romain Vimont 1c95043478 Attempt to log message only in verbose mode
If the log level is not verbose, there is no need to attempt to log
control messages at all.
3 years ago
Romain Vimont 488991116b Expose function to get the current log level
This will allow to avoid unnecessary processing for creating logs which
will be discarded anyway.
3 years ago
Romain Vimont 5c95d18beb Move log level conversion to log API 3 years ago
Romain Vimont 1039f9b531 Workaround PRIu64 on Windows
On Windows, PRIu64 is defined to "llu", which is not supported:

    error: unknown conversion type character 'l' in format
3 years ago
Marti Raudsepp 19ca02cd8f Log control messages in verbose mode
PR #2371 <https://github.com/Genymobile/scrcpy/pull/2371>

Signed-off-by: Romain Vimont <rom@rom1v.com>
3 years ago
Marti Raudsepp 937fa704a6 Add --verbosity=verbose log level
PR #2371 <https://github.com/Genymobile/scrcpy/pull/2371>

Signed-off-by: Romain Vimont <rom@rom1v.com>
3 years ago
Romain Vimont 7db0189f23 Forward mouse motion only on main clicks
Mouse motion events were forwarded as soon as any mouse button was
pressed.

Instead, only consider left-click (and also middle-click and right-click
if --forward-all-clicks is enabled).
3 years ago
Romain Vimont 8b90e1d3f4 Remove extra ';' in #define 3 years ago
Romain Vimont df017160ed Replace strcpy() by memcpy()
It was safe to call strcpy() since the input length was checked, but
then it is more straightforward to call memcpy() directly.
3 years ago
Romain Vimont b846d3a085 Adapt call() on ContentProvider for Android 12
Android 12 changed one of the call() overloads with a new parameter
AttributionSource. Adapt the wrapper.

Fixes #2402 <https://github.com/Genymobile/scrcpy/issues/2402>
3 years ago
Romain Vimont a1f2094787 Push to /sdcard/Download/ by default
Change the default push target from /sdcard/ to /sdcard/Download/.

Pushing to the root of /sdcard/ is not very convenient, many apps do not
expose its content directly.

It can still be changed by --push-target.

PR #2384 <https://github.com/Genymobile/scrcpy/pull/2384>
3 years ago
Romain Vimont 9b89b7ab72 Center the window on resize-to-fit
When removing the black borders (by double-clicking on them, or by
pressing MOD+w), the window is resized to fit the device screen, but its
top-left position was left unchanged.

Instead, move the window so that the new window area is at the center of
the old window area.

Refs #2387 <https://github.com/Genymobile/scrcpy/issues/2387>
3 years ago
Romain Vimont 7343b233e4 Render screen on window restored
It should not be necessary, since screen_render() is called just after
on SDL_WINDOWEVENT_EXPOSED, but in practice the window content might not
be correctly displayed on restored if a rotation occurred while
minimized.

Note that calling screen_render() twice in a row on
SDL_WINDOWEVENT_EXPOSED also "fixes" the issue.
3 years ago
Romain Vimont cd2894570d Allocate AVPacket for v4l2_sink
From FFmpeg/doc/APIchanges:

    2021-03-17 - f7db77bd87 - lavc 58.133.100 - codec.h
      Deprecated av_init_packet(). Once removed, sizeof(AVPacket) will
      no longer be a part of the public ABI.

Refs #2302 <https://github.com/Genymobile/scrcpy/issues/2302>
3 years ago
Romain Vimont 4af317d40d Allocate AVPacket for recorder
From FFmpeg/doc/APIchanges:

    2021-03-17 - f7db77bd87 - lavc 58.133.100 - codec.h
      Deprecated av_init_packet(). Once removed, sizeof(AVPacket) will
      no longer be a part of the public ABI.

Refs #2302 <https://github.com/Genymobile/scrcpy/issues/2302>
3 years ago
Romain Vimont 318b6a572e Allocate AVPacket for local stream packet
From FFmpeg/doc/APIchanges:

    2021-03-17 - f7db77bd87 - lavc 58.133.100 - codec.h
      Deprecated av_init_packet(). Once removed, sizeof(AVPacket) will
      no longer be a part of the public ABI.

Refs #2302 <https://github.com/Genymobile/scrcpy/issues/2302>
3 years ago
Romain Vimont e8b053ad2f Allocate AVPacket for stream->pending
From FFmpeg/doc/APIchanges:

    2021-03-17 - f7db77bd87 - lavc 58.133.100 - codec.h
      Deprecated av_init_packet(). Once removed, sizeof(AVPacket) will
      no longer be a part of the public ABI.

Remove the has_pending boolean, which can be replaced by:

    stream->pending != NULL

Refs #2302 <https://github.com/Genymobile/scrcpy/issues/2302>
3 years ago
Romain Vimont a5d71eee45 Clarify --no-display usage with v4l2 3 years ago
Romain Vimont af228706f1 Fix compatibility with old FFmpeg
V4L2 sink used a "url" field format AVFormatContext which has been
introduced in lavf 58.7.100.

Fixes #2382 <https://github.com/Genymobile/scrcpy/issues/2382>

Refs <ea3672b7d6>
Refs <fa8308d3d4>
3 years ago
Romain Vimont f76fe2c0d4 Fix --lock-video-orientation syntax
The argument for option --lock-video-orientation has been made optional
by 5af9d0ee0f.

With getopt_long(), contrary to mandatory arguments, optional arguments
must be given with a '=':

    --lock-video-orientation 2   # wrong, parse error
    --lock-video-orientation=2   # correct
3 years ago
Romain Vimont 16a63e0917 Use non-secure display for Android 12 preview
Android 12 preview identifies as Android 11, but its codename is "S".

Refs #2129 <https://github.com/Genymobile/scrcpy/issues/2129>
3 years ago
Romain Vimont f7533e8896 Use non-secure display for Android >= 12
Since Android 12, secure displays could not be created with shell
permissions anymore.

Refs commit 1fdde490fd
Fixes #2129 <https://github.com/Genymobile/scrcpy/issues/2129>
3 years ago
Romain Vimont 969bfd4374 Serialize clean-up configuration
This avoids to pass each option as individual parameter and parse them
manually (it's still "manual" in the Parcelable implementation).

Refs #824 <https://github.com/Genymobile/scrcpy/pull/824#issuecomment-780319422>

Reviewed-by: Yu-Chen Lin <npes87184@gmail.com>
3 years ago
Romain Vimont 506f918fb7 Group components into struct scrcpy
This avoids to refer to many structs globally.
3 years ago
Romain Vimont 6fd7e89da1 Explicitly initialize decoder sink_count
The zero-initialization relied on the fact that the decoder instance is
static.
3 years ago
Romain Vimont 4c31911df2 Pass serial within struct server_params
This was the only option passed separately.
3 years ago
Secreto31126 d3d955f67b Translate README.md into Spanish
PR #2318 <https://github.com/Genymobile/scrcpy/pull/2318>

Signed-off-by: Romain Vimont <rom@rom1v.com>
3 years ago
Alberto Pasqualetto 8121b0b7e7 FAQ in Italian
PR #2316 <https://github.com/Genymobile/scrcpy/pull/2316>

Signed-off-by: Romain Vimont <rom@rom1v.com>
3 years ago
Alberto Pasqualetto 2e9d520080 README in Italian
PR #2316 <https://github.com/Genymobile/scrcpy/pull/2316>

Signed-off-by: Romain Vimont <rom@rom1v.com>
3 years ago
Romain Vimont 1b7c9b3e1c Reference translations from FAQ.md 3 years ago
Romain Vimont 9bed8cf3f4 Fix syntax highlighting in README 3 years ago
Romain Vimont 6adc97198b Provide device info directly on server connection
This avoids to retrieve them in a separate step.
3 years ago
Romain Vimont 6a2cd089a1 Initialize input manager dynamically
The input manager was partially initialized statically, but a call to
input_manager_init() was needed anyway, so initialize all the fields
from the "constructor".

This is consistent with the initialization of the other structs.
3 years ago
Romain Vimont dcee7c0f7f Factorize screen_init() error management 3 years ago
Romain Vimont e604e8a752 Move fps_counter to screen
The FPS counter specifically count frames from the screen video buffer,
so it is specific to the screen.
3 years ago
Romain Vimont f19c455110 Fix leak on error
Destroy video buffer if screen window creation failed.
3 years ago
Romain Vimont 83116fc199 Notify end-of-stream via callback
Do not send a SDL event directly, to make stream independent of SDL.
3 years ago
Alberto Pasqualetto 72081a241b Fix visualization of comment in code block
PR #2315 <https://github.com/Genymobile/scrcpy/pull/2315>

Signed-off-by: Romain Vimont <rom@rom1v.com>
3 years ago
LYK 42b3d1e66e Reformat README.ko.md
PR #2311 <https://github.com/Genymobile/scrcpy/pull/2311>

Signed-off-by: Romain Vimont <rom@rom1v.com>
3 years ago
Romain Vimont 1e64f0f931 Use ARRAY_LEN() macro 3 years ago