public void PacketReconstructedCBHandler(int FileID, byte[] filebyte, int bytesRead)
{
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
CodecUtility aCodec = new CodecUtility();
LatestFrame = aCodec.DecompressJPEGArrayToBpm(filebyte);
//Call the callback
if (aNewBitmapReceivedEvent != null)
{
aNewBitmapReceivedEvent(LatestFrame);
}
PacketReconstructors.GetReconstructedPackets().Clear();
stopwatch.Stop();
// Write result
//Console.WriteLine("Time elapsed ms: {0}", stopwatch.ElapsedMilliseconds);
}