Skip to content

Commit

Permalink
Minor changes to architecture.md and the test project.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoanCharmant committed Feb 27, 2021
1 parent a10ab95 commit 30489aa
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 36 deletions.
1 change: 0 additions & 1 deletion Kinovea.Camera/CameraTypeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
8 changes: 0 additions & 8 deletions Kinovea.Tests/Kinovea.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,6 @@
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
</PropertyGroup>
<ItemGroup>
<Reference Include="AForge, Version=2.2.5.0, Culture=neutral, PublicKeyToken=c1db6ff4eaa06aeb, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Refs\AForge\AForge.dll</HintPath>
</Reference>
<Reference Include="AForge.Imaging, Version=2.2.5.0, Culture=neutral, PublicKeyToken=ba8ddea9676ca48b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Refs\AForge\AForge.Imaging.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
</Reference>
Expand Down
25 changes: 0 additions & 25 deletions Kinovea.Tests/Performance/ImageCopy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.

Expand Down

0 comments on commit 30489aa

Please sign in to comment.