diff --git a/README.md b/README.md index f1a1224..f64bc90 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # NetLibDirectshowCapture -A .NET Wrapper of [libdshowcapture](https://github.com/obsproject/libdshowcapture) using .NET 8.0 C++/CLI +[![Build](https://github.com/charlescao460/NetLibDirectshowCapture/actions/workflows/msbuild.yml/badge.svg)](https://github.com/charlescao460/NetLibDirectshowCapture/actions/workflows/msbuild.yml) +[![NuGet](https://img.shields.io/nuget/v/NetLibDirectshowCapture +)](https://www.nuget.org/packages/NetLibDirectshowCapture) -This is a direct wrapper, so almost all behaviors should be consistent with [libdshowcapture](https://github.com/obsproject/libdshowcapture). +A .NET Wrapper of [libdshowcapture](https://github.com/obsproject/libdshowcapture) using .NET 8.0 C++/CLI -# Git Submodules -Since this repo contains [libdshowcapture](https://github.com/obsproject/libdshowcapture) as its submodule, please use `--recurse-submodules` flag when cloning. +This is a direct wrapper, so almost all behaviors should be consistent with [libdshowcapture](https://github.com/obsproject/libdshowcapture). And it should be compatible with all the devices that [OBS Studio](https://obsproject.com/) supports. -```bash -git clone --recurse-submodules git@github.com:charlescao460/NetLibDirectshowCapture.git -``` +# Performance +This library is written in C++/CLI (aka. C++ Interop), which has better performance according to [Microsoft](https://learn.microsoft.com/en-us/cpp/dotnet/performance-considerations-for-interop-cpp). All the marshaling details are manually controlled for optimized performance and latency. The callback exposed the native pointer directly, which eliminate all of the unnecessary copies. It should has lower latency compared to other camera library using explicit P/Invoke. # Usage Example ```C# @@ -46,3 +46,10 @@ device.VideoConfiguration = videoConfig; device.ConnectFilters(); device.Start(); ``` + +# Git Submodules +Since this repo contains [libdshowcapture](https://github.com/obsproject/libdshowcapture) as its submodule, please use `--recurse-submodules` flag when cloning. + +```bash +git clone --recurse-submodules git@github.com:charlescao460/NetLibDirectshowCapture.git +``` \ No newline at end of file