AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

Why VideoCapabilities doesn't work in Windows 2012 Server

Forum to discuss AForge.NET Framework, its features, API, how-tos, etc.

Why VideoCapabilities doesn't work in Windows 2012 Server

Postby jackys2009 » Tue Jun 30, 2015 1:48 am

Why VideoCapabilities doesn't work in Windows 2012 Server

I'm trying using AForge.NET to show a USBCamera's Video in a Aforge.Controls.videoSourcePlayer in a C# Form.
The code works well in Windows 7 professional.
But when I try to run the same code in Windows 2012 Server, it doesn't work!
I track the code,and find that the VideoCaptureDevice.VideoCapabilities is empty when creating the VideoCaptureDevice.

the code example below:

Code: Select all
private vode Form_Load(object sender, EventArgs e)
{
try
{
videoDevices= new FilterInfoCollection(FilterCategory.VideoInputDevice);
foreach(FilterInfo device in videoDevices)
{
repositoryItemComboBox.Items.Add(device.Name);
}
CameraConn();
......
}
}

private void CameraConn()
{
if(videoDvices == null) return;
VideoCaptureDevice videoSource = new VideoCaptureDevice(videoDevices[SelectedIndex].MonikerString);
[color=#FF0000][u][b]videoCapabilities = videoSource.VideoCapabilities;[/b][/u][/color]
......
}


is there anyone have the experience to use AForge.net in windows server 2012 ,and can treat the issue?

Thanks & best Regards!
Jacky
jackys2009
 
Posts: 1
Joined: Tue Jun 30, 2015 1:23 am



Return to AForge.NET Framework