Skip to content

Commit faa9d8b

Browse files
authored
Merge pull request #40 from vignetteapp/seeshark-v4
Bump version to 4.0.0
2 parents 469bd5a + d70f857 commit faa9d8b

File tree

2 files changed

+30
-31
lines changed

2 files changed

+30
-31
lines changed

Readme.md

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -38,45 +38,44 @@ using System.Threading;
3838
using SeeShark;
3939
using SeeShark.FFmpeg;
4040

41-
namespace YourProgram
41+
namespace YourProgram;
42+
43+
// This program will display camera frames info for 10 seconds.
44+
class Program
4245
{
43-
// This program will display camera frames info for 10 seconds.
44-
class Program
46+
static void Main(string[] args)
4547
{
46-
static void Main(string[] args)
47-
{
48-
// Create a CameraManager to manage camera devices
49-
using var manager = new CameraManager();
48+
// Create a CameraManager to manage camera devices
49+
using var manager = new CameraManager();
5050

51-
// Get the first camera available
52-
using var camera = manager.GetCamera(0);
51+
// Get the first camera available
52+
using var camera = manager.GetCamera(0);
5353

54-
// Attach your callback to the camera's frame event handler
55-
camera.OnFrame += FrameEventHandler;
54+
// Attach your callback to the camera's frame event handler
55+
camera.OnFrame += frameEventHandler;
5656

57-
// Start decoding frames asynchronously
58-
camera.StartCapture();
57+
// Start decoding frames asynchronously
58+
camera.StartCapture();
5959

60-
// Just wait a bit
61-
Thread.Sleep(TimeSpan.FromSeconds(10));
60+
// Just wait a bit
61+
Thread.Sleep(TimeSpan.FromSeconds(10));
6262

63-
// Stop decoding frames
64-
camera.StopCapture();
65-
}
63+
// Stop decoding frames
64+
camera.StopCapture();
65+
}
6666

67-
// Create a callback for decoded camera frames
68-
public static void FrameEventHandler(object? _sender, FrameEventArgs e)
69-
{
70-
// Only care about new frames
71-
if (e.Status != DecodeStatus.NewFrame)
72-
return;
67+
// Create a callback for decoded camera frames
68+
private static void frameEventHandler(object? _sender, FrameEventArgs e)
69+
{
70+
// Only care about new frames
71+
if (e.Status != DecodeStatus.NewFrame)
72+
return;
7373

74-
Frame frame = e.Frame;
74+
Frame frame = e.Frame;
7575

76-
// Get information and raw data from a frame
77-
Console.WriteLine($"New frame ({frame.Width}x{frame.Height} | {frame.PixelFormat})");
78-
Console.WriteLine($"Length of raw data: {frame.RawData.Length} bytes");
79-
}
76+
// Get information and raw data from a frame
77+
Console.WriteLine($"New frame ({frame.Width}x{frame.Height} | {frame.PixelFormat})");
78+
Console.WriteLine($"Length of raw data: {frame.RawData.Length} bytes");
8079
}
8180
}
8281
```
@@ -96,7 +95,7 @@ You can request a feature or fix a bug by reporting an issue.
9695
If you feel like fixing a bug or implementing a feature, you can fork this repository and make a pull request at any time!
9796

9897
You can also join our discord server where we talk about our different projects.
99-
We have a dedicated **#seeshark** channel for this one.
98+
We have a dedicated **#tracking** channel where we talk about SeeShark, MediaPipe.NET and other related repositories.
10099

101100
## License
102101

SeeShark/SeeShark.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<PropertyGroup Label="Nuget">
1414
<PackageId>SeeShark</PackageId>
15-
<Version>3.1.0</Version>
15+
<Version>4.0.0</Version>
1616
<Authors>The Vignette Authors</Authors>
1717
<PackageTags>FFmpeg;Camera;Webcam;Stream;</PackageTags>
1818
<Title>SeeShark</Title>

0 commit comments

Comments
 (0)