示例#1
0
        /// <summary>
        /// Picture clock dispose
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void timerGetPlayInfo_Tick(object sender, EventArgs e)
        {
            if (pPlayVideoSizeMode != 9)
            {
                FRAME_INFO pFrameInfo  = new FRAME_INFO();
                uint       totalFrames = NETPlay.NETPlayControl(PLAY_COMMAND.GetFileTotalFrames, 0, true);
                NETPlay.NETPlayControl(PLAY_COMMAND.GetPictureSize, 0, ref pFrameInfo);
                stlTotalFrames.Text   = Convert.ToString(totalFrames);
                trbPlayFrames.Maximum = (int)(totalFrames > 0?totalFrames:0);
                int pParentHeight;
                int pParentWidth;
                if (palMain.Visible)
                {
                    pParentWidth  = palMain.Width;
                    pParentHeight = palMain.Height;
                }
                else
                {
                    pParentWidth  = this.Width;
                    pParentHeight = this.Height;
                }
                switch (pPlayVideoSizeMode)
                {
                case 0:    //Original size
                    picPlayMain.Width  = pFrameInfo.nWidth;
                    picPlayMain.Height = pFrameInfo.nHeight;
                    picPlayMain.Top    = (pParentHeight - picPlayMain.Height) / 2;
                    picPlayMain.Left   = (pParentWidth - picPlayMain.Width) / 2;
                    break;

                case 1:    //Zoom
                    picPlayMain.Top    = 0;
                    picPlayMain.Height = pParentHeight;
                    picPlayMain.Width  = Convert.ToInt32(pFrameInfo.nWidth * ((float)pParentHeight / (float)pFrameInfo.nHeight));
                    picPlayMain.Left   = (pParentWidth - picPlayMain.Width) / 2;
                    break;
                }
            }
            SetPlayCurrentInfo(NETPlay.NETPlayControl(PLAY_COMMAND.GetCurrentFrameNum, 0, true), NETPlay.NETPlayControl(PLAY_COMMAND.GetPlayedTime, 0, true));
        }
示例#2
0
 /// <summary>
 /// Retrieves frame info.
 /// </summary>
 /// <param name="pFile">The address of the gale object.</param>
 /// <param name="frameIndex">The frame index (which begin from zero).</param>
 /// <param name="info">The Info that must be returned.</param>
 public static int GetFrameInfo(IntPtr pFile, int frameIndex, FRAME_INFO info)
 {
     return(_ggGetFrameInfo(pFile, frameIndex, (int)info));
 }
示例#3
0
 /// <summary>
 /// Play callbace function
 /// </summary>
 /// <param name="nPort"></param>
 /// <param name="pBuf"></param>
 /// <param name="nSize"></param>
 /// <param name="pFrameInfo"></param>
 /// <param name="nReserved1"></param>
 /// <param name="nReserved2"></param>
 private void pDecCBFun(int nPort, ref String pBuf, int nSize, ref FRAME_INFO pFrameInfo, int nReserved1, int nReserved2)
 {
     this.picPlayMain.Height  = pFrameInfo.nHeight;
     this.picPlayMain.Width   = pFrameInfo.nWidth;
     this.stlCurrentTime.Text = pFrameInfo.nStamp.ToString();
 }
示例#4
0
 public int OnDecCallBackFunction(int nPort, IntPtr pBuf, int nSize, ref FRAME_INFO pFrameInfo, IntPtr pUser, int nReserved2)
 {
     return(0);
 }