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
For usage in Unity, You have to specify the absolute path for openh264 dll. (i.e. StreamingAssets)
29
29
```c#
@@ -260,92 +260,3 @@ here you can explore:
260
260
261
261
262
262
263
-
264
-
265
-
266
-
# Legacy C++/CLI(deprecated)
267
-
### C++Cli wrapper is deprecated due to platform limitations and other issues. Plase use native Pinvoke version which is also distrbuted with Nuget.
268
-
Cisco's OpenH264 C++/CLI wrapper with optimised image format conversion support. It is very suitable for realtime streaming over network.
269
-
- Offers managed and unmanaged API.
270
-
- Tested on .NetFramework and NetCore(up to 8).
271
-
- Compatible with OpenCV.(i.e. OpenCVsharp)
272
-
- Tested on WPF application with camera and screen capture (P2P Videocall).
273
-
- No memory leaks or GC pressure with bitmaps.
274
-
- Simple console application example is provided as an example.
275
-
276
-
### Setup(deprecated)
277
-
- 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(64/32 bit).
278
-
- You can setup with a different dll name, constructor is overloaded.
279
-
```c#
280
-
decoder=newH264Sharp.Decoder();
281
-
282
-
encoder=newH264Sharp.Encoder();
283
-
encoder.Initialize(width,
284
-
height,
285
-
bps: 3_000_000,
286
-
fps: 30,
287
-
H264Sharp.Encoder.ConfigType.CameraBasic);
288
-
```
289
-
290
-
### Encode (deprecated)
291
-
- You can encode from rgb/rgba/bgr/bgra/yuv_i420 on as raw data format, or System.Drawing.Bitmaps.
292
-
- Raw data is compatible with OpenCV Mats or any other standard image container.
- You can decode with pointers or with managed byte array as input.
313
-
- You can decode into System.Drawing.Bitmaps or raw data format images (they are compatible with OpenCV Mats and any other standard image containers.).
314
-
```C#
315
-
voidDecode(IntPtrdata, intlength, FrameTypetype)
316
-
{
317
-
if (decoder.Decode(data, length, noDelay:true, outDecodingStatestatusCode, outBitmapbmp))
A separate dll is provided for RGB <-> YUV conversions. Its compiled with clang LLVM with AVX2 intrinsics.
331
-
</br>You can optionally include it on your executable path just like Openh264 dll.
332
-
</br>
333
-
</br>If wrapper cannot find the Converter32/64 dll or if your machine does not support AVX2 it will fall back to use default C++/Cli versions.
334
-
</br>External dll 2x+ faster than C++/Cli versions.
335
-
336
-
## TLDR how to install(deprecated)
337
-
- Go to my releases find latest version.
338
-
- Reference H264Sharp dll on your C# project.
339
-
- 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).
340
-
- Keep the original names if you want to use default constructors.
341
-
- Optionally Add Converter64/32 dlls to your executable directory same way as openh264 dll.
342
-
- Enjoy
343
-
344
-
## Remarks(deprecated)
345
-
- Decode callbacks with raw image formats use cached back buffer, if you wont consume them immediately, make a copy or sync your system.
346
-
- Encoder output "EncodedFrame" uses cached back buffer, if you wont consume them immediately, make a copy or sync your system.
347
-
- .Net Core and .Net Framework releases are provided.
348
-
- 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