TRVCamera.DesktopMode, DesktopRect, DesktopWindowHandle, DesktopForm [FireMonkey], DesktopZoomPercent

<< Click to display table of contents >>

TRVCamera.DesktopMode, DesktopRect, DesktopWindowHandle, DesktopForm [FireMonkey], DesktopZoomPercent

These properties specify a part of desktop for encoding into a video.

type

  // defined in MRVType unit
  TRVDesktopMode = (rvdmFull, rvdmRect, rvdmWindow);
property DesktopMode: TRVDesktopMode;
property DesktopRect: TRVMRect;

property DesktopZoomPercent: Integer;

 

// only for Windows and macOS
property DesktopWindowHandle: TRVMWindowHandle;

// only for FireMonkey

property DesktopForm: TCustomForm; 

 

These properties are used if DeviceType=rvdtDesktop.

VCL, Lazarus for Windows, FireMonkey for Windows and macOS

A source region of screen is chosen depending in DesktopMode property.

DesktopMode

Meaning

rvdmFull

A whole desktop or a whole monitor is used as a source, see VideoDevice*** properties.

rvdmRect

A rectangle defined in DesktopRect is used

rvdmWindow

A rectangle of the window specified in DesktopWindowHandle is used. If DesktopWindowHandle=0, the main form is used.

macOS note: the current implementation supports only the primary monitor.

If you want to use other application's window as a source, you can use GetVisibleWindowsHandles to get possible values of DesktopWindowHandle.

FireMonkey

FireMonkey version of RVMedia supports all DesktopMode options only for Windows and macOS platforms.

On other platforms, it can stream only forms of this application. DesktopMode must be rvdmWindow. The source form is specified in DesktopForm. On Windows and macOS platforms, if both DesktopWindowHandle and DesktopForm are defined, DesktopForm is chosen for streaming.

When streaming, RVMedia draws DesktopForm onto the bitmap (instead of streaming a screen area covered by this form).

If DesktopWindowHandle and DesktopForm are not defined, the main form is used.

Common

DesktopZoomPercent scales the resulting video frames. For example, DesktopZoomPercent=100 leaves frames unchanged (100% size), DesktopZoomPercent=50 shrinks its width and height to 50%. Assign values in the range 1..99 to reduce frame size and thus to reduce traffic. It is also possible to assign values larger than 100 to make frames larger, but it makes no sense.

Default value

DesktopMode: rvdmFull

DesktopWindowHandle: 0

DesktopForm: nil

DesktopZoomPercent: 100

See also

DesktopVideoMode methods