By default, the player will scale the video to the application's window size. The aspect ratio will be set at the beginning of the playback (only once). If your stream's video resolution changes on-the-fly, overlay tools (VMTI, measurements, etc) may not work correctly.
To support on-the-fly resolution changes you should do the following:
- Enable DirectX mode (make sure you have the prerequisites installed - see Direct3D rendering)
- Enable Dynamic Resolution monitoring. The Width and Height are the maximal expected video resolution. There is no need to set an exact resolution, but as these numbers define memory allocation you should not set them to be much more than you expect in your stream.
m_KlvPlayer.MaxCapturedVideoResolution = new VideoResolutionWr()
{
Width = 1920,
Height = 1080
};
- Set m_KlvPlayer.VideoPresenter().UseDirectX = true;
- Latest frame's resolution and aspect ratio can be found in OnNotifySyncFrame callback - it will receive the relevant info