Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MS-RDPECAM] Camera doesn't work in Microsoft Teams and Windows Camera #10274

Open
progxaker opened this issue Jun 14, 2024 · 24 comments
Open

[MS-RDPECAM] Camera doesn't work in Microsoft Teams and Windows Camera #10274

progxaker opened this issue Jun 14, 2024 · 24 comments
Assignees

Comments

@progxaker
Copy link
Contributor

Describe the bug
A camera doesn't work with MS-RDPECAM protocol in Microsoft Teams and Windows Camera applications. Its led lights up for 2-4 seconds, nothing happens in the applications, and the camera LED goes out.
Relates to #4971 #10258 #10273.

To Reproduce
Steps to reproduce the behavior:

  1. Run FreeRDP with the build and run parameters described in Implement MS-RDPECAM client, closes #4971 #10258.
  2. Open https://webcamtests.com/.
  3. Click "Check my webcam".
  4. The camera should be working.
  5. Open the "Camera" application.
  6. The LED will blink slowly.
  7. An error message will appear at the end.

Expected behavior
Teams and the Camera applications broadcast the camera image.

Screenshots
image
image

Application details

  • FreeRDP version (xfreerdp /version)
    This is FreeRDP version 3.5.2-dev0 (bcd663b7d)

  • Command line used
    ./sdl-freerdp ./SessionDesktop.rdpw /gateway:type:arm /size:1366x768 /f /u:<username> /p:'<password>' /mic:sys:pulse,format:1 /network:auto /auto-reconnect /dvc:rdpecam -decorations /log-level:TRACE

  • Output of xfreerdp /buildconfig

    Build config
    This is FreeRDP version 3.5.2-dev0 (bcd663b7d)
    Build configuration: BUILD_TESTING=OFF WINPR_HAVE_AIO_H=1 WINPR_HAVE_EXECINFO_BACKTRACE=1 WINPR_HAVE_EXECINFO_BACKTRACE_SYMBOLS=1 WINPR_HAVE_EXECINFO_BACKTRACE_SYMBOLS_FD=1 WINPR_HAVE_EXECINFO_HEADER=1 WINPR_HAVE_FCNTL_H=1 WINPR_HAVE_GETLOGIN_R=1 WINPR_HAVE_GETPWUID_R=1 WINPR_HAVE_INTTYPES_H=1 WINPR_HAVE_POLL_H=1 WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIB=1 WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIBS= WINPR_HAVE_PTHREAD_MUTEX_TIMEDLOCK_SYMBOL=1 WINPR_HAVE_STDBOOL_H=1 WINPR_HAVE_STDINT_H=1 WINPR_HAVE_STRNDUP=1 WINPR_HAVE_SYSLOG_H=1 WINPR_HAVE_SYS_EVENTFD_H=1 WINPR_HAVE_SYS_FILIO_H= WINPR_HAVE_SYS_SELECT_H=1 WINPR_HAVE_SYS_SOCKIO_H= WINPR_HAVE_SYS_TIMERFD_H=1 WINPR_HAVE_TM_GMTOFF=1 WINPR_HAVE_UNISTD_H=1 WINPR_HAVE_UNWIND_H=1 WITH_AAD=ON WITH_ABSOLUTE_PLUGIN_LOAD_PATHS=ON WITH_ADD_PLUGIN_TO_RPATH=OFF WITH_ALSA=ON WITH_BINARY_VERSIONING=OFF WITH_CAIRO=ON WITH_CCACHE=OFF WITH_CHANNELS=ON WITH_CJSON_REQUIRED=OFF WITH_CLANG_FORMAT=ON WITH_CLIENT=ON WITH_CLIENT_AVAILABLE=1 WITH_CLIENT_CHANNELS=ON WITH_CLIENT_CHANNELS_AVAILABLE=1 WITH_CLIENT_COMMON=ON WITH_CLIENT_INTERFACE=OFF WITH_CLIENT_SDL=ON WITH_CLIENT_SDL2=ON WITH_CLIENT_SDL3=OFF WITH_CLIENT_SDL_AVAILABLE=1 WITH_CLIENT_SDL_VERSIONED=OFF WITH_CUPS=ON WITH_DEBUG_ALL=ON WITH_DEBUG_CAPABILITIES=ON WITH_DEBUG_CERTIFICATE=ON WITH_DEBUG_CHANNELS=ON WITH_DEBUG_CLIPRDR=ON WITH_DEBUG_CODECS=ON WITH_DEBUG_DVC=ON WITH_DEBUG_EVENTS=ON WITH_DEBUG_KBD=ON WITH_DEBUG_LICENSE=ON WITH_DEBUG_MUTEX=ON WITH_DEBUG_NEGO=ON WITH_DEBUG_NLA=ON WITH_DEBUG_NTLM=ON WITH_DEBUG_RAIL=ON WITH_DEBUG_RDP=ON WITH_DEBUG_RDPDR=ON WITH_DEBUG_RDPEI=ON WITH_DEBUG_RDPGFX=ON WITH_DEBUG_REDIR=ON WITH_DEBUG_RFX=ON WITH_DEBUG_RINGBUFFER=OFF WITH_DEBUG_SCARD=ON WITH_DEBUG_SCHANNEL=ON WITH_DEBUG_SDL_EVENTS=ON WITH_DEBUG_SDL_KBD_EVENTS=ON WITH_DEBUG_SND=ON WITH_DEBUG_SVC=ON WITH_DEBUG_SYMBOLS=OFF WITH_DEBUG_THREADS=ON WITH_DEBUG_TIMEZONE=ON WITH_DEBUG_TRANSPORT=ON WITH_DEBUG_TSG=ON WITH_DEBUG_TSMF=OFF WITH_DEBUG_TSMF_AVAILABLE=0 WITH_DEBUG_URBDRC=ON WITH_DEBUG_WND=ON WITH_DEBUG_X11=ON WITH_DEBUG_X11_LOCAL_MOVESIZE=ON WITH_DEBUG_XV=ON WITH_DSP_EXPERIMENTAL=OFF WITH_DSP_FFMPEG=ON WITH_DSP_FFMPEG_AVAILABLE=1 WITH_EVENTFD_READ_WRITE=1 WITH_FAAC=OFF WITH_FAAD2=OFF WITH_FFMPEG=ON WITH_FREERDP_DEPRECATED=OFF WITH_FREERDP_DEPRECATED_COMMANDLINE=ON WITH_FULL_CONFIG_PATH=OFF WITH_FUSE=ON WITH_GFX_FRAME_DUMP=OFF WITH_GFX_H264=ON WITH_GPROF=OFF WITH_GSM=OFF WITH_INTERNAL_MD4=OFF WITH_INTERNAL_MD5=OFF WITH_INTERNAL_RC4=OFF WITH_JPEG=OFF WITH_JSONC_REQUIRED=OFF WITH_JSON_DISABLED=OFF WITH_KRB5=ON WITH_KRB5_NO_NTLM_FALLBACK=OFF WITH_LAME=OFF WITH_LIBRARY_VERSIONING=ON WITH_LIBRESSL=OFF WITH_LODEPNG=OFF WITH_MACAUDIO=OFF WITH_MACAUDIO_AVAILABLE=0 WITH_MANPAGES=ON WITH_MBEDTLS=OFF WITH_MS_RDPECAM_CLIENT=ON WITH_NATIVE_SSPI=OFF WITH_NEON=OFF WITH_OPAQUE_SETTINGS=OFF WITH_OPENCL=OFF WITH_OPENH264=OFF WITH_OPENSSL=ON WITH_OPUS=OFF WITH_OSS=ON WITH_PCSC=ON WITH_PKCS11=ON WITH_PLATFORM_SERVER=ON WITH_POLL=ON WITH_PROFILER=OFF WITH_PROXY=ON WITH_PROXY_APP=ON WITH_PROXY_EMULATE_SMARTCARD=OFF WITH_PROXY_MODULES=ON WITH_PULSE=ON WITH_RDTK=ON WITH_SAMPLE=ON WITH_SANITIZE_ADDRESS=OFF WITH_SANITIZE_ADDRESS_AVAILABLE=1 WITH_SANITIZE_MEMORY=OFF WITH_SANITIZE_MEMORY_AVAILABLE=1 WITH_SANITIZE_THREAD=OFF WITH_SANITIZE_THREAD_AVAILABLE=1 WITH_SDL_IMAGE_DIALOGS=OFF WITH_SDL_LINK_SHARED=ON WITH_SERVER=ON WITH_SERVER_CHANNELS=ON WITH_SERVER_INTERFACE=ON WITH_SHADOW=ON WITH_SMARTCARD_EMULATE=ON WITH_SMARTCARD_INSPECT=OFF WITH_SMARTCARD_PCSC=ON WITH_SOXR=OFF WITH_SSE2=OFF WITH_SWSCALE=ON WITH_SYSTEMD=OFF WITH_THIRD_PARTY=OFF WITH_TIMEZONE_ICU=OFF WITH_UNICODE_BUILTIN=OFF WITH_URIPARSER=ON WITH_VAAPI=OFF WITH_VAAPI_AVAILABLE=1 WITH_VALGRIND_MEMCHECK=OFF WITH_VALGRIND_MEMCHECK_AVAILABLE=1 WITH_VERBOSE_WINPR_ASSERT=ON WITH_VIDEO_FFMPEG=ON WITH_VIDEO_FFMPEG_AVAILABLE=1 WITH_WAYLAND=ON WITH_WEBVIEW=OFF WITH_WEBVIEW_QT=OFF WITH_WINPR_DEPRECATED=OFF WITH_WINPR_JSON=ON WITH_WINPR_TOOLS=ON WITH_WIN_CONSOLE=ON WITH_X11=ON WITH_XCURSOR=ON WITH_XEXT=ON WITH_XFIXES=ON WITH_XI=ON WITH_XINERAMA=ON WITH_XRANDR=ON WITH_XRENDER=ON WITH_XV=ON
    Build type:          RelWithDebInfo
    CFLAGS:               -Wall -Wpedantic -Wno-padded -Wno-cast-align -Wno-declaration-after-statement -fPIC -Wall -fvisibility=hidden -Wimplicit-function-declaration -Wredundant-decls -g -fno-omit-frame-pointer
    Compiler:            GNU, 11.4.0
    Target architecture: x64
    
  • OS version connecting to (server side) - Windows 11

  • If available the log output from a run with /log-level:trace 2>&1 | tee log.txt
    freerdp-with_out-sanitizer.tar.gz

Environment (please complete the following information):

  • OS: Linux
  • Version/Distribution: Xubuntu 22.04.4 LTS
  • Architecture: x86_64

Additional context
Before running FreeRDP, I rebooted a PC to reset any running threads, if there were any.

@progxaker
Copy link
Contributor Author

Hello @oleg0421. The problem still exists, so as we agreed, I created this issue.

@hardening
Copy link
Contributor

I kinda have the same symptoms with youcam I a few pictures and then tons of "no credits" messages. Perhaps the guess at 30 fps for the cameras is a bit too much

@oleg0421
Copy link
Contributor

@progxaker , @hardening : I am looking into this and will get back with more details. Meanwhile, could you please post here the results of these commands for your cameras:

v4l2-ctl --list-formats --device=/dev/video0
v4l2-ctl --list-formats-ext

Thank you!

@progxaker
Copy link
Contributor Author

@oleg0421:

List formats
# v4l2-ctl --list-formats --device=/dev/video0
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture

        [0]: 'YUYV' (YUYV 4:2:2)
List formats (ext)
# v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture

        [0]: 'YUYV' (YUYV 4:2:2)
                Size: Discrete 640x480
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 176x144
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 320x240
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 1024x768
                        Interval: Discrete 0.100s (10.000 fps)
                Size: Discrete 1280x720
                        Interval: Discrete 0.125s (8.000 fps)
                Size: Discrete 1280x1024
                        Interval: Discrete 0.125s (8.000 fps)
                Size: Discrete 1600x900
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 1600x1200
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 640x480
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.033s (30.000 fps)

@oleg0421
Copy link
Contributor

@progxaker : thank you for the v4l2 output. It looks like your camera supports 30fps only up to 480p (640x480) resolution. Anything higher has lower fps. When you go to https://webcamtests.com, it requests 480p:

[08:47:41:059] [5263:0000154f] [INFO][com.freerdp.channels.rdpecam-v4l.client] - [cam_v4l_stream_start]: Camera format: YUYV, width: 640, height: 480, fps: 30

so the camera works. However, when you go to Teams, it requests 720p:

[08:48:03:376] [5263:0000154f] [INFO][com.freerdp.channels.rdpecam-v4l.client] - [cam_v4l_stream_start]: Camera format: YUYV, width: 1280, height: 720, fps: 30

and the driver/camera refuses to provide even a single sample.
This is different behavior from my cameras, which throttle, but still output frames at lower fps.

Windows camera app in settings allows to select the resolution. My guess is that if you select 640x480 or lower, it should work, but anything higher won't. Please try this test and confirm that's the case.

Also, as this is resource heavy feature, it's better to compile with all debug-related options turned OFF to make sure video performance is not impacted.

I will investigate more about how to detect/control supported fps based on resolution and avoid hard coding it to 30.

@oleg0421
Copy link
Contributor

Looks like I need to rework the logic in channels/rdpecam/client/v4l/camera_v4l.c to utilize the following ioctl:

VIDIOC_ENUM_FRAMESIZES
VIDIOC_ENUM_FRAMEINTERVALS

Please assign the bug to me.

@progxaker
Copy link
Contributor Author

However, when you go to Teams, it requests 720p:

According to a response on Microsoft Community:

Here are the bandwidth requirements for different resolutions:

  • 30 kbps for audio calling
  • 130 kbps for audio calling and screen sharing
  • 500 kbps for video calling 360p at 30fps
  • 1.2 Mbps for HD quality video calling with a resolution of HD 720p at 30fps
  • 1.5 Mbps for HD quality video calling with a resolution of HD 1080p at 30fps
  • 500kbps/1Mbps for Group Video calling
  • 1Mbps/2Mbps for HD Group video calling (540p videos on 1080p screen)

My guess is that if you select 640x480 or lower, it should work, but anything higher won't. Please try this test and confirm that's the case.

Most articles state that I can change the resolution in the Camera app, but there is no such option... I can't seem to change it before the app initializes with the camera (i.e. without errors).

Also, as this is resource heavy feature, it's better to compile with all debug-related options turned OFF to make sure video performance is not impacted.

I'll test this on Monday.


I tested #10276 a bit, but unfortunately it didn't solve the problem.

@akallabeth
Copy link
Member

@progxaker @oleg0421 I´ve reverted the default ON for this channel with #10280 as we must keep API/ABI stable for 3.x releases. (still easily enabled, just not by default)

@oleg0421
Copy link
Contributor

oleg0421 commented Jun 17, 2024

@akallabeth : agree, but please see my comment here:
#10280 (comment)

@progxaker
Copy link
Contributor Author

Hello @oleg0421. I built FreeRDP from the master branch (0633623) and now it looks better, I was able to get an image in the Camera application but still not in Teams.
I'll try to built without the DEBUG logs and let you know.

I ran webcamtests, Teams and then Camera.
freerdp-with_out-sanitizer.tar.gz

@progxaker
Copy link
Contributor Author

progxaker commented Jun 18, 2024

Hello @akallabeth.
I deleted the cache (build/) as I had DEBUG options cached when WITH_DEBUG_ALL was set to OFF, and after built and running FreeRDP I got the error: failed with /opt/freerdp-nightly-selfbuild/lib/freerdp3/librdpecam-client.so: cannot open shared object file: No such file or directory

freerdp-0633623-error.log

I deleted the cache again, reverted the mentioned pull request (git revert de2a59a -m 1) and then FreeRDP was successfully started.


@oleg0421
I rebuilt FreeRDP without DEBUG and ran the applications in the same order. Unfortunately, nothing changed in Teams.
I also tested different video qualities in the Camera app - everything is fine, but it's strange why I have 144p with an 11:9 aspect ratio.
image
freerdp-with_out-sanitizer-and-debug.tar.gz

@akallabeth
Copy link
Member

@progxaker well, that error is expected (turn off RDPECAM by default) so you need to enable it in your build ;)
-DCHANNEL_RDPECAM=ON -DCHANNEL_RDPECAM_CLIENT=ON helps there

@progxaker
Copy link
Contributor Author

Ah... The parameter names were changed, got it. Thanks)

@akallabeth
Copy link
Member

Ah... The parameter names were changed, got it. Thanks)

these are the FreeRDP default channel variables generated for each channel since ages?

@oleg0421
Copy link
Contributor

@akallabeth it worked for me, thanks a lot. Maybe we need to have it written somewhere, how to specifically enable RDPECAM_CLIENT feature in the build, if people like me are getting confused :)

@akallabeth
Copy link
Member

@oleg0421 true.
there is https://github.com/FreeRDP/FreeRDP/wiki/Compilation which might need an update.
and there is ccmake of course ;)

@oleg0421
Copy link
Contributor

oleg0421 commented Jun 19, 2024

@progxaker: sorry you still have problem with Teams. I went through the logs you shared. Your camera reports these resolutions supported:

[10:22:57:800] [93069:00016bfe] [DEBUG][com.freerdp.channels.rdpecam-v4l.client] - [cam_v4l_get_media_type_descriptions]: Camera format: YUYV, width: 640, height: 480, fps: 30/1
[10:22:57:800] [93069:00016bfe] [DEBUG][com.freerdp.channels.rdpecam-v4l.client] - [cam_v4l_get_media_type_descriptions]: Camera format: YUYV, width: 176, height: 144, fps: 30/1
[10:22:57:800] [93069:00016bfe] [DEBUG][com.freerdp.channels.rdpecam-v4l.client] - [cam_v4l_get_media_type_descriptions]: Camera format: YUYV, width: 320, height: 240, fps: 30/1
[10:22:57:800] [93069:00016bfe] [DEBUG][com.freerdp.channels.rdpecam-v4l.client] - [cam_v4l_get_media_type_descriptions]: Camera format: YUYV, width: 1024, height: 768, fps: 10/1
[10:22:57:800] [93069:00016bfe] [DEBUG][com.freerdp.channels.rdpecam-v4l.client] - [cam_v4l_get_media_type_descriptions]: Camera format: YUYV, width: 1280, height: 720, fps: 8/1
[10:22:57:800] [93069:00016bfe] [DEBUG][com.freerdp.channels.rdpecam-v4l.client] - [cam_v4l_get_media_type_descriptions]: Camera format: YUYV, width: 1280, height: 1024, fps: 8/1
[10:22:57:801] [93069:00016bfe] [DEBUG][com.freerdp.channels.rdpecam-v4l.client] - [cam_v4l_get_media_type_descriptions]: Camera format: YUYV, width: 1600, height: 900, fps: 5/1
[10:22:57:801] [93069:00016bfe] [DEBUG][com.freerdp.channels.rdpecam-v4l.client] - [cam_v4l_get_media_type_descriptions]: Camera format: YUYV, width: 1600, height: 1200, fps: 5/1

It is consistent with v4l2-ctl output that you shared earlier.

Windows Camera app displays only resolutions that support 30 fps and higher. That is why you see 640x480, 176x144 and 320x240 only, including 144p resolution you've mentioned. Before my last fix, we've had 30 fps hard coded for every resolution, so Camera app was showing more resolutions, but it was incorrect.

MS Teams consistently requests 1280x720, even though your camera supports it at 8 fps:

[10:25:24:946] [93069:00016bfe] [INFO][com.freerdp.channels.rdpecam-v4l.client] - [cam_v4l_stream_start]: Camera format: YUYV, width: 1280, height: 720, fps: 8/1

After we tell camera to start streaming at this resolution, we don't get back even a single frame from the camera. In my testing, Teams together with my camera and 1280x720 resolution work ok.

I suspect your camera or camera driver doesn't support 1280x720 resolution at 8 fps. If you know any other native Linux X11 application, that works with cameras and allows to select various resolutions, please try it to see if it can display video in 1280x720. Alternatively, you can try another computer / camera to see if it makes a difference with Teams.

You can also try to hack the code in camera_v4l.c, cam_v4l_get_media_type_descriptions() to filter out all resolutions with width >= 1280 to see how Teams will behave and whether it will satisfy your use case.

@progxaker
Copy link
Contributor Author

Hello @oleg0421. Thank you for the explanation and workaround.

sorry you still have problem with Teams.

You don't have to 🙂 Open-source is about desire, not obligation.

If you know any other native Linux X11 application, that works with cameras and allows to select various resolutions, please try it to see if it can display video in 1280x720.

I can try it if you want, but it's a built-in camera so I highly doubt it supports 720p, haha)

Alternatively, you can try another computer / camera to see if it makes a difference with Teams.

I thought about testing with another camera. It's also low resolution, but connected via USB, and I was wondering how FreeRDP would handle it. But I wanted to solve the current problems before moving on to other topics.

You can also try to hack the code in camera_v4l.c, cam_v4l_get_media_type_descriptions() to filter out all resolutions with width >= 1280 to see how Teams will behave and whether it will satisfy your use case.

Thanks for the tip (and the additional update :) ). I added the following patch to the file and Teams was able to broadcast my image!

[09:37:20:140] [145820:000239ef] [DEBUG][com.freerdp.channels.rdpecam-v4l.client] - [cam_v4l_get_media_type_descriptions]: Camera format: YUYV, width: 640, height: 480, fps: 30/1
[09:37:20:140] [145820:000239ef] [DEBUG][com.freerdp.channels.rdpecam-v4l.client] - [cam_v4l_get_media_type_descriptions]: Camera format: YUYV, width: 176, height: 144, fps: 30/1
[09:37:20:140] [145820:000239ef] [DEBUG][com.freerdp.channels.rdpecam-v4l.client] - [cam_v4l_get_media_type_descriptions]: Camera format: YUYV, width: 320, height: 240, fps: 30/1
[09:37:20:140] [145820:000239ef] [DEBUG][com.freerdp.channels.rdpecam-v4l.client] - [cam_v4l_get_media_type_descriptions]: Camera format: YUYV, width: 1024, height: 768, fps: 10/1
[09:37:29:846] [145820:000239ef] [INFO][com.freerdp.channels.rdpecam-v4l.client] - [cam_v4l_stream_start]: Camera format: YUYV, width: 1024, height: 768, fps: 10/1
Details
diff --git a/channels/rdpecam/client/v4l/camera_v4l.c b/channels/rdpecam/client/v4l/camera_v4l.c
index ccb60d65b..aa18848c2 100644
--- a/channels/rdpecam/client/v4l/camera_v4l.c
+++ b/channels/rdpecam/client/v4l/camera_v4l.c
@@ -214,6 +214,9 @@ static INT16 cam_v4l_get_media_type_descriptions(ICamHal* hal, const char* devic
                {
                        struct v4l2_frmivalenum frmival = { 0 };
 
+                       if (frmsize.discrete.width >= 1280)
+                               break;
+
                        if (frmsize.type != V4L2_FRMSIZE_TYPE_DISCRETE)
                                break; /* don't support size types other than discrete */
 

P.S. If you want the TRACE logs of this run, I can post them.


Based on the above statements, I wonder if you want to add a parameter to set the resolution manually? Or dynamic selection based on the resulting list, or max fps?

I'm wondering if any application would want to use Camera format: YUYV, width: 1600, height: 1200, fps: 5/1.

It can also be useful when a user is worried about Internet bandwidth (it's not my case) and setting a network connection type (if it's not legacy).

    /network: [invalid|modem|broadband|broadband-low|broadband-high|wan|lan|auto]
                                      Network connection type

@akallabeth
Copy link
Member

@progxaker better take your hands off /network parameter and leave at default (=auto) which does automatic bandwidth adjustments (and more often than not disables the stuff users actually want to have activated)

@oleg0421
Copy link
Contributor

@progxaker : thanks for the confirmation. It is basically a bug in camera driver (should not enumerate resolutions that camera doesn't actually support). On our side we can filter out formats/resolutions based on the following parameters:

maxWidth
minWidth
maxHeight
minHeight
maxFrameRate
minFrameRate

Any of them may be specified as command line parameters for /dvc:rdpecam plugin and combined with AND logic. For example, if you have:
minHeight=480, maxHeight=480,
it will filter out all resolutions but 480p.

The change would have to process newly added CLI parameters and do the filter logic in camera_device_main.c, ecam_dev_send_media_type_list_response () function, to make it independent from platform layer.

If you feel like this is a useful improvement, please help to add this change.

@oleg0421
Copy link
Contributor

@oleg0421 true.
there is https://github.com/FreeRDP/FreeRDP/wiki/Compilation which might need an update.
and there is ccmake of course ;)

@akallabeth: please let me know, how to edit the Compilation page. I just want to mention the feature and how to build and run with it, such as:

MS-RDPECAM camera redirect client support (experimental).

To build with it, use cmake option: -DCHANNEL_RDPECAM_CLIENT=ON
To run with it, use command line option: /dvc:rdpecam

@progxaker
Copy link
Contributor Author

progxaker commented Jun 23, 2024

Hello @oleg0421. Your suggestion sounds better than mine :)

If you feel like this is a useful improvement, please help to add this change.

What do you mean by "please help to add this change"? Prepare a pull request? Beta testing?

@oleg0421
Copy link
Contributor

Hello @progxaker. I meant that you actually implement this resolutions filter, since it was your idea :) If you have time and feel comfortable doing it.

@progxaker
Copy link
Contributor Author

@oleg0421 okay, no problem) It will take some time to research how it can be implemented and I won't be able to start until July 8, but it will be interesting to delve into C again.

Thanks again for your contribution! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants