public void AddVideoClipWhenNoSupportingGroupExists() { using (ITimeline timeline = new DefaultTimeline()) { timeline.AddVideo("1sec.wmv"); } }
public void AddVideoClipWhenNoSupportingTrackExists() { using (ITimeline timeline = new DefaultTimeline()) { timeline.AddVideoGroup(24, 100, 100); timeline.AddVideo("1sec.wmv"); } }
public void WriteSomeImages() { using (var timeline = new DefaultTimeline()) { timeline.AddVideoGroup(24, 320, 240).AddTrack(); // we want 320x240 sized images timeline.AddVideo("..\\..\\transitions.wmv"); var participant = new ImagesToDiskParticipant(24, 320, 240, Environment.CurrentDirectory, 1, 2, 3, 4, 5, 6, 7); using (var render = new NullRenderer(timeline, null, new ICallbackParticipant[] { participant })) { render.Render(); } for (int i = 0; i < 6; i++) { Assert.IsTrue(File.Exists(string.Format("frame{0}.jpg", i))); } } }
public void AddVideo() { // test all the overloads for AddVideo using (ITimeline timeline = new DefaultTimeline()) { timeline.AddVideoGroup(24, 320, 240).AddTrack(); IClip clip1 = timeline.AddVideo("1sec.wmv"); Assert.AreEqual(0, clip1.Offset); Assert.AreEqual(1, clip1.Duration); IClip clip2 = timeline.AddVideo("1sec.wmv", 1); Assert.AreEqual(2, clip2.Offset); Assert.AreEqual(1, clip2.Duration); IClip clip3 = timeline.AddVideo("1sec.wmv", 0, 0.5); Assert.AreEqual(3, clip3.Offset); Assert.AreEqual(0.5, clip3.Duration); IClip clip4 = timeline.AddVideo("1sec.wmv", 0, 0.5, 1.0); Assert.AreEqual(3.5, clip4.Offset); Assert.AreEqual(0.5, clip4.Duration); Assert.AreEqual(0.5, clip4.MediaStart); IClip clip5 = timeline.AddVideo("1sec.wmv", InsertPosition.Absolute, 6, 0, -1); Assert.AreEqual(6, clip5.Offset); Assert.AreEqual(1, clip5.Duration); IClip clip6 = timeline.AddVideo("myclip", "1sec.wmv", InsertPosition.Absolute, 8, 0, 0.5); Assert.AreEqual(8, clip6.Offset); Assert.AreEqual(0, clip6.MediaStart); Assert.AreEqual(0.5, clip6.Duration); Assert.AreEqual("myclip", clip6.Name); } }