internal Right GetOfferRight( MediaRightsEnum right, VideoDefinitionEnum definition, PriceTypeEnum priceType) { if (FeatureEnablement.IsFeatureEnabled(Features.eMarketplace) && this.IsAssociatedFeatureEnabled(right)) { if (definition == VideoDefinitionEnum.None) { Right right1 = (this.GetOfferRight(right, VideoDefinitionEnum.HD, priceType) ?? this.GetOfferRight(right, VideoDefinitionEnum.SD, priceType)) ?? this.GetOfferRight(right, VideoDefinitionEnum.XD, priceType); if (right1 != null) { return(right1); } } if (this.Rights != null) { foreach (Right right1 in Rights) { if (right == right1.RightEnum && priceType == right1.PriceTypeEnum && (definition == right1.VideoDefinitionEnum || definition == VideoDefinitionEnum.None) && (right1.VideoResolutionEnum != VideoResolutionEnum.VR_1080P || right1.RightEnum != MediaRightsEnum.Purchase)) { return(right1); } } } } return(null); }
internal bool HasRights( MediaRightsEnum right, VideoDefinitionEnum definition1, VideoDefinitionEnum definition2, PriceTypeEnum priceType) { return(this.GetOfferRight(right, definition1, definition2, priceType) != null); }
internal bool HasRights( MediaRightsEnum right, VideoDefinitionEnum definition, PriceTypeEnum priceType) { Right offerRight = this.GetOfferRight(right, definition, priceType); if (right != MediaRightsEnum.PurchaseStream) { return(offerRight != null); } return(offerRight != null && this.HasRights(MediaRightsEnum.Purchase, definition, VideoDefinitionEnum.XD, priceType)); }
public override void SetProperty(string propertyName, object value) { switch (propertyName) { case "LicenseRight": this._rightEnum = SchemaHelper.ToMediaRights((string)value); break; case "VideoDefinition": this._videoDefinitionEnum = SchemaHelper.ToVideoDefinition((string)value); break; case "VideoResolution": this._videoResolutionEnum = SchemaHelper.ToVideoResolution((string)value); break; } base.SetProperty(propertyName, value); }
public VideoPlaybackTrack( Guid zuneMediaId, string title, string artist, string uri, bool isDownloading, bool isStreaming, bool ignoreCollection, bool fallbackToPreview, bool forcePreview, VideoDefinitionEnum videoDefinition) { this._title = title; this._zuneMediaId = zuneMediaId; this._artist = artist; this._uri = uri; this._isDownloading = isDownloading; this._isStreaming = isStreaming; this._ignoreCollection = ignoreCollection; this._fallbackToPreview = fallbackToPreview; this._forcePreview = forcePreview; this._videoDefinition = videoDefinition; }
internal static VideoDefinitionEnum ToVideoDefinition(string value) { VideoDefinitionEnum videoDefinitionEnum = VideoDefinitionEnum.None; if (!string.IsNullOrEmpty(value)) { switch (value) { case "HD": videoDefinitionEnum = VideoDefinitionEnum.HD; break; case "SD": videoDefinitionEnum = VideoDefinitionEnum.SD; break; case "XD": videoDefinitionEnum = VideoDefinitionEnum.XD; break; } } return(videoDefinitionEnum); }
internal Right GetOfferRight( MediaRightsEnum right, VideoDefinitionEnum definition1, VideoDefinitionEnum definition2, PriceTypeEnum priceType) { if (FeatureEnablement.IsFeatureEnabled(Features.eMarketplace) && this.IsAssociatedFeatureEnabled(right) && this.Rights != null) { foreach (Right right1 in Rights) { if (right == right1.RightEnum && definition1 == right1.VideoDefinitionEnum && priceType == right1.PriceTypeEnum) { foreach (Right right2 in Rights) { if (right1 != right2 && right == right2.RightEnum && (definition2 == right2.VideoDefinitionEnum && priceType == right2.PriceTypeEnum) && right1.OfferId == right2.OfferId) { return(right2); } } } } } return(null); }
public NTSCVideo(string name, string description, VideoDefinitionEnum definition, int hours, int minutes, int seconds, int frames) : base(name, description, definition) { Standard = VideoStandardEnum.NTSC; TimeCode = new TimeCode(hours, minutes, seconds, frames, frameRate); }
protected BaseVideo(string name, string description, VideoDefinitionEnum definition) { Name = name; Description = description; Definition = definition; }