Exemplo n.º 1
0
        /// <summary>
        /// 点播指定任务单元的视频
        /// </summary>
        /// <param name="vodInfo">点播信息</param>
        /// <param name="userData">用户数据</param>
        /// <returns>-1表示失败,其他值表示返回的点播标示值。</returns>
        public Int32 PlayBackByTaskUnit(VodInfo vodInfo, UInt32 userData)
        {
            TVDASDK_TASK_UNIT_VOD_INFO info = new TVDASDK_TASK_UNIT_VOD_INFO();

            info.bIsPlayAllFile    = vodInfo.IsPlayAllFile;
            info.dwEndTime         = ModelParser.ConvertLinuxTime(vodInfo.EndTime);
            info.dwStartTime       = ModelParser.ConvertLinuxTime(vodInfo.StartTime);
            info.dwVideoTaskUnitID = vodInfo.VideoTaskUnitID;
            info.hPlayWnd          = vodInfo.PlayWnd;
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_PlayBackByTaskUnit dwVideoTaskUnitID:{0}"
                                                                                                       + ",hPlayWnd:{1}"
                                                                                                       + ",bIsPlayAllFile:{2}"
                                                                                                       + ",dwStartTime:{3}"
                                                                                                       + ",dwEndTime:{4}"
                                                                                                       , info.dwVideoTaskUnitID
                                                                                                       , info.hPlayWnd
                                                                                                       , info.bIsPlayAllFile
                                                                                                       , info.dwStartTime
                                                                                                       , info.dwEndTime
                                                                                                       ));

            m_TfuncPlayPosCB = TfuncPlayPosCB;

            int retVal = IVXSDKProtocol.VdaSdk_PlayBackByTaskUnit(ref info, m_TfuncPlayPosCB, userData);

            if (-1 == retVal)
            {
                // 调用失败,抛异常
                CheckError();
            }


            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_PlayBackByTaskUnit ret:" + retVal);
            return(retVal);
        }
Exemplo n.º 2
0
 public static extern Int32 VdaSdk_PlayBackByTaskUnit(ref TVDASDK_TASK_UNIT_VOD_INFO ptVodInfoByTaskUnit,
                                                      TfuncPlayPosCB pfuncPlayPos, UInt32 dwUserData);