コード例 #1
0
        /// <summary>
        /// 获取播放绘制的闯入闯出区域信息
        /// </summary>
        /// <param name="vodHandle">播放标示句柄</param>
        /// <returns>绘制的闯入闯出区域信息</returns>
        public List <BreakRegion> GetPlayDrawBreakRegion(Int32 vodHandle)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_GetPlayDrawBreakRegion lVodHandle:" + vodHandle);
            TVDASDK_DRAW_BREAK_REGION ptDrawBreakRegion = new TVDASDK_DRAW_BREAK_REGION();
            bool retVal = IVXSDKProtocol.VdaSdk_GetPlayDrawBreakRegion(vodHandle, out ptDrawBreakRegion);

            if (!retVal)
            {
                // 调用失败,抛异常
                CheckError();
            }
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_GetPlayDrawBreakRegion ret:{0},"
                                                                                                       , retVal));
            List <BreakRegion> ret = new List <BreakRegion>();

            for (int i = 0; i < ptDrawBreakRegion.dwBreakRegionNum; i++)
            {
                TVDASDK_SEARCH_BREAK_REGION region = ptDrawBreakRegion.atBreakRegionList[i];
                BreakRegion newregion = new BreakRegion();
                newregion.RegionPointList = new List <System.Drawing.Point>();
                newregion.RegionType      = region.dwRegionType;
                for (int j = 0; j < region.dwPointNum; j++)
                {
                    newregion.RegionPointList.Add(
                        new System.Drawing.Point((int)region.atRegionPointList[j].dwX, (int)region.atRegionPointList[j].dwY)
                        );
                }
                ret.Add(newregion);
            }
            return(ret);
        }
コード例 #2
0
 public static extern bool VdaSdk_GetPlayDrawBreakRegion(Int32 lVodHandle, out TVDASDK_DRAW_BREAK_REGION ptDrawBreakRegion);