public static SourceAvailability FilterProfile(this SourceAvailability orig, DeviceProfile profile) { SourceAvailability res = orig; if (profile.Auxiliaries == 0) { res &= ~SourceAvailability.Auxiliary; } if (profile.MultiView == null || profile.MultiView.Count == 0) { res &= SourceAvailability.Multiviewer; } if (profile.SuperSource == 0) { res &= ~(SourceAvailability.SuperSourceArt | SourceAvailability.SuperSourceBox); } if (profile.UpstreamKeys == 0) { res &= ~SourceAvailability.KeySource; } return(res); }
public static bool IsAvailable(this VideoSource src, SourceAvailability available) { var attr = src.GetPossibleAttribute <VideoSource, VideoSourceAvailabilityAttribute>(); if (attr == null) { return(false); } return(attr.SourceAvailability.HasFlag(available)); }
public VideoSourceAvailabilityAttribute(SourceAvailability sourceAvailability, MeAvailability me = MeAvailability.None) { SourceAvailability = sourceAvailability; MeAvailability = me; }