Skip to content

Commit d1ae50d

Browse files
committed
Merge branch 'feature/124' into develop
2 parents 95bcc82 + ef5462e commit d1ae50d

File tree

3 files changed

+244
-216
lines changed

3 files changed

+244
-216
lines changed

FlashCap.Core/Devices/DirectShowDevice.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,20 @@ protected override Task OnInitializeAsync(
9696

9797
return this.workingContext!.InvokeAsync(() =>
9898
{
99-
if (NativeMethods_DirectShow.EnumerateDeviceMoniker(
100-
NativeMethods_DirectShow.CLSID_VideoInputDeviceCategory).
101-
Where(moniker =>
102-
moniker.GetPropertyBag() is { } pb &&
103-
pb.SafeReleaseBlock(pb =>
104-
pb.GetValue("DevicePath", default(string))?.Trim() is { } dp &&
105-
dp.Equals(devicePath))).
106-
Collect(moniker =>
107-
moniker.BindToObject(null, null, in NativeMethods_DirectShow.IID_IBaseFilter, out var captureSource) == 0 ?
108-
captureSource as NativeMethods_DirectShow.IBaseFilter : null).
109-
FirstOrDefault() is { } captureSource)
110-
{
111-
try
99+
if (NativeMethods_DirectShow.EnumerateDeviceMoniker(
100+
NativeMethods_DirectShow.CLSID_VideoInputDeviceCategory).
101+
Where(moniker =>
102+
moniker.GetPropertyBag() is { } pb &&
103+
pb.SafeReleaseBlock(pb =>
104+
pb.GetValue("DevicePath", default(string))?.Trim() is { } dp &&
105+
dp.Equals(devicePath))).
106+
Collect(moniker =>
107+
moniker.BindToObject(null, null, in NativeMethods_DirectShow.IID_IBaseFilter, out var captureSource) == 0 ?
108+
captureSource as NativeMethods_DirectShow.IBaseFilter : null).
109+
FirstOrDefault() is { } captureSource)
112110
{
111+
try
112+
{
113113
if (captureSource.EnumeratePins().
114114
Collect(pin =>
115115
pin.GetPinInfo() is { } pinInfo &&

0 commit comments

Comments
 (0)