CaptureDeviceMulticastProvider Class |
Namespace: StreamCoders.Devices
The CaptureDeviceMulticastProvider type exposes the following members.
Name | Description | |
---|---|---|
CaptureDeviceMulticastProvider |
Constructs instance of a provider. Multiple instances of CaptureDeviceMulticastProvider
with the same capture device are not permitted.
|
Name | Description | |
---|---|---|
CaptureDevice |
Gets the capture device used in this instance of the multicast provider.
|
Name | Description | |
---|---|---|
AddClient |
Adds a client to the provider.
| |
RemoveClient |
Removes a client from the provider.
| |
Start |
Starts this CaptureDeviceMulticastProvider.
| |
Stop |
Stops this CaptureDeviceMulticastProvider.
|
Name | Description | |
---|---|---|
Copy | Overloaded.
Creates a copy of the object.
(Defined by ObjectExtensions.) | |
Copy(Object) | Overloaded.
Creates a deep copy of the object using the supplied object as a target for the copy operation.
(Defined by ObjectExtensions.) |
static void Main(string[] args) { CamCapture cam = new CamCapture(); var devices = cam.GetDeviceList(); var metrics = cam.SelectDevice(devices[0]); cam.SelectMetrics(metrics[1]); Debug.Assert(cam.Start()); CaptureDeviceMulticastProvider provider = new CaptureDeviceMulticastProvider(cam, metrics[1]); Debug.Assert(provider.Start()); List<CaptureDeviceMulticastProviderClient> clients = new List<CaptureDeviceMulticastProviderClient>(); clients.Add(provider.AddClient(new CaptureDeviceMulticastProviderClient() { Width = 1024, Height = 768 })); clients.Add(provider.AddClient(new CaptureDeviceMulticastProviderClient() { Width = 352, Height = 288 })); clients.Add(provider.AddClient(new CaptureDeviceMulticastProviderClient() { Width = 176, Height = 144 })); while (true) { foreach (var client in clients) { var pic = client.GetFrame(); if (pic == null) { Console.WriteLine("picture is null"); } else Console.WriteLine("{0}, {1}x{2}, SizeIncludingHeader: {3}, Start: {4}, End {5}", client.Id, client.Width, client.Height, pic.Buffer.Count, pic.StartTime, pic.EndTime); } Thread.Sleep(1000); } }