Ejemplo n.º 1
0
 public override OSDConfigurationOptions GetOSDOptions(string ConfigurationToken)
 {
     if (ONVIFMedia2Configuration.VideoSourceConfigurationList.Any(C => C.token == ConfigurationToken))
     {
         return((ONVIFMedia2Configuration.OSDOptionsList.Find(C => C.VideoSourceConfigurationToken1 == ConfigurationToken)).OSDConfigurationOptions);
     }
     else
     {
         throw ONVIFFault.GetMedia2Exception_InvalidArgVal_NoConfig(ConfigurationToken);
     }
 }
Ejemplo n.º 2
0
 public override void DeleteOSD(string OSDToken)
 {
     if (ONVIFMedia2Configuration.OSDConfigurationList.Any(C => C.token == OSDToken))
     {
         ONVIFMedia2Configuration.OSDConfigurationList.RemoveAll(C => C.token == OSDToken);
     }
     else
     {
         throw ONVIFFault.GetMedia2Exception_InvalidArgVal_NoConfig(OSDToken);
     }
 }
Ejemplo n.º 3
0
        public override OSDConfiguration[] GetOSDs(string OSDToken, string ConfigurationToken)
        {
            if ((OSDToken == null) && (ConfigurationToken == null))
            {
                return(ONVIFMedia2Configuration.OSDConfigurationList.ToArray());
            }

            if ((OSDToken != null) && (ConfigurationToken != null))
            {
                throw ONVIFFault.GetGeneralException_InvalidArgVal("Both OSDToken and ConfigurationToken are not allowed.");
            }

            if ((OSDToken != null) && (ConfigurationToken == null))
            {
                if (ONVIFMedia2Configuration.OSDConfigurationList.Any(C => C.token == OSDToken))
                {
                    return((ONVIFMedia2Configuration.OSDConfigurationList.FindAll(C => C.token == OSDToken)).ToArray());
                }
                else
                {
                    throw ONVIFFault.GetMedia2Exception_InvalidArgVal_NoConfig(OSDToken);
                }
            }

            if ((OSDToken == null) && (ConfigurationToken != null))
            {
                if (ONVIFMedia2Configuration.VideoSourceConfigurationList.Any(C => C.token == ConfigurationToken))
                {
                    return((ONVIFMedia2Configuration.OSDConfigurationList.FindAll(C => C.VideoSourceConfigurationToken.Value == ConfigurationToken)).ToArray());
                }
                else
                {
                    throw ONVIFFault.GetMedia2Exception_InvalidArgVal_NoConfig(ConfigurationToken);
                }
            }

            return(null);
        }