24.2.3 nuget package of the SDK does not respect instructions to specify the HardwareDecodingMode.
Previously we were using version 2020R2 and updating the HardwareDecodingMode through EnvironmentOptions would reflect immediately in the diagnostics window but this is not the case for the latest version of the SDK.
Our code is still attempting to do this the same way we did for the older version via this sample code snippet:
EnvironmentManager.Instance.EnvironmentOptions[EnvironmentOptions.HardwareDecodingMode] = EnvironmentOptions.OptionHardwareDecodingModeOff;
EnvironmentManager.Instance.FireEnvironmentOptionsChangedEvent();
Is this a current known issue or has been changed at some point between versions?
We are also currently aware that the SDK states the ImageViewerControl is being deprecated in favor of ImageViewerWpfControl but making this switch is not an available option for us to pursue at this moment.
We’ve gone ahead and tested the sample VideoViewer project and confirmed that the Wpf variant of the controls also show the same behavior of not respecting changes to the HardwareDecodingMode setting within EnvironmentOptions.
I was able to observe the same, to reproduce your observation. I will make a case with Milestone Development and will keep you posted here on what we find.
You will before initializing and using ImageViewerWpfControl or ImageViewerControl do something like-
EnvironmentManager.Instance.EnvironmentOptions[EnvironmentOptions.HardwareDecodingMode] = EnvironmentOptions.OptionHardwareDecodingModeOff;
As you have observed and reported this does not work.
At one point Milestone has by mistake removed a ToLower conversion in the check.
There is an easy workaround.
Instead of using - OptionHardwareDecodingModeAuto = “Auto” - use “auto” - (or OptionHardwareDecodingModeAuto.ToLower() )
OptionHardwareDecodingModeOff = “Off” - use “off” instead
Likewise with all the OptionHardwareDecodingModeX - all options are listed here - https://doc.developer.milestonesys.com/html/index.html?base=miphelp/class_video_o_s_1_1_platform_1_1_environment_options.html&tree=tree_search.html?search=optionhardware
Milestone has developed a fix which will in 2025R2. Until then I hope you will use the workaround.