コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        protected MediaServiceCapabilities GetMediaCapabilities()
        {
            Proxies.Onvif.MediaClient client = MediaClient;
            if (client == null)
            {
                return(null);
            }

            GetServiceCapabilitiesResponse capabilities = null;

            try
            {
                RunStep(() => { capabilities = client.GetServiceCapabilities(new GetServiceCapabilities()); }, "Get Media Capabilities");
            }
            catch (Exception exc)
            {
                if (exc is FaultException)
                {
                    LogFault(exc as FaultException);
                }
                RethrowIfStop(exc);
                LogStepEvent(string.Format("GetServiceCapabilities not supported ({0})", exc.Message));
                StepFailed(exc);
            }
            DoRequestDelay();
            return(capabilities == null ? null : capabilities.Capabilities);
        }
コード例 #2
0
        /// <summary>
        /// Retrieves lists of video source configurations compatible with specified profile from DUT
        /// </summary>
        /// <param name="profile">Token of profile</param>
        /// <returns>Array of video source configurations</returns>
        protected VideoSourceConfiguration[] GetCompatibleVideoSourceConfigurations(string profile)
        {
            Proxies.Onvif.MediaClient  client  = MediaClient;
            VideoSourceConfiguration[] configs = null;
            RunStep(() => { configs = client.GetCompatibleVideoSourceConfigurations(profile); },
                    string.Format("Get compatible video sources for profile '{0}'", profile));
            DoRequestDelay();

            return(configs);
        }