Commit Graph

301 Commits

Author SHA1 Message Date
21pages
740c5358ab
rotate ID3D11Texture2D (#9772)
* Rotate ID3D11Texture2D after duplication with d3d11 video processor.
* If display is not rotated, nothing will be created; If the rotation
  fails, it will use the old fallback logic

TODO:
* If changing from Landscape to Landscape(flipped) during capture, the resolution is
  not changed, video service fallback to gdi directly.

Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-11-08 12:12:10 +08:00
21pages
e8187588c1
auto record outgoing (#9711)
* Add option auto record outgoing session
* In the same connection, all displays and all windows share the same
  recording state.

todo:

Android check external storage permission

Known issue:

* Sciter old issue, stop the process directly without stop record, the record file can't play.

Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-10-21 14:34:06 +08:00
fufesou
8c8a643cce
fix: workaround physical display rotation (#9696)
Signed-off-by: fufesou <linlong1266@gmail.com>
2024-10-19 10:57:42 +08:00
fufesou
21bcfd173d
fix: wayland, rdp input, mouse, scale (#9402)
* fix: wayland, rdp input, mouse, scale

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: rdp input, mouse, scale, check 0

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
2024-09-20 11:15:19 +08:00
21pages
40af9dc78b
not run window focus service on wayland (#9354)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-09-14 09:59:14 +08:00
fufesou
9380f33d7c
Refact/options (#9318)
* refact options

Signed-off-by: fufesou <linlong1266@gmail.com>

* Remove unused msg

Signed-off-by: fufesou <linlong1266@gmail.com>

* web, toggle virtual display

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
2024-09-10 23:54:59 +08:00
21pages
39e713838f
Use fallback codec if first frame fails (#9242)
* Both encoding and decoding use fallback if first frame fails
* More aggresive max fail counter
* Update hwcodec, add judgement when length of the encoded data is zero, https://github.com/rustdesk/rustdesk-server-pro/discussions/382#discussioncomment-10525997
* Fix serde hwcodec config toml fails when the non-first vec![] is empty, https://github.com/toml-rs/toml-rs/issues/384, the config file is used for cache, when check process is not finished, the cache is used.
* Allow cm not start for pro user

Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-09-03 18:48:17 +08:00
Vasyl Gello
2fd53f9825
Pass JVM to ffmpeg (#8985)
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
2024-08-08 11:53:49 +08:00
21pages
4fec8abad4
update repo to rustdesk-org (#8905)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-07-31 17:25:10 +08:00
rustdesk
cba8aaa410 tooltip for https://github.com/rustdesk/rustdesk/issues/8600, and change
dialog error to richtext with link support
2024-07-30 14:42:21 +08:00
Vasyl Gello
a72a8906b0
vcpkg deps (#8764)
* Revert "Revert vcpkg ffmpeg (#8751)"

This reverts commit 5c16a8302e.

* vcpkg: Reland ffmpeg and try to fix sciter build

Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>

* vcpkg: Detect AVX2 by requiring __m256i

(ubuntu18.04 sciter)

Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>

* Install nasm from debian buster and python3.7

... from ubuntu universe

[Skip CI]

* vcpkg: Add libyuv port with fix for windows

From
abc59feabf

Found by @deep-soft

Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>

* Bump vcpkg baseline to 2024.07.12

Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>

* Fix F-Droid version action

I thought the latest release will be updated by the time hook starts
but it is not the case. Get tag from GITHUB_REF instead if GITHUB_REF_TYPE
is "tag".

Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>

---------

Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
2024-07-23 23:31:36 +08:00
21pages
5c16a8302e
Revert vcpkg ffmpeg (#8751)
* Revert "fix linux ffmpeg link, still link ffmpeg in hwcodec (#8747)"

This reverts commit 48464835f5.

* Revert "fix linux armv7 ffmpeg arch, linux x64 sciter add hwcodec feature (#8744)"

This reverts commit b68d7a3054.

* Revert "arm linux remove cuda-llvm option (#8735)"

This reverts commit bc672b3367.

* Reapply "try fix arm64 linux ci and publish error log (#8730)" (#8732)

This reverts commit e283d33f28.

* Revert "try fix arm64 linux ci and publish error log (#8730)"

This reverts commit a4565bf0da.

* Revert "F-Droid: enable hwcodec for future builds (#8726)"

This reverts commit 188f85b042.

* Revert "remove unused vcpkg ffmpeg code (#8725)"

This reverts commit 72c96f22b6.

* Revert "install ffmpeg lib with vcpkg (#8724)"

This reverts commit 0143eaf601.

* update hwcodec to reverted

Signed-off-by: 21pages <sunboeasy@gmail.com>

---------

Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-07-18 22:28:35 +08:00
21pages
48464835f5
fix linux ffmpeg link, still link ffmpeg in hwcodec (#8747)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-07-18 13:18:21 +08:00
21pages
b68d7a3054
fix linux armv7 ffmpeg arch, linux x64 sciter add hwcodec feature (#8744)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-07-17 22:37:05 +08:00
21pages
bc672b3367
arm linux remove cuda-llvm option (#8735)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-07-17 17:19:21 +08:00
21pages
0143eaf601
install ffmpeg lib with vcpkg (#8724)
* use vcpkg to install ffmpeg and build sdk from source, so no prebuild lib in hwcodec.
* link ffmpeg in rustdesk directly, ffmpeg can be used as basic library.
* for windows developers, `VCPKG_DEFAULT_HOST_TRIPLET` env need to be set to `x64-windows-static` during installation.

Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-07-16 15:10:24 +08:00
21pages
821f7245b0
videotoolbox ram codec (#8683)
* h265 encoding: the second frame always fails, use repeat encoding to achieve real-time encoding
* h264 encoding: Not supported because encoding fails too frequently, about 50%, with one failure followed by another success.
* h264/h265 decoding: No issues found.
* Does not support dynamically changing the bitrate and changing the quality by resetting the encoder.

Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-07-12 11:08:51 +08:00
21pages
e2d217a138
fix wayland Display::all() comment (#8664)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-07-09 22:10:39 +08:00
21pages
f07936a911
wayland not call check_get_displays_changed_msg (#8637)
* wayland not call check_get_displays_changed_msg

For wayland, call Display::all() in video service will cause block, I
don't know the reason.

Signed-off-by: 21pages <sunboeasy@gmail.com>

* Update display_service.rs

---------

Signed-off-by: 21pages <sunboeasy@gmail.com>
Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
2024-07-09 18:01:30 +08:00
21pages
d00582e929
linux x11 rgb565 capture (#8580)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-07-03 14:20:41 +08:00
21pages
8602b036bd
remove special treatment when only use permanent passwrod but no password set (#8566)
1. Remove special treatment when only use permanent passwrod  but no password set, it has  no need and `Connection not allowd` prompt make user confusing.
2. When only use permanent password is chosen and the permanent password
   is empty, pop up the set-password dialog, if still not set in the
   dialog, back to the old choice
3. Add cancel confirm for 2fa and telegram bot

Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-07-02 14:32:22 +08:00
21pages
0f6538c1a7
add enable directx option, android software encoding half resolution option (#8435)
* add option enable directx capture screen, default true

Signed-off-by: 21pages <sunboeasy@gmail.com>

* option android software encoding half scale, check isStart flag

Signed-off-by: 21pages <sunboeasy@gmail.com>

---------

Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-06-21 18:54:32 +08:00
21pages
30bd4e1cef
update hwcodec, use ms as pts like vpx (#8422)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-06-20 13:57:56 +08:00
21pages
60ea8d2c2b
mac scale factor of each screen (#8368)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-06-16 12:01:41 +08:00
21pages
f559e9c74a
disable hardware encoding if encoding fails too many times (#8327)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-06-12 23:37:51 +08:00
21pages
610009528b
hwcodec, only process that start ipc server start check process (#8325)
check process send config to ipc server, other process get config from ipc server. Process will save config to toml, and the toml will be used if the config is none.

when start check process: ipc server process start or option changed
from disable to enable

when get config: main window start or option changed from disable to
enable, start_video_audio_threads.

Only windows implements signature, which is used to mark whether the gpu software and hardware information changes. After reboot, the signature doesn't change. https://asawicki.info/news_1773_how_to_programmatically_check_graphics_driver_version, use dxgi way to get software version, it's not consistent with the visible driver version, after updating intel driver with small version change, the signature doesn't change. Linux doesn't use toml file.

Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-06-12 20:40:35 +08:00
fufesou
8fa611daed
refact: Wayland, not support multiple displays (#8280)
* refact: Wayland, not support multiple displays

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* refact: Wayland disable multiple for RemoteDesktop

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <linlong1266@gmail.com>
2024-06-07 12:59:42 +08:00
21pages
9d42ee9df8
vram avoid always fallback to gdi (#8272)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-06-06 22:52:31 +08:00
21pages
bd51afe86c
fix rustPointerInput jni parameter declaration, call new_string in with_local_frame (#8266)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-06-05 18:09:01 +08:00
rustdesk
ce1dac3b86 attempt to fix local reference table overflow, https://github.com/rustdesk/rustdesk/issues/4118 2024-06-05 00:38:54 +08:00
21pages
8919ea65e3
fix, mac hwcodec decoding align use dst_align (#8215)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-05-30 23:40:25 +08:00
fufesou
72ec86b58d
refact: texture render as an option (#8168)
* refact: texture render as an option

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact: texture render, translation

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact: texture render as option

Signed-off-by: fufesou <linlong1266@gmail.com>

* Update ui_interface.rs

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
2024-05-28 16:42:30 +08:00
21pages
010b17509a
fix android get raw data (#8171)
If `std::ptr::copy_nonoverlapping` is not in `take`, it's not protected by the lock.

Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-05-28 16:35:59 +08:00
21pages
036d10cfbe
android: for software encoding and screen size > 1200, display size reduced to half (#8167)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-05-28 12:43:13 +08:00
21pages
c7308dbbc9
fix mediacodec bad encoding quality (#8159)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-05-27 19:34:40 +08:00
21pages
902e166f0c
fix mediacodec check_bitrate_range not work (#8133)
should check with mc_name, and that cause the highest custom bitrate
being invalid

Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-05-24 14:07:48 +08:00
21pages
49b0630752
fix android mediacodec encoding align (#8121)
* update ffmpeg, mediacodec encode align 64
* more d3d11 decode availablity check
* remove unused mediacodec info

Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-05-22 20:18:09 +08:00
21pages
d70b0cdd4f
Not require both max-width and max-height of mediacodec larger than (#8036)
screen width and screen height

* Only use hardware codec, when api < 29, judge with codec name prefix.

Signed-off-by: 21pages <pages21@163.com>
2024-05-13 20:24:50 +08:00
21pages
7e09809ad8
auto codec, h265 > h264 > vp9/vp8 (#8032)
Signed-off-by: 21pages <pages21@163.com>
2024-05-13 16:27:48 +08:00
21pages
a7499c2de8
add ffmpeg mediacodec h264/h265 encode (#8028)
* Check available when app start from kotlin via get codec info
* For latency free, repeat encode 10 frame at most when capture return WouldBlock
* For changing quality, kotlin support but jni doesn't support, rerun video service when quality is manualy
  changed
* 3 or 6 times bitrate for mediacodec because its quality is poor

Signed-off-by: 21pages <pages21@163.com>
2024-05-13 12:39:04 +08:00
21pages
c640f7ed12
fix android crash caused by outdated video frame ptr (#7996)
Signed-off-by: 21pages <pages21@163.com>
2024-05-09 22:53:01 +08:00
fufesou
bbe9017318
fix: wayland delete restore token (#7988)
* fix: wayland delete restore token

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* Wayland close session when clearing restore token

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* fix build

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* Refact Wayland option

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* Wayland clear screen selection, fake token

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* fix build web

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* fix: build

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* chore

Signed-off-by: fufesou <shuanglongchen@yeah.net>

---------

Signed-off-by: fufesou <shuanglongchen@yeah.net>
2024-05-09 11:03:59 +08:00
21pages
a31a68ba17
If there is hardware ram encoder as fallback, not require all adapters (#7987)
support the codec format

Signed-off-by: 21pages <pages21@163.com>
2024-05-09 09:02:25 +08:00
21pages
5ba1c2587d
opt supported encoding update, consider multi connections (#7978)
Signed-off-by: 21pages <pages21@163.com>
2024-05-08 20:31:39 +08:00
21pages
09f3850250
installed windows client save incoming recording to a specific directory (#7974)
Signed-off-by: 21pages <pages21@163.com>
2024-05-08 17:04:53 +08:00
fufesou
5537c525ca
refact: comments, wayland, restore token (#7947)
We cannot store restore_token if the server is not running.

Because `org.freedesktop.portal.RemoteDesktop` does not support persist
mode for now.

Signed-off-by: fufesou <shuanglongchen@yeah.net>
2024-05-08 09:49:16 +08:00
21pages
3746fd88b5
Show current codec in menu when auto codec is chosen (#7942)
* change negotiated codec name to negotiated codec format

Signed-off-by: 21pages <pages21@163.com>

* fallback to vp9 directly if failed to create encoder

Current fallback method is clear hwcodec config

Signed-off-by: 21pages <pages21@163.com>

* show current codec in menu when auto codec is chosen

Signed-off-by: 21pages <pages21@163.com>

---------

Signed-off-by: 21pages <pages21@163.com>
2024-05-07 20:34:23 +08:00
21pages
51813b7d7e
set vp9 as auto codec (#7928)
Signed-off-by: 21pages <pages21@163.com>
2024-05-07 15:20:55 +08:00
21pages
4e30418f79
disable av1 for all 32 bit platforms (#7921)
Signed-off-by: 21pages <pages21@163.com>
2024-05-06 23:09:09 +08:00
21pages
0af370d736
x86 sciter set not support av1 due to slow (#7920)
Signed-off-by: 21pages <pages21@163.com>
2024-05-06 22:03:49 +08:00