From b638183be317ca42cfa59390e3749711f56ecf79 Mon Sep 17 00:00:00 2001 From: Speykious Date: Sun, 30 Oct 2022 00:12:14 +0200 Subject: [PATCH 1/2] Bump SeeShark version to 4.0.0 --- SeeShark/SeeShark.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SeeShark/SeeShark.csproj b/SeeShark/SeeShark.csproj index 51e269e..1147a5f 100644 --- a/SeeShark/SeeShark.csproj +++ b/SeeShark/SeeShark.csproj @@ -12,7 +12,7 @@ SeeShark - 3.1.0 + 4.0.0 The Vignette Authors FFmpeg;Camera;Webcam;Stream; SeeShark From d70f857d63dd2916736d67c1745c656e2e954aba Mon Sep 17 00:00:00 2001 From: Speykious Date: Sun, 30 Oct 2022 00:24:48 +0200 Subject: [PATCH 2/2] Update Readme --- Readme.md | 59 +++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/Readme.md b/Readme.md index 96a2670..9f8cbc7 100644 --- a/Readme.md +++ b/Readme.md @@ -38,45 +38,44 @@ using System.Threading; using SeeShark; using SeeShark.FFmpeg; -namespace YourProgram +namespace YourProgram; + +// This program will display camera frames info for 10 seconds. +class Program { - // This program will display camera frames info for 10 seconds. - class Program + static void Main(string[] args) { - static void Main(string[] args) - { - // Create a CameraManager to manage camera devices - using var manager = new CameraManager(); + // Create a CameraManager to manage camera devices + using var manager = new CameraManager(); - // Get the first camera available - using var camera = manager.GetCamera(0); + // Get the first camera available + using var camera = manager.GetCamera(0); - // Attach your callback to the camera's frame event handler - camera.OnFrame += FrameEventHandler; + // Attach your callback to the camera's frame event handler + camera.OnFrame += frameEventHandler; - // Start decoding frames asynchronously - camera.StartCapture(); + // Start decoding frames asynchronously + camera.StartCapture(); - // Just wait a bit - Thread.Sleep(TimeSpan.FromSeconds(10)); + // Just wait a bit + Thread.Sleep(TimeSpan.FromSeconds(10)); - // Stop decoding frames - camera.StopCapture(); - } + // Stop decoding frames + camera.StopCapture(); + } - // Create a callback for decoded camera frames - public static void FrameEventHandler(object? _sender, FrameEventArgs e) - { - // Only care about new frames - if (e.Status != DecodeStatus.NewFrame) - return; + // Create a callback for decoded camera frames + private static void frameEventHandler(object? _sender, FrameEventArgs e) + { + // Only care about new frames + if (e.Status != DecodeStatus.NewFrame) + return; - Frame frame = e.Frame; + Frame frame = e.Frame; - // Get information and raw data from a frame - Console.WriteLine($"New frame ({frame.Width}x{frame.Height} | {frame.PixelFormat})"); - Console.WriteLine($"Length of raw data: {frame.RawData.Length} bytes"); - } + // Get information and raw data from a frame + Console.WriteLine($"New frame ({frame.Width}x{frame.Height} | {frame.PixelFormat})"); + Console.WriteLine($"Length of raw data: {frame.RawData.Length} bytes"); } } ``` @@ -96,7 +95,7 @@ You can request a feature or fix a bug by reporting an issue. If you feel like fixing a bug or implementing a feature, you can fork this repository and make a pull request at any time! You can also join our discord server where we talk about our different projects. -We have a dedicated **#seeshark** channel for this one. +We have a dedicated **#tracking** channel where we talk about SeeShark, MediaPipe.NET and other related repositories. ## License