Example #1
0
File: API.cs Project: xlgwr/move
        //by xlg
        public static int Avdec_SetCurrentTime(IntPtr p, UInt32 com, double fCurrentTime)
        {
            tmPlayControlCfg_t cfg = new tmPlayControlCfg_t();

            cfg.dwSize = (UInt32)Marshal.SizeOf(cfg);
            cfg.dwCommand = 6;
            cfg.dwCurrentTime = 120*1000;// (uint)fCurrentTime;

            //IntPtr p5cfg = Marshal.AllocHGlobal(Marshal.SizeOf(cfg));
            //Marshal.StructureToPtr(cfg, p5cfg, true);

            return TMCC_ControlFile(p, ref cfg);
        }
Example #2
0
File: API.cs Project: xlgwr/move
        public static int Avdec_PlayToDo(IntPtr p, UInt32 com, int iSpeed)
        {
            try
            {
                tmPlayControlCfg_t cfg = new tmPlayControlCfg_t();

                cfg.dwSize = (UInt32)Marshal.SizeOf(cfg);
                cfg.dwCommand = com;
                cfg.iSpeed = iSpeed;

                IntPtr p5cfg = Marshal.AllocHGlobal(Marshal.SizeOf(cfg));
                Marshal.StructureToPtr(cfg, p5cfg, true);

                return TMCC_ControlFile(p, p5cfg);
            }
            catch (Exception ex)
            {

                System.Windows.Forms.MessageBox.Show(ex.Message);
                return -1;
            }
        }
Example #3
0
File: API.cs Project: xlgwr/move
 public static extern int TMCC_ControlFile(IntPtr ptr, ref tmPlayControlCfg_t playCtl);
Example #4
0
File: API.cs Project: xlgwr/move
        public static int Avdec_SetCurrentTime(IntPtr p, UInt32 com, UInt32 fCurrentTime)
        {
            tmPlayControlCfg_t cfg = new tmPlayControlCfg_t();

            cfg.dwSize = (UInt32)Marshal.SizeOf(cfg);
            cfg.dwCommand = com;
            cfg.dwCurrentTime = fCurrentTime;

            IntPtr p5cfg = Marshal.AllocHGlobal(Marshal.SizeOf(cfg));
            Marshal.StructureToPtr(cfg, p5cfg, true);

            return TMCC_ControlFile(p, p5cfg);
        }