sipsorcery-org / SIPSorceryMedia.Windows

BSD 3-Clause "New" or "Revised" License
10 stars 22 forks source link

windows platform It's too demanding #9

Closed a44281071 closed 10 months ago

a44281071 commented 2 years ago

Any way to run it with Win7/Win8/Win8.1? Other packages can use witth netstandard but this can not.

<TargetFramework>net6.0-windows10.0.22000</TargetFramework>

Shall we use NAudio for audio? or MediaFoundatiion for both video/video?

sipsorcery commented 2 years ago

Yep, that's the reason the logic in this repo was moved out of the main library, it's Windows version specific. Microsoft has always had zero interest in exposing audio/video hooks to .NET (Framework, Standard, Core) so we're left with project like this that try and cobble something together. It's incredibly frustrating as the underlying Windows APIs are there.

Shall we use NAudio for audio? or MediaFoundatiion for both video/video?

NAudio is awesome and will almost certainly be able to deal with any Windows audio requirements. Webcam access and/or video encoding is trickier. Media Foundation has the capabilties but as alluded to above they are not easily exposed to .NET. This library is one attempt to access the Media Foundation video device APIs with .NET6 & the Windows 10+ runtime.

There are .NET Framework libraries around that provide .NET wrappers for PInvoke calls to DirectShow and Windows video devices. I doubt those libraries were ever updated for .NET Core. If you need to support Win7/8 then you may have to port one of these .NET Framework libraries to .NET6 and rely on the PInvoke and DirectShow.

Hanning-Liu commented 11 months ago

How to run this repo in win11? I'm new to here and can't find the proper way to open the SIPSorcery sample "GetStarted". Thanks!

Hanning-Liu commented 11 months ago

How to run this repo in win11? I'm new to here and can't find the proper way to open the SIPSorcery sample "GetStarted". Thanks!

sipsorcery commented 10 months ago

The samples should work on Win11 if you have the correct version fo dotnet installed.

I've just updated a number of the samples to target net8.0-windows10.0.17763.0 and they work fine on my Win11 machine.