public void Add(MediaFrameReference frame) { if (frame == null) { FailureReasons.Enqueue(ExampleMediaFrameCollectionFailureReason.NullMediaFrameReference); return; } if (frame.VideoMediaFrame == null) { FailureReasons.Enqueue(ExampleMediaFrameCollectionFailureReason.NullVideoMediaFrame); return; } if (frame.SystemRelativeTime == null) { FailureReasons.Enqueue(ExampleMediaFrameCollectionFailureReason.NullSystemRelativeTime); return; } Frames.Enqueue(new ExampleMediaFrame(frame.VideoMediaFrame)); Update(frame.SystemRelativeTime.Value); }
/// <summary> /// Initializes a new instance of the <see cref="ShowFile"/> class. /// </summary> /// <param name="location">The location of the file.</param> /// <param name="error">The reason why the parsing has failed.</param> public ShowFile(string location, FailureReasons? error = null) { Name = Path.GetFileName(location); Extension = Path.GetExtension(Name); ParseError = error; }