Decoder.Interop64.cs 1.1 KB

123456789101112131415161718192021222324
  1. using System;
  2. using System.Runtime.InteropServices;
  3. namespace MediaUtil
  4. {
  5. public partial class Decoder
  6. {
  7. private static class Interop64
  8. {
  9. [DllImport("x64\\MediaUtil.x64.dll", EntryPoint = "CreateDecoder", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
  10. public static extern int CreateDecoder(out IntPtr hDecoder, int width, int height, FrameDecodedCallback freameDecodedCallback);
  11. [DllImport("x64\\MediaUtil.x64.dll", EntryPoint = "DestroyDecoder", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
  12. public static extern void DestroyDecoder(IntPtr hDecoder);
  13. [DllImport("x64\\MediaUtil.x64.dll", EntryPoint = "AddPacket", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
  14. public static extern int AddPacket(IntPtr hDecoder, IntPtr hPacket);
  15. [DllImport("x64\\MediaUtil.x64.dll", EntryPoint = "FlushDecoder", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
  16. public static extern int FlushDecoder(IntPtr hDecoder);
  17. }
  18. }
  19. }