LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-22-2006, 10:06 AM   #1
bkv2k
LQ Newbie
 
Registered: Feb 2006
Location: Florida
Distribution: Fedora
Posts: 1

Rep: Reputation: 0
System Know There's A Camera???


Here a short program that I ran:

int main()
{
ifstream inputStream;

inputStream.open( "/dev/video0", ios::in );

cout << endl << endl;
if( !inputStream )
{
cout << "Could not open /dev/video0";
exit(1);
} else
{
cout << "/dev/video0 was opened";
}
cout << endl << endl;

return 0;
}

It reported: "/dev/video0 was opened".

Does this tell me that my system knows that there's a camera attached?
 
Old 02-23-2006, 01:49 PM   #2
slantoflight
Member
 
Registered: Aug 2005
Distribution: Smoothwall
Posts: 283
Blog Entries: 3

Rep: Reputation: 35
Isn't a camera mutually exclusive device? Meaning only one program can access it at once. Atleast thats what I've noticed from trying to open multiple recording programs at once. That would mean your program could potentially fail if another is using it, causing it to return "Permission Denied". I have'nt actually checked it. But I guess you try running VLC beforehand and try recording something.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Security camera record system sfxlover Linux - Software 5 08-31-2005 06:54 PM
I have an old DV camera dinolinux Linux - Newbie 1 06-17-2005 09:54 PM
Why can't I use my camera? phanbao Linux - Newbie 7 12-09-2004 03:40 PM
Can anyone help me with my Camera? BajaNick Linux - Hardware 2 07-24-2004 09:49 AM
Camera SnowSurfAir Linux - Hardware 1 08-09-2003 06:43 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration