Ejemplo n.º 1
0
        private void btnPrivate_Click(object sender, EventArgs e)
        {
            int iPort = CHCNetSDK.NET_DVR_GetRealPlayerIndex(m_lRealHandle);

            if (iPort > -1)
            {
                if (!PlayCtrl.PlayM4_RenderPrivateData(iPort, 0x20, true))
                {
                    iLastErr = PlayCtrl.PlayM4_GetLastError(iPort);
                    str      = "PlayM4_RenderPrivateData failed, error code= " + iLastErr;
                    DebugInfo(str);
                }
                if (!PlayCtrl.PlayM4_RenderPrivateDataEx(iPort, 0x00000020, 0x00000001 + 0x00000002 + 0x00000004, true))
                {
                    iLastErr = PlayCtrl.PlayM4_GetLastError(iPort);
                    str      = "PlayM4_RenderPrivateDataEx failed, error code= " + iLastErr;
                    DebugInfo(str);
                }
                if (!PlayCtrl.PlayM4_SetOverlayPriInfoFlag(iPort, 0x20, true))
                {
                    iLastErr = PlayCtrl.PlayM4_GetLastError(iPort);
                    str      = "PlayM4_SetOverlayPriInfoFlag failed, error code= " + iLastErr;
                    DebugInfo(str);
                }
            }
        }