-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NewFrameEvent never fired when videoSource.Start() is called #43
Comments
Try this: |
@JohnSWatson the issue isn't getting the bitmap, when I set a breakpoint on that line it's never getting hit. It's as if the event is never fired. I also added the error handler event and that one is not being hit either, so I don't know how to debug this. |
Sorry, my application uses 6 cameras which are handled in series, so my code is convoluted. It would help if you supplied all details and relevant code. However, if the handler is not being called, then it is not it my not be being subscribed to, you may be missing the “object sender, …” parameter. Please refer to the Aforge docs at http://www.aforgenet.com/framework/docs/html/4cf2f0c9-4b5b-2666-290a-6b37a11e8e4f.htm and http://www.aforgenet.com/framework/features/directshow_video.html If this does not help try writing a minimum fail program (the minimum code which fails) and post that code. |
I just had the same problem on a few machines with Windows 10 using Logitech's C270 Camera, and it turns out they all had Kaspersky Endpoint Security 11 antivirus installed and it was somehow blocking our application. Strangely enough the Windows camera app and the browsers (Firefox or Chrome) were working without any issues. Maybe something related to trusted applications being allowed access or something like that while our software was not. The behavior as I was able to track was such that when calling videoSource.Start() just like in the example above, the LED in the camera would actually turn on as expected, no error was being produced (using the videoSource.VideoSourceError += VideoSource_VideoSourceError;), but the videoSource.NewFrame was never called at all... thus no bitmap to process or show in the picturebox... videoSource.IsRunning would return True, and after calling videoSource.SignalToStop(); the LED of the camera turned off as expected. I even tried the AForge sample applications and one other application written using DirectX.Capture.dll and they showed the same behavior (Webcam LED turns ON, no image in the app). I could not test playing around with the Kaspersky options because the network admins password protected it, but to prove the point I was able to uninstall it completely from one machine and magically the app just worked. So for sure Kaspersky was blocking it somehow (maybe it uses some directshow filter or who knows what to prevent untrusted apps from accessing the camera). The AForge sample application and the other one using DirectX.Capture.Capture also worked. So... since it took me a while to solve this one, I figured I should share it here or somewhere... so others may be pointed in the right direction if experiencing something similar. |
I have the same problem, but I don't have Kaspersky installed. It's a fresh install of Windows 7 with Defender's realtime protection disabled. Firefox can access the camera just fine. |
i have the same problem,
then i go to kapersky endpoint security, now my app can access webcam. |
I am using AForge in a console application, following the sample for snapshot capture. When I call videoSource.Start(), the method for handling the new video frame event is never hit. Here's the code:
The text was updated successfully, but these errors were encountered: