AForge.NET

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

Check if camera already used by other applications

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

Check if camera already used by other applications

Postby anhba817 » Sun Jun 17, 2018 3:56 pm

Hi,
I have just started with aforge.net framework to display video from my webcam. Follow the examples, evrything is OK and I can show the video on my app. But I got the problem when the camera already used by other applications, seem that there is no NewFrameEvent happen. Is there any way to check if camera is currently used by other applications before we call Start() ? I tried to google and search in this forum but did not much help.
Thank you so much
anhba817
 
Posts: 3
Joined: Sun Jun 17, 2018 3:36 pm

Re: Check if camera already used by other applications

Postby andrew.kirillov » Mon Jun 18, 2018 7:30 am

Hello,

I am not aware of a method to detect if camera is busy by another application. One thing could be to see at what step the Start() fails. And then extract part of the code up to that point, i.e. a version of Start() only for checking if camera is busy or not, but not for starting playing it.
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

Re: Check if camera already used by other applications

Postby anhba817 » Mon Jun 18, 2018 12:08 pm

hi Andrew
Thank you so much for your reply. That is a good idea, I will try.
Another problem I get with aforge is, when trying to write a video using Aforge.Video.FFMPEG in 64 bits system.
I download the archive from this link: https://archive.codeplex.com/?p=aforgeffmpeg and copy all mpeg dll files to bin folder but the problem still happen.
Could you please give me the detail instruction how to use FFMPEG in 64 bist system
Thanks in advanced.
anhba817
 
Posts: 3
Joined: Sun Jun 17, 2018 3:36 pm

Re: Check if camera already used by other applications

Postby andrew.kirillov » Tue Jun 19, 2018 8:16 am

anhba817 wrote:but the problem still happen.

Which problem? What really happens?

anhba817 wrote:Could you please give me the detail instruction how to use FFMPEG in 64 bist system

I was using 32-bit version of FFmpeg and so my C# application was set to 32-bit mode even on 64 bit system. Did not those 64-bit binaries you've downloaded. You may need to check with someone who published them.
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

Re: Check if camera already used by other applications

Postby anhba817 » Tue Jun 19, 2018 3:28 pm

Hi Andrew,
Have just figure out I copied wrong directory.
Thank you so much for your help.
BRs,
Dong
anhba817
 
Posts: 3
Joined: Sun Jun 17, 2018 3:36 pm




Return to AForge.NET Framework

cron