Example #1
0
        public static void EPlay(string url, IntPtr a, IntPtr b, IntPtr c, IntPtr d)
        {
            int channelID = PlayerSdk.EasyPlayer_OpenStream(url + 1, a, PlayerSdk.RENDER_FORMAT.DISPLAY_FORMAT_RGB24_GDI, 1, "", "", EPcallBack, IntPtr.Zero, false);

            if (channelID > 0)
            {
                PlayerSdk.EasyPlayer_SetFrameCache(channelID, 3);
                list.Add(channelID);
            }
        }
Example #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            PlayerSdk.EPInit();
            var p1 = panel1.Handle;
            //var p2 = panel2.Handle;
            int channelID = PlayerSdk.EasyPlayer_OpenStream("rtsp://172.16.21.209:554/1", panel1.Handle, PlayerSdk.RENDER_FORMAT.DISPLAY_FORMAT_RGB24_GDI, 1, "admin", "itc123456", PlayerSdk.EPcallBack, IntPtr.Zero, false);

            if (channelID > 0)
            {
                PlayerSdk.EasyPlayer_SetFrameCache(channelID, 3);
            }
        }
Example #3
0
        public static void EStop()
        {
            List <int> _list = new List <int>();

            foreach (int i in list)
            {
                int m = PlayerSdk.EasyPlayer_CloseStream(i);
                if (m == 0)
                {
                    _list.Add(i);
                }
            }

            foreach (int i in _list)
            {
                list.Remove(i);
            }
        }
Example #4
0
 /// <summary>
 /// 初始化
 /// </summary>
 public static void EPInit()
 {
     PlayerSdk.EasyPlayer_Init();
     EPcallBack = new PlayerSdk.MediaSourceCallBack(MediaCallback);
     GC.KeepAlive(EPcallBack);
 }