-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9be700
commit d06c30e
Showing
1 changed file
with
14 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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# | ||
|
@@ -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 | ||
``` |