Esempio n. 1
0
 private PositionRect AdjustPtzHFlip(PositionRect ptz, SceneItemFilters filters)
 {
     if (filters?.Filters != null && filters.Filters.Any(s => s.Type == SceneItemFilterType.HFlip))
     {
         return(new PositionRect(1 - ptz.Width - ptz.Left, ptz.Top, ptz.Width, ptz.Height));
     }
     return(ptz);
 }
Esempio n. 2
0
        private VideoFilterChainDescriptor RebuildFilters(SceneItemFilters filters)
        {
            if (filters == null || filters.Filters == null || filters.Filters.Length == 0 || filters.Filters.All(s => !s.Enabled))
            {
                return(null);
            }

            return(new VideoFilterChainDescriptor(filters.Filters.Where(s => s.Enabled).Select(s => RebuildFilter(s)).Where(s => s != null).ToArray()));;
        }