AForge.NET

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

LogiTech hd pro c920 won't connect

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

LogiTech hd pro c920 won't connect

Postby Fabiano.Amorim » Mon Oct 14, 2019 8:15 pm

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
Fabiano.Amorim
 
Posts: 2
Joined: Mon Oct 14, 2019 8:09 pm

Re: LogiTech hd pro c920 won't connect

Postby c0dybrown » Mon Oct 14, 2019 9:27 pm

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)
c0dybrown
 
Posts: 3
Joined: Mon Oct 14, 2019 8:53 pm

Re: LogiTech hd pro c920 won't connect

Postby Fabiano.Amorim » Tue Oct 15, 2019 11:27 am

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 ....
Fabiano.Amorim
 
Posts: 2
Joined: Mon Oct 14, 2019 8:09 pm

Re: LogiTech hd pro c920 won't connect

Postby c0dybrown » Tue Oct 15, 2019 8:12 pm

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.
c0dybrown
 
Posts: 3
Joined: Mon Oct 14, 2019 8:53 pm

Re: LogiTech hd pro c920 won't connect

Postby andrew.kirillov » Tue Oct 15, 2019 8:49 pm

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 ..."
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK




Return to AForge.NET Framework

cron