/// <summary>
        /// 回放控制
        /// </summary>
        /// <param name="iState">控制類別
        /// 0: pause stream
        /// 1: play stream
        /// </param>
        /// <param name="iSpeed">撥放速度
        /// 1 : play speed at 1X
        /// 2,4,8,16 : play fast forward (2,4,8,16)
        /// -1,-2,-4,-8,-16 : play backward (-1,-2,-4,-8,-16)
        /// </param>
        /// <returns></returns>
        public int Device_PlayBackControl(int iState, int iSpeed)
        {
            int rtnVal = 0;

            try
            {
                apv.set_playback_cmd(iState, iSpeed);
            }
            catch (Exception ex)
            {
                _ErrDesc = ex.Message;
            }

            return(rtnVal);
        }
        private int _PlayBackByTime(int iCH, int iAudio, string sStartTime, int is_utc)
        {
            int rtnVal = 0;

            try
            {
                Device_Logout();
                channel = iCH;

                apv = new VideoMediaElementCore.MediaElementCore(iCH + 1, 1);
                wpfmain.Children.Add(apv);
                wpfmain.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(wpfmain_MouseLeftButtonUp);
                apv.set_size(elementHost1.Width, elementHost1.Height);
                //apv.set_aes_key("1234567890123456");
                if (is_utc == 0)
                {
                    apv.set_source_l(1, IP, PORT, iCH, (byte)iAudio, ConvertToTimestamp(DateTime.Parse(sStartTime)));
                }
                else
                {
                    apv.set_source_l(1, IP, PORT, iCH, (byte)iAudio, ConvertToTimestamp(DateTime.Parse(sStartTime)));
                }
                //apv.set_playback_cmd(1, 1); //2014/07/21_CTS
                apv.set_print_msg(1);

                apv.play();
                System.Threading.Thread.Sleep(1000);
                apv.set_playback_cmd(1, 1);

                rtnVal = 1;
            }
            catch (Exception ex)
            {
                _ErrDesc = ex.Message;
            }

            return(rtnVal);
        }