110,536
社区成员
发帖
与我相关
我的任务
分享
[DllImport("sdk.dll", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)]
public static extern bool LVP_SDK_CMI_DecodeVideoData(int hDecoder,ref byte[] pFrame, IntPtr pYUV);
[StructLayout(LayoutKind.Explicit,Size = Y_size + U_size + V_size+12)]
public unsafe struct YUV_DESC
{
public const int MAX_WIDTH = 704;
public const int MAX_HEIGHT = 576;
public const int Y_size = (MAX_WIDTH * MAX_HEIGHT);
public const int U_size = (MAX_WIDTH * MAX_HEIGHT / 4);
public const int V_size = U_size;
[FieldOffset(0)]
public int llPts;
[FieldOffset(3)]
public byte Y;
[FieldOffset(Y_size+3)]
public byte U;
[FieldOffset(Y_size+U_size+3)]
public byte V;
[FieldOffset(Y_size+U_size+V_size+3)]
public uint uiWidth;
[FieldOffset(Y_size + U_size + V_size + 7)]
public uint uiHeight;
}
[DllImport("sdk.dll", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)]
public static extern bool LVP_SDK_CMI_DecodeVideoData_Args(int hDecoder,byte[] pFrame,
ref int pllPts,byte[] Y,byte[] U,byte[] V,ref uint puiWidth,ref uint puiHeight);
[DllImport("sdk.dll", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)]
public static extern bool LVP_SDK_CMI_DecodeVideoData_Args(int hDecoder,byte[] pFrame,
ref int pllPts,ref byte[] Y,ref byte[] U,ref byte[] V,ref uint puiWidth,ref uint puiHeight);