/// <summary>
 /// Deserializes the JSON object to a new instance of this class.
 /// </summary>
 /// <param name="httpClient">the HTTP client</param>
 /// <param name="model">the JSON object</param>
 /// <returns>a new instance</returns>
 public new static VideoModel Deserialize(IClarifaiHttpClient httpClient, dynamic model)
 {
     return(new VideoModel(
                httpClient,
                (string)model.id,
                name: (string)model.name,
                createdAt: (DateTime)model.created_at,
                appID: (string)model.app_id,
                outputInfo: VideoOutputInfo.Deserialize(model.output_info),
                modelVersion: Models.ModelVersion.Deserialize(model.model_version)));
 }
        public int StartVideoPreview(DigtiMatrix.Entity.VideoOutputInfo oVideoOutputInfo)
        {
            int iRtn = -1;
            try
            {

                _VideoOutputInfo = oVideoOutputInfo;
                ChannelHandle = HKDS4000.ChannelOpen(_VideoOutputInfo.OutputPort);
                //设置编码帧结构、帧率ITPUB个人空间 q Z4y3v/Y
                HKDS4000.SetIBPMode(ChannelHandle, 100, 2, 1, 25);
                //设置编码图像质量ITPUB个人空间!`mW a\5u
                HKDS4000.SetDefaultQuant(ChannelHandle, 15, 15, 20);
                Rectangle rect = _VideoOutputInfo.VideoPlayPanel.ClientRectangle;
                iRtn = HKDS4000.StartVideoPreview(ChannelHandle, _VideoOutputInfo.VideoPlayPanel.Handle, ref rect, false, (int)TypeVideoFormat.vdfRGB16, 25);
                return iRtn;
            }
            catch (Exception ex)
            {
                return -1;
            }
        }
Beispiel #3
0
        public int StartVideoPreview(DigtiMatrix.Entity.VideoOutputInfo oVideoOutputInfo)
        {
            int iRtn = -1;

            try
            {
                _VideoOutputInfo = oVideoOutputInfo;
                ChannelHandle    = HKDS4000.ChannelOpen(_VideoOutputInfo.OutputPort);
                //设置编码帧结构、帧率ITPUB个人空间 q Z4y3v/Y
                HKDS4000.SetIBPMode(ChannelHandle, 100, 2, 1, 25);
                //设置编码图像质量ITPUB个人空间!`mW a\5u
                HKDS4000.SetDefaultQuant(ChannelHandle, 15, 15, 20);
                Rectangle rect = _VideoOutputInfo.VideoPlayPanel.ClientRectangle;
                iRtn = HKDS4000.StartVideoPreview(ChannelHandle, _VideoOutputInfo.VideoPlayPanel.Handle, ref rect, false, (int)TypeVideoFormat.vdfRGB16, 25);
                return(iRtn);
            }
            catch (Exception ex)
            {
                return(-1);
            }
        }
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="httpClient">the HTTP client</param>
 /// <param name="modelID">the model ID</param>
 /// <param name="name">the model name</param>
 /// <param name="createdAt">date & time of model creation</param>
 /// <param name="appID">the application ID</param>
 /// <param name="modelVersion">the model version</param>
 /// <param name="outputInfo">the output info</param>
 public VideoModel(IClarifaiHttpClient httpClient, string modelID, string name = null,
                   DateTime?createdAt         = null, string appID = null, ModelVersion modelVersion = null,
                   VideoOutputInfo outputInfo = null)
     : base(httpClient, modelID, name, createdAt, appID, modelVersion, outputInfo)
 {
 }