以下是我的代码,数据可以获取得到,代码可以成功执行,但是在页面没有视频显示。
请问是什么地方出了问题或者什么地方需要设置,谢谢!
public bool OpenStream()
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;                _scrollPlayTime = 0;                _rFile = new RemoteFileStream(vInfor.VideoServerIp, vInfor.VideoServerPort, vInfor.FileName);
                if (vInfor.IsValid == false)
                {
                    //无效的视频文件
                    return false;
                }
                //设置流播放的模式
                Hik_PlayM4_SetStreamOpenMode(0, Convert.ToUInt32(1));
                //打开流接口
                if (!Hik_PlayM4_OpenStream(0, vInfor.HeadData, (uint)vInfor.HeadFrameLen, 1024 * 100))
                {
                    GuiPanel.ShowInformationMsgBox(this, "文件无法打开");
                    return false;
                }                //设置文件结束时要发送的消息
                Hik_PlayM4_SetFileEndMsg(0, this.Handle, WM_FILE_END);
                //初始化DirecDraw表
                Hik_PlayM4_InitDDraw(panVideo.Handle);
                //播放开始
                _bPlaying = Hik_PlayM4_Play(0, panVideo.Handle);                //定位到视频数据的开始位置
                StartTransferVideoData(VideoInformation.HEAD_LENGTH, vInfor.FrameDataLength);
                scollBar.Maximum = (int)vInfor.TotalTime - 2000; //解决播放器播放2秒内所得到的播放时间都是0秒
                scollBar.Value = 0;
            }
            catch (System.DllNotFoundException)
            {            }            catch (System.OutOfMemoryException)
            {
                GuiPanel.ShowInformationMsgBox(this, "无效的视频文件");
            }
            catch (Exception ex)
            {
                GuiPanel.ShowErrorMsgBox(this, ex.Message);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
            return true;
        }