Try to set value as UInt32. It helped me, and hopefully it will help you. _rdpSession.Properties["FrameCaptureIntervalInMs"] = (uint)100;
IRDPSRAPISharingSession: setting FrameCaptureIntervalInMs property has no effect
In order to reduce CPU usage on the sharer side of an RDP session, I try to increase the frame capture interval.
Right after creating the RDPSession I set the "FrameCaptureIntervalInMs" property to a high number but it has no effect: on the viewer side the FPS is still as high as before, and on sharer side the CPU usage is still similar.
Is there anything I am missing to be ableto use this property?
CHECK(CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED));
CHECK(m_rdpSession.CoCreateInstance(__uuidof(RDPSession), nullptr, CLSCTX_INPROC));
// the following lines are intended to set a capture cadence of 1FPS
CComPtr<IRDPSRAPISessionProperties> props;
CHECK(m_rdpSession->get_Properties(&props));
const CComBSTR propName = "FrameCaptureIntervalInMs";
const CComVariant propValue{ 1000, VT_I4 };
CHECK(props->put_Property(propName, propValue));
EDIT: m_rdpSession is declared as:
CComPtr<IRDPSRAPISharingSession> m_rdpSession;
Windows development | Windows API - Win32
Windows for business | Windows Client for IT Pros | User experience | Remote desktop services and terminal services
Developer technologies | C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
Answer accepted by question author
1 additional answer
Sort by: Most helpful
-
Bruno Harak 21 Reputation points
2023-03-16T14:17:54.4866667+00:00 I can also confirm this issue although I am using RDPCOMAPILib as I'm having a .Net-Framework application. Setting a value for "FrameCaptureIntervalInMs" to values like 500 should have a reasonably strong effect but it doesn't change anything.
Code in .Net is quite simple:
var _rdpSession = new RDPCOMAPILib.RDPSession();
_rdpSession.Properties["FrameCaptureIntervalInMs"] = 500; // tried to set the value before starting the host
_rdpSession.Open();
_rdpSession.Properties["FrameCaptureIntervalInMs"] = 500; // and also after starting the host
Did you manage to get this to work?
Regards,
Bruno