Page 1 of 1

LogiTech hd pro c920 won't connect

PostPosted: Mon Oct 14, 2019 8:15 pm
by Fabiano.Amorim
Hello. I have a LogiTech hd pro c920 webcam. I cannot view the image. I used the simple player available on the link
http://www.aforgenet.com/framework/samples/video.html but it doesn't work. I get no exceptions. can anybody help me?
I'm sorry for the language errors. I am Brazilian and I know very little about English

Re: LogiTech hd pro c920 won't connect

PostPosted: Mon Oct 14, 2019 9:27 pm
by c0dybrown
If you are writing code, this is what I would do:

Includes:
Code: Select all
using System;
using AForge.Video;
using AForge.Video.DirectShow;
using Newtonsoft.Json;


List all video inputs:
Code: Select all
var videoInputList = new FilterInfoCollection(FilterCategory.VideoInputDevice);
Console.WriteLine(JsonConvert.SerializeObject(videoInputList));
// Use System.Diagnostics.Debug.WriteLine() instead if using WPF or WinForms


Find your c920 from the list, note its index, and then use this to create a VideoCaptureDevice:
Code: Select all
var webcam = new VideoCaptureDevice(videoInputList[<index>].MonikerString)

Re: LogiTech hd pro c920 won't connect

PostPosted: Tue Oct 15, 2019 11:27 am
by Fabiano.Amorim
Hello. I did it that way. My issue is similar to request http://www.aforgenet.com/forum/viewtopic.php?f=2&t=3540
Returns no error just displays the message: connecting ....

Re: LogiTech hd pro c920 won't connect

PostPosted: Tue Oct 15, 2019 8:12 pm
by c0dybrown
Hey the only way to solve this is for you to troubleshoot using your camera

I am guessing you are using the VideoSourcePlayer control? Here is the line that produces the "Connecting..." message:
https://github.com/andrewkirillov/AForg ... er.cs#L464

The message is only displayed if the videoSource variable is null. This means that it is not getting set correctly in the control. I would start in that file and console log stuff in the VideoSource setter on line 161.

Have you tried using your own control? If you are interested in that, let me know and I'll post some source code.

Re: LogiTech hd pro c920 won't connect

PostPosted: Tue Oct 15, 2019 8:49 pm
by andrew.kirillov
c0dybrown wrote:The message is only displayed if the videoSource variable is null.

This is not true. You can set video source, but if it never provides a video frame, it will stay "Connecting ..."