Share via

IRDPSRAPISharingSession: setting FrameCaptureIntervalInMs property has no effect

BenoitV-GE 31 Reputation points
2022-10-10T14:42:49.117+00:00

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++
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

Alex I 90 Reputation points
2023-04-06T13:53:55.6233333+00:00

Try to set value as UInt32. It helped me, and hopefully it will help you. _rdpSession.Properties["FrameCaptureIntervalInMs"] = (uint)100;

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. 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

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.