public void testCustomRendering() { // 1. Set proper video capture device Dictionary<string, string> devs = null; ; _service.getVideoCaptureDeviceNames(createDevsResponder()); devs = awaitDictResult("getVideoCaptureDeviceNames", 15000); Assert.IsTrue(devs.Count > 0); Console.Error.WriteLine("Setting the device"); _service.setVideoCaptureDevice(createVoidResponder(), devs.Keys.First()); awaitVoidResult("setVideoCaptureDevice", 15000); // 2. Do the real test Console.Error.WriteLine("Starting local video"); _service.startLocalVideo(createStringResponder()); string sinkId = awaitStringResult("startLocalVideo", 15000); Assert.That(sinkId.Length > 0); Console.Error.WriteLine("Creating renderer"); RenderOptions ro = new RenderOptions(); ro.filter = VideoScalingFilter.FAST_BILINEAR; ro.mirror = true; ro.sinkId = sinkId; Console.Error.WriteLine("Starting rendering"); _service.manualRenderSink(createManualRendererResponder(), ro); ManualRenderer mRenderer = awaitManualRendererResult(); Console.Error.WriteLine("Rendering started"); TestRenderingForm renderingForm = new TestRenderingForm(mRenderer); renderingForm.ShowDialog(); _service.stopLocalVideo(createVoidResponder()); awaitVoidResult(); }
public void testCustomRendering() { // 1. Set proper video capture device Dictionary <string, string> devs = null;; _service.getVideoCaptureDeviceNames(createDevsResponder()); devs = awaitDictResult("getVideoCaptureDeviceNames", 15000); Assert.IsTrue(devs.Count > 0); Console.Error.WriteLine("Setting the device"); _service.setVideoCaptureDevice(createVoidResponder(), devs.Keys.First()); awaitVoidResult("setVideoCaptureDevice", 15000); // 2. Do the real test Console.Error.WriteLine("Starting local video"); _service.startLocalVideo(createStringResponder()); string sinkId = awaitStringResult("startLocalVideo", 15000); Assert.That(sinkId.Length > 0); Console.Error.WriteLine("Creating renderer"); RenderOptions ro = new RenderOptions(); ro.filter = VideoScalingFilter.FAST_BILINEAR; ro.mirror = true; ro.sinkId = sinkId; Console.Error.WriteLine("Starting rendering"); _service.manualRenderSink(createManualRendererResponder(), ro); ManualRenderer mRenderer = awaitManualRendererResult(); Console.Error.WriteLine("Rendering started"); TestRenderingForm renderingForm = new TestRenderingForm(mRenderer); renderingForm.ShowDialog(); _service.stopLocalVideo(createVoidResponder()); awaitVoidResult(); }