Commit Graph

107 Commits

Author SHA1 Message Date
Armin Novak
5a532269ef [winpr,stream] Check Stream_SetLength return 2026-03-02 11:08:08 +01:00
Armin Novak
92ab55c5e1 [winpr,stream] Add Stream_ResetPosition
A helper function that does not require return checks, in contrast to
Stream_SetPosition, which might fail.
2026-03-01 06:11:59 +01:00
Armin Novak
2c0c55dc46 [c23,channels] replace NULL with nullptr 2026-02-26 13:43:54 +01:00
Armin Novak
e58819830a [c23] simplify boolean checks 2026-02-26 11:51:05 +01:00
Armin Novak
48267edf2f [winpr] add WINPR_C_ARRAY_INIT
since C23 allows c++ style initializing replace direct use with this
macro
2026-02-25 19:23:08 +01:00
akallabeth
d606a734c7 Merge pull request #12325 from akallabeth/attr-nodiscard-channels
Attr nodiscard channels
2026-02-25 10:12:42 +01:00
Armin Novak
3fcc287b16 [warnings] initialize all va_list 2026-02-25 07:41:39 +01:00
Armin Novak
8a24443ed6 [nodiscard] fix wrong attribute position 2026-02-24 16:10:11 +01:00
Armin Novak
f14096d468 [channels] mark functions [[nodiscard]] 2026-02-24 11:31:57 +01:00
Armin Novak
bf99266c2e [channels,warnings] properly handle function return 2026-02-16 09:18:38 +01:00
Armin Novak
775ee2615a [freerdp,channels] mark function pointers [[nodiscard]] 2026-02-16 09:18:34 +01:00
Armin Novak
6a1cc0f031 [freerdp,api] mark function pointers [[nodiscard]] 2026-02-16 09:18:30 +01:00
Armin Novak
eb0b74a908 [channels,rdpecam] fix sign warnings 2026-02-13 12:17:47 +01:00
Armin Novak
fff62ff919 [channels,rdpecam] fix integer types and warnings 2026-02-10 19:07:10 +01:00
Armin Novak
e3981d8f02 [channels,rdpecam] fix integer types and warnings 2026-02-10 17:02:15 +01:00
akallabeth
55a9161ecb [channels,rdpecam] fix sws context checks 2026-02-08 09:16:33 +01:00
akallabeth
067524438a [channels,rdpecam] fix PROPERTY_DESCRIPTION parsing
* The Capabilities field is a mask, so allow combination of all valid
  values.
* Adjust header to hold a mask
* Use enum to define constants for parsed values
2026-01-28 08:42:08 +01:00
akallabeth
076a8386a6 Merge pull request #12186 from akallabeth/error-handling-fixes
Error handling fixes
2026-01-26 17:05:19 +01:00
akallabeth
538620e1bb [channels] mark all WINPR_ATTR_MALLOC also nodiscard 2026-01-26 13:22:27 +01:00
akallabeth
f3ab1a1613 [channels,rdpecam] ensure all streams are stopped
When closing the channel ensure there are no more streams running.
2026-01-26 11:26:45 +01:00
akallabeth
d2d4f44931 [channels,rdpecam] ensure sws context size matches 2026-01-26 11:26:44 +01:00
akallabeth
f039d35032 [channels] replace casts by proper return addresses
Use the base structs return address instead of a derived one so the data
types match.
2026-01-26 11:09:54 +01:00
akallabeth
d60d542d7c [c,printf] fix wlog format string to match arguments 2026-01-16 11:40:02 +01:00
akallabeth
ef60ef48a9 [c,printf] fix wlog format string to match arguments 2026-01-16 11:40:00 +01:00
akallabeth
2172178476 [c,printf] fix wlog format string to match arguments 2026-01-16 11:39:57 +01:00
akallabeth
946d3565a1 [c,printf] fix wlog format string to match arguments 2026-01-16 11:39:54 +01:00
akallabeth
508a0db07c [channels,rdpecam] add value range checks
When reading a enum value from network, first check the value range and
abort with a log message if an invalid value is found
2026-01-09 09:37:48 +01:00
akallabeth
1351d437fd [channels,rdpecam] allow MJPEG frame skip and direct passthrough
* direct passthrough of MJPEG announced
* allow frame drops for MJPEG
* drop samples if encoding fails
* add verbose/debug logging of delayed and dropped frames
2025-12-10 16:57:39 +01:00
eduar-hte
d3fdbbe8cf Send sample only if there's one to be sent.
- This issue was introduced in FreeRDP/FreeRDP@32e64c1e98
- If a sample request is received from the server before the camera
  provides one, an assertion is triggered because an invalid sample is
  attempted to be sent as a response, as the default initialization of
  `stream->pendingSample` sets its `length` to its `capacity`.
2025-12-10 14:54:11 +00:00
akallabeth
6bac078120 [channels,rdpecam] fix implicit widening of multiplication result 2025-12-05 09:00:58 +01:00
akallabeth
c118d3df18 [channels,rpdecam] log dropped samples 2025-12-05 08:20:25 +01:00
David Fort
32e64c1e98 rdpecam: fix camera sample grabbing
Before this patch we had a behavior where there was a credit of 8 samples that
could be sent to the server with no corresponding sample request. So in the right
conditions, we were having situations where the server was receiving samples that
it has not requested, and so it was dropping them. The visible effect was small
artifacts in the camera stream when i-frames where dropped, and more serious ones
when the dropped content was containing key frames.

This issue has also been reported when xfreerdp connects on g-r-d as #11990.

This patch reworks the frame grabbing workflow: when the frame grabbing thread calls
the sample callback we check if a sample is already pending, waiting to be sent to the
server. If that's the case and the camera's input format supports frame dropping we just
refresh the pending frame with the new one. If the input format can't drop frames (like
with h264 and mjpg) we wait until the current pending frame is sent.
So now frames can be sent either when we receive a sample request from the server,
or when the sample callback is invoked.
2025-12-04 23:14:54 +01:00
akallabeth
d80d9bf2ce [channels,rdpecam] improve log messages 2025-12-01 09:15:17 +01:00
Armin Novak
6eaf8ca683 [channels,rdpecam] fix a memory leak 2025-09-30 16:44:49 +02:00
akallabeth
74648eb3a9 [c,standard] use C99 inline 2025-09-26 11:29:26 +02:00
akallabeth
85b864c799 Merge pull request #11848 from akallabeth/proxy-module-pc
[proxy,modules] generate pkg-config files for modules
2025-09-11 09:14:30 +02:00
akallabeth
25b5b38d32 [CMake,client] add pkg-config dependencies 2025-09-11 07:17:52 +02:00
David Fort
ae2e951af6 rdpecam: add some new callbacks to the HAL
This patch adds Activate and Deactivate callbacks to the HAL, matching the messages
exchanged on the channel. This is to prepare the support of a windows HAL using the
microsoft media fundation framework.
2025-09-10 16:13:59 +02:00
akallabeth
79b8793a8f [cmake] simplify v4l detection 2025-04-12 21:26:44 +02:00
akallabeth
88821d8451 [channels,rdpecam] fix libusb include path 2025-03-04 21:43:10 +01:00
oleg0421
7e7a65becd [channel,rdpecam] uvc_h264 fix for C922 camera 2025-02-17 17:45:39 -08:00
akallabeth
d5c488f479 [channel,rdpecam] better logging 2025-02-17 06:57:24 +01:00
akallabeth
2b7d7356c1 [channels,warnings] fix -Wunused-parameter 2025-02-13 15:53:56 +01:00
Armin Novak
0e006e31fe [warnings] fix sign conversion 2025-02-12 12:52:29 +01:00
oleg0421
2ac2caf6fc [channel,rdpecam] uvc_h264 xu_descriptor pointer fix 2025-02-10 22:08:35 -08:00
akallabeth
4013b3132b [clang,tidy] fix sign warnings 2025-02-10 13:11:16 +01:00
akallabeth
0f8d54d566 [channels,rdpecam] fix sign warning 2025-02-10 12:39:44 +01:00
akallabeth
574ab7f999 [channels,rdpecam] fix clang-tidy warnings 2025-02-10 11:28:22 +01:00
akallabeth
6cf34d6ca9 [channels,rdpecam] fix missing length checks 2025-02-10 11:03:42 +01:00
oleg0421
e2d900c76c [channel,rdpecam] support Logitech h264 stream mux format 2025-02-10 11:03:39 +01:00