You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cisco's OpenH264 C++/CLI wrapper in C# with optimised image format conversions. It is very suitable for realtime streaming.
3
-
- Offers managed and unmanaged API.
4
-
- Tested on .NetFramework and Net6.
2
+
Cisco's OpenH264 C++/CLI wrapper in C# with optimised image format conversions. It is very suitable for realtime streaming over network.
3
+
- Offers managed and unmanaged intuitive API.
4
+
- Tested on .NetFramework and NetCore(upto 7).
5
5
- Compatible with OpenCV.(i.e. OpenCVsharp)
6
6
- Tested on WPF application with camera and screen capture (P2P Videocall).
7
+
- No memory leaks or GC pressure with bitmaps.
7
8
- Simple console application example is provided on repo as an example.
8
9
9
10
### Setup
11
+
- Default Constructor will look for `openh264-2.3.1-win32.dll` or `openh264-2.3.1-win64.dll` automatically on executable directory depending on process type.
12
+
- You can setup with a different dll name, constructor is overloaded.
- You can decode with pointers or managed byte array as input.
40
+
- You can decode into System.Drawing.Bitmaps or raw data format images (they are compatible with OpenCV Mats and any other standard image containers.).
37
41
```C#
38
42
voidDecode(IntPtrdata, intlength, FrameTypetype)
39
43
{
@@ -46,23 +50,26 @@ Cisco's OpenH264 C++/CLI wrapper in C# with optimised image format conversions.
46
50
}
47
51
}
48
52
```
49
-
- You can decode with pointers or managed byte array as input.
50
-
- You can decode into System.Drawing.Bitmaps or raw data format images (they are compatible with OpenCV Mats).
53
+
51
54
# Converter dll
52
55
A separate dll is provided for RGB <-> YUV conversions. Its compiled with clang LLVM and has AVX2 intrinsics.
53
56
</br>You can optionally include it on your executable path just like Openh264 dll.
54
57
</br>
55
-
</br>If wrapper could not find the Converter32/64 dll it will fall back to use C++Cli versions.
56
-
</br>External dll 2x+ faster than C++Cli convertors.
58
+
</br>If wrapper cannot find the Converter32/64 dll it will fall back to use C++/Cli versions.
59
+
</br>External dll 2x+ faster than C++/Cli versions.
57
60
58
61
# TLDR how to install
59
62
- Go to my releases find lates version.
60
-
- Reference/Include H264Sharp dll on your project.
61
-
- Add `openh264-2.3.1-win32.dll` or `openh264-2.3.1-win64.dll` or both to your executable directory. (keep the original names if you want to use default constructor)
62
-
- Optionally Add Converter64/32 dlls to your executable directory.
63
+
- Reference H264Sharp dll on your project.
64
+
- Add `openh264-2.3.1-win32.dll` or `openh264-2.3.1-win64.dll` or both to your executable directory(Or include on your project and ckeck copy to output-> copy if newer).
65
+
- Keep the original names if you want to use default constructors.
66
+
- Optionally Add Converter64/32 dlls to your executable directory same way as openh264 dll.
67
+
- Enjoy
63
68
# Remarks
64
-
.Net Core and .Net Framework releases are provided.
65
-
Use at least 2.3.1 version of openh264.(cisco has updated some data types, older versions might lead to stack buffer overflow).
69
+
- Decode callbacks with raw image formats use cached backed buffer, if you wont consume them immediately, make a copy or sync your system.
70
+
- Encoder output "EncodedFrame" uses cached back buffer if you wont consume them immediately, make a copy or sync your system.
71
+
- .Net Core and .Net Framework releases are provided.
72
+
- Use at least 2.3.1 version of openh264.(cisco has updated some data types, older versions might lead to stack buffer overflow).
0 commit comments