Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
charlescao460 committed Mar 28, 2024
1 parent a9be700 commit d06c30e
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -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 [email protected]: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#
Expand Down Expand Up @@ -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 [email protected]:charlescao460/NetLibDirectshowCapture.git
```

0 comments on commit d06c30e

Please sign in to comment.