Commit Graph

273 Commits

Author SHA1 Message Date
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
21pages
991694aca5
update hwcodec, qsv support changing bitrate (#7911)
Signed-off-by: 21pages <pages21@163.com>
2024-05-06 10:59:25 +08:00
rustdesk
08b7e036b4 test vcpkg new in android 2024-05-01 12:58:27 +08:00
21pages
34c7c25908
update hwcodec, add windows ffmpeg vram encoding (#7876)
* windows add ffmpeg vram encoding
* windows add missing nvenc and qsv ram encoding, linux add vaapi, current codec table:  https://github.com/21pages/hwcodec?tab=readme-ov-file#codec

Signed-off-by: 21pages <pages21@163.com>
2024-05-01 00:07:09 +08:00
21pages
2626dcbc5f
fix black screen issue when controlling the second screen on versions that lack multiple display support while using vram decoding (#7836)
* avoid create unnecessary video decoder

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

* controlled side uses the most frequent selected codec

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

* fix black screen when control old version's second screen

For versions that do not support multiple displays, the display parameter is always 0, need set type of current display

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

---------

Signed-off-by: 21pages <pages21@163.com>
2024-04-26 19:42:47 +08:00
21pages
0e7e27f99d
update hwcodec, fix gpu/cpu stuck caused by nv codec (#7826)
* Disable all nv codec encoding on windows except nv sdk encoding,
  because it doesn't use CUContext
* Keep nv codec on linux, because I didn't reproduce the stuck on it
* Add ffmpeg d3d11 vram decoding

Signed-off-by: 21pages <pages21@163.com>
2024-04-25 20:16:48 +08:00
21pages
4252b5e273
enable ffmpeg native h26x software decoders for all platforms (#7750)
* enable ffmpeg native h26x software decoders for all platforms

* h26x software decoders depend on hwcodec feature, so all platforms
  enable it, software h26x decoders are always available like vpx, no available check and no option
* ffmpeg:
	- build: mac arm64 build ffmpeg with my m1, others build with ci
	- version: win/linux use ffmpeg release/5.1, becaues higher version require higher nvidia driver,  other platforms use release/7.0
* test:
	- ios not test.
	- android: sometimes the screen will appear blurry, but it will recover after a while.
	- arm64 linux: test a example of hwcodec repo

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

* check hwcodec only when enabled and immediately when clicked enabled

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

---------

Signed-off-by: 21pages <pages21@163.com>
2024-04-18 13:12:45 +08:00
rustdesk
c656c3c087 typo 2024-04-16 18:46:46 +08:00
rustdesk
44bce59777 more java_ffi_FFI 2024-04-16 18:22:36 +08:00
21pages
5c4d95ac0f
not use av1 as auto codec on x86 sciter (#7714)
Signed-off-by: 21pages <pages21@163.com>
2024-04-13 21:10:36 +08:00
21pages
98df2b111e
hwcodec uses one repository (#7701)
* update hwcodec, gpucodec repo is merged to hwcodec

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

* rename gpucodec.rs to vram.rs

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

* rename all gpucodec to vram, because vram is a feature of hwcodec

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

* use one check process and one config file

* set check encode image size to 720p

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

---------

Signed-off-by: 21pages <pages21@163.com>
2024-04-12 17:26:24 +08:00
21pages
50d080d098
enable retina scale factor (#7269)
* enable retina scale factor

* enabled only when there are only one video service running
* scale mouse event
* scale cursor position
* scale remote menu display button
* adjust resolution

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

* Update server.rs

---------

Signed-off-by: 21pages <pages21@163.com>
Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
2024-02-27 22:28:23 +08:00
wangweijie
cce1ce0ee0
Add loongarch64 support (#7244)
Signed-off-by: wangweijie <wangweijie@loongson.cn>
2024-02-23 20:08:35 +08:00
21pages
5581248a1e
fix startup crash on windows without adapter (#7093)
Signed-off-by: 21pages <pages21@163.com>
2024-02-09 16:53:15 +08:00
wesley800
c97cc15c0e
Warn on MIT-SHM not working on Linux X11 (#6856)
* Clarify video capture method

* fix improper level of pointer usage of xcb_generic_error_t

* add ffi of xcb_shm_query_version

* throw a warn about MIT-SHM not working

* add missing #[cfg]

* checks SHM validity on the fly, rather than cache on creation

---------

Co-authored-by: root <root@localhost>
Co-authored-by: rustdesk-fork <rustdesk@fork.com>
2024-01-31 17:49:09 +08:00
rustdesk
dd4b5349cb revert https://github.com/rustdesk/rustdesk/pull/6980 2024-01-26 19:22:26 +08:00
rustdesk
3899e4e12e add round to avoid precision problem 2024-01-26 12:59:47 +08:00
rustdesk
f016281e30 fix ci 2024-01-26 12:54:36 +08:00
Sahil Yeole
1d755c705b
Fix: Mac retina display video blur (#6980)
* fix mac retina display blur

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* Update display.rs

---------

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
2024-01-26 12:50:13 +08:00
21pages
71d7398ae7
video handler holds only one decoder of the current codec format (#6939)
1. For example: when receiving h264 video frames, only 1 decoder is created, vram > ram
2. For creation and decoding failed:
  * Remove real_supported_decodings, this will update real existing decoders, replace it with the "mark_unsupported" vector. After creating the decoder failure, marks the codec as unsupported and updates supported decoding to the controlled side
  *  Add `fail_counter` in the decoder. When decoding 10 consecutive frames failed, adding codec type to 'mark_unsupported' vector
  *  The controlled end always ignores the unavailability of VP9

Signed-off-by: 21pages <pages21@163.com>
2024-01-22 20:01:17 +08:00
RustDesk
804f035a87
Revert "disable ffmpeg ram codec temporarily" (#6928) 2024-01-20 17:20:08 +08:00
21pages
267342e7e6
disable ffmpeg ram codec temporarily (#6927)
Signed-off-by: 21pages <pages21@163.com>
2024-01-20 17:19:30 +08:00
21pages
89150317e1
add zero copy mode hareware codec for windows (#6778)
Signed-off-by: 21pages <pages21@163.com>
2024-01-02 16:58:10 +08:00
Sahil Yeole
20b4ce3213
Wayland: Skip remote desktop portal calls when uinput is available (#6758)
* skip rdp when uinput is available

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* fix is_server_running

* remove clones

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

---------

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
2023-12-28 10:40:58 +08:00
RustDesk
4b581c385c
Revert "fix xdg portal verison check for persist_mode (#6742)" (#6755)
This reverts commit 57acadd52a.
2023-12-27 11:28:17 +08:00
linuxrider
57acadd52a
fix xdg portal verison check for persist_mode (#6742) 2023-12-24 16:33:36 +08:00
Sahil Yeole
445fe6e714
Feat: Wayland flatpak input support | Remote desktop portal (#6675)
* autogen portal code

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* use remote desktop portal

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* remove clipboard portal in favour of #6586

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* remove clipboard portal

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* use select_devices for input capture

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* remove embedded cursor code as not being used | return session path for input capture

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* setup rdp input

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* remove simulate example

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* setup rdp input raw key events + mouse movements

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* fix rdp raw key input

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* refact rdp raw key inpuy & fix right meta key

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* refact and support rdp layout mode key input

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* support rdp mouse clicks

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* support rdp mouse scroll

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* support rdp key sequence input

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* use rdp input only when uinput is not available

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* combine rdp input and get_capturables into a single rdp request

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* rdp fix build

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* rdp fix build

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* fix rdp caps lock

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* format pipewire.rs

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* format rdp_input.rs

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* revert #6628 as rdp request state is now managed (better solution)

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* fix rdp crash on arch kde

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* rdp_input.rs improvements

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* refact request_remote_desktop

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* improve unwraps

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* remove unwraps

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

* use session references instead of clones

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>

---------

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
2023-12-19 10:44:58 +08:00
RustDesk
ebb14af488
Revert "use fullrange by default for yuv420p if supported (#6655)" (#6656)
This reverts commit 80afa98d66.
2023-12-11 22:46:32 +08:00
21pages
80afa98d66
use fullrange by default for yuv420p if supported (#6655)
1. Explicitly specify the color space as bt601
2. Use fullrange by default for yuv420p if supported
3. Use the pix_fmt space range format to identify codec capabilities, make i444 proto field deprecated, and cause the non-release version of 444 true color to fail.

Signed-off-by: 21pages <pages21@163.com>
2023-12-11 22:31:01 +08:00