Skip to content

Commit 7861809

Browse files
committed
Reference FastAndroidCamera nuget instead of maintaining own copy. Add a FastJavaArrayEx.BlockCopyTo method to compensate for missing funtionality.
1 parent 7c7f88a commit 7861809

10 files changed

Lines changed: 77 additions & 519 deletions

Source/ZXing.Net.Mobile.Android/CameraExtensions.cs

Lines changed: 0 additions & 130 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Runtime.InteropServices;
3+
using ApxLabs.FastAndroidCamera;
4+
5+
namespace ZXing.Mobile
6+
{
7+
public static class FastJavaArrayEx
8+
{
9+
public static void BlockCopyTo(this FastJavaByteArray self, int sourceIndex, byte[] array, int arrayIndex, int length)
10+
{
11+
unsafe
12+
{
13+
Marshal.Copy(new IntPtr(self.Raw + sourceIndex), array, arrayIndex, Math.Min(length, Math.Min(self.Count, array.Length - arrayIndex)));
14+
}
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)