Try fix warnings
MODIFY
WalletWasabi.Fluent/Models/Windows/DirectShow.cs
WalletWasabi.Fluent/Models/Windows/DirectShow.cs
@@ -271,7 +271,7 @@ public static class DirectShow
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IFilterGraph
{
- int AddFilter([In] IBaseFilter pFilter, [In, MarshalAs(UnmanagedType.LPWStr)] string pName);
+ int AddFilter([In] IBaseFilter? pFilter, [In, MarshalAs(UnmanagedType.LPWStr)] string pName);
int RemoveFilter([In] IBaseFilter pFilter);

MODIFY
WalletWasabi.Fluent/Models/Windows/WindowsCapture.cs
WalletWasabi.Fluent/Models/Windows/WindowsCapture.cs
@@ -68,19 +68,17 @@ public class WindowsCapture
var renderer = CoCreateInstance(DsGuid.CLSID_NullRenderer) as IBaseFilter;
graph.AddFilter(renderer, "NullRenderer");
- var builder =
+ ICaptureGraphBuilder2? builder =
CoCreateInstance(DsGuid.CLSID_CaptureGraphBuilder2) as
ICaptureGraphBuilder2;
- builder.SetFiltergraph(graph);
+ builder?.SetFiltergraph(graph);
var pinCategory = DsGuid.PIN_CATEGORY_CAPTURE;
var mediaType = DsGuid.MEDIATYPE_Video;
- builder.RenderStream(ref pinCategory, ref mediaType, vcap_source, grabber, renderer);
+ builder?.RenderStream(ref pinCategory, ref mediaType, vcap_source, grabber, renderer);
var mt = new AM_MEDIA_TYPE();
i_grabber.GetConnectedMediaType(mt);
- var header =
- (VIDEOINFOHEADER)Marshal.PtrToStructure(mt.pbFormat,
- typeof(VIDEOINFOHEADER));
+ VIDEOINFOHEADER header = (VIDEOINFOHEADER)Marshal.PtrToStructure(mt.pbFormat, typeof(VIDEOINFOHEADER));
var width = header.bmiHeader.biWidth;
var height = header.bmiHeader.biHeight;
var stride = width * (header.bmiHeader.biBitCount / 8);

Try fix warnings