extern static Error _EndRead(ref InStreamData stream);
unsafe extern static Error _BeginRead (ref InStreamData stream, out ChannelArea *areas, ref int frameCount);