Beispiel #1
0
 public static void ScanLogo(AMTContext ctx, string srcpath, int serviceid, string workfile, string dstpath,
                             int imgx, int imgy, int w, int h, int thy, int numMaxFrames, LogoAnalyzeCallback cb)
 {
     if (ScanLogo(ctx.Ptr, srcpath, serviceid, workfile, dstpath, imgx, imgy, w, h, thy, numMaxFrames, cb) == 0)
     {
         throw new IOException(ctx.GetError());
     }
 }
Beispiel #2
0
 public CPUInfo(AMTContext ctx)
 {
     Ctx = ctx;
     Ptr = CPUInfo_Create();
     if (Ptr == IntPtr.Zero)
     {
         throw new IOException(Ctx.GetError());
     }
 }
Beispiel #3
0
 public TsSlimFilter(AMTContext ctx, int videoPid)
 {
     Ctx = ctx;
     Ptr = TsSlimFilter_Create(Ctx.Ptr, videoPid);
     if (Ptr == IntPtr.Zero)
     {
         throw new IOException(Ctx.GetError());
     }
 }
Beispiel #4
0
 public LogoFile(AMTContext ctx, string filepath)
 {
     Ctx = ctx;
     Ptr = LogoFile_Create(Ctx.Ptr, filepath);
     if (Ptr == IntPtr.Zero)
     {
         throw new IOException(Ctx.GetError());
     }
 }
Beispiel #5
0
 public MediaFile(AMTContext ctx, string filepath, int serviceid)
 {
     Ctx = ctx;
     Ptr = MediaFile_Create(Ctx.Ptr, filepath, serviceid);
     if (Ptr == IntPtr.Zero)
     {
         throw new IOException(Ctx.GetError());
     }
 }
Beispiel #6
0
 public MediaFile(AMTContext ctx, string filepath, int serviceid)
 {
     Ctx = ctx;
     Ptr = MediaFile_Create(Ctx.Ptr, filepath, serviceid);
     if (Ptr == IntPtr.Zero)
     {
         throw new IOException(Ctx.GetError());
     }
     if (MediaFile_DecodeFrame(Ptr, 0, ref frameWidth, ref frameHeight) != 0)
     {
         if (frameWidth != 0 && frameHeight != 0)
         {
             int bufferSize = frameHeight * frameWidth * 3;
             FrameBufferPtr = Marshal.AllocHGlobal(bufferSize);
         }
     }
 }