From 30489aa71e0713fc1d8a53d21da23964eb091052 Mon Sep 17 00:00:00 2001 From: Joan Charmant Date: Sat, 27 Feb 2021 19:15:58 +0100 Subject: [PATCH] Minor changes to architecture.md and the test project. --- Kinovea.Camera/CameraTypeManager.cs | 1 - Kinovea.Tests/Kinovea.Tests.csproj | 8 -------- Kinovea.Tests/Performance/ImageCopy.cs | 25 ------------------------- architecture.md | 4 ++-- 4 files changed, 2 insertions(+), 36 deletions(-) diff --git a/Kinovea.Camera/CameraTypeManager.cs b/Kinovea.Camera/CameraTypeManager.cs index 976b91c16..69f806af6 100644 --- a/Kinovea.Camera/CameraTypeManager.cs +++ b/Kinovea.Camera/CameraTypeManager.cs @@ -26,7 +26,6 @@ You should have received a copy of the GNU General Public License using System.Windows.Forms; using System.Linq; using Kinovea.Services; -using System.Diagnostics; namespace Kinovea.Camera { diff --git a/Kinovea.Tests/Kinovea.Tests.csproj b/Kinovea.Tests/Kinovea.Tests.csproj index d35f4afdd..caf5d1fdf 100644 --- a/Kinovea.Tests/Kinovea.Tests.csproj +++ b/Kinovea.Tests/Kinovea.Tests.csproj @@ -89,14 +89,6 @@ false - - False - ..\Refs\AForge\AForge.dll - - - False - ..\Refs\AForge\AForge.Imaging.dll - ..\packages\log4net.2.0.8\lib\net45-full\log4net.dll diff --git a/Kinovea.Tests/Performance/ImageCopy.cs b/Kinovea.Tests/Performance/ImageCopy.cs index 2f91e1e1e..3583655d8 100644 --- a/Kinovea.Tests/Performance/ImageCopy.cs +++ b/Kinovea.Tests/Performance/ImageCopy.cs @@ -76,24 +76,6 @@ private static void TestCopy1(int loops, Bitmap bmp1, Bitmap bmp2, Rectangle rec Console.WriteLine("Buffer length: {0:0.00} MB. Average copy time ({1} loops): {2:0.000} ms.", length, loops, averageMilliseconds); } - private static void TestCopy2(int loops, Bitmap bmp1, Bitmap bmp2, Rectangle rect, float length) - { - // Allocation and cloning. - - Stopwatch sw = Stopwatch.StartNew(); - for (int i = 0; i < loops; i++) - { - if (i % 2 == 0) - CopyBitmap2(bmp1); - else - CopyBitmap2(bmp2); - } - - double elapsed = (double)sw.ElapsedTicks / Stopwatch.Frequency; - double averageMilliseconds = (elapsed * 1000) / loops; - Console.WriteLine("Buffer length: {0:0.00} MB. Average copy time ({1} loops): {2:0.000} ms.", length, loops, averageMilliseconds); - } - private static void TestCopy3(int loops, byte[] b1, byte[] b2, float length) { // Managed buffer copy. @@ -211,13 +193,6 @@ private static void CopyBitmap1(Bitmap a, Bitmap b, Rectangle rect) b.UnlockBits(dstData); a.UnlockBits(srcData); } - - private static void CopyBitmap2(Bitmap a) - { - // There is an additional allocation overhead for this test. - // Not really comparable to the others. - Bitmap b = AForge.Imaging.Image.Clone(a, a.PixelFormat); - } private static void CopyBuffer(byte[] b1, byte[] b2) { diff --git a/architecture.md b/architecture.md index 414303a43..ef18553dd 100644 --- a/architecture.md +++ b/architecture.md @@ -45,7 +45,7 @@ This project also contains the low level producer/consumer video playback pipeli **Kinovea.Camera** This project contains a "plugin" manager that loads camera managers. It routes requests for camera discovery and camera loading to the appropriate plugin. -The actual camera managers are implemented in the various projects named Kinovea.Camera.Basler, Kinovea.Camera.Daheng, Kinovea.Camera.DirectShow, etc. +The actual camera managers are implemented in the various projects named Kinovea.Camera.DirectShow, Kinovea.Camera.HTTP, etc. This project also contains shared types used by camera managers like interfaces/abstract classes implemented by plugins, types and events used during the capture process and resource strings and images for configuration dialogs. @@ -62,7 +62,7 @@ For example the types used in the preferences, the keyboard shortcuts support cl **Kinovea.Video.FFMpeg** -This is a special video module since it also handles *saving* files. Thus unlike all the other video reader plugins it is directly referenced by the video exporting code and the capture code. +This is a special video module since it also handles *saving* files. Thus unlike all the other video reader plugins it is directly referenced by the video exporting code and the capture code in Kinovea.ScreenManager. This assembly is written in C++/CLI as it interfaces tightly with FFMpeg.