LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   University Project (running a program from within another) (https://www.linuxquestions.org/questions/linux-newbie-8/university-project-running-a-program-from-within-another-923435/)

soulchyld21 01-12-2012 06:30 AM

University Project (running a program from within another)
 
Hi, Im still fairly new to linux, I have a university project using a beagle board and linux, basically I need to be able to take a photo using a webcam when a sensor is activated, for the sensor I am thinking of using GPIO, where I can see myself facing a challenge is in the picture taking bit, can I use a program like cheese webcam booth from within the application I intend writing to do this? if so any ideas on what and where I should start looking for ideas and answers to achieve this? or has anyone got any suggestions on how one could go about a project like this.
Regards
soulchyld21

tronayne 01-12-2012 08:10 AM

In general if you want to execute a program from within a running program you would fork-and-exec; this is what the shell does when you enter a command and hit the carriage return.

Maybe start with the manual pages for fork and the "See Also" pages listed at the bottom of the fork page. If you're interested I can post a mini-shell (written in C) that may point you in the right direction.

Hope this helps some.

fnogger 01-12-2012 10:23 AM

Check out the program "motion"

tronayne 01-12-2012 10:43 AM

Quote:

Originally Posted by fnogger (Post 4572890)
Check out the program "motion"

He's talking about Linux -- "Motion is a software application produced by Apple Inc. for their Mac OS X operating system." http://en.wikipedia.org/wiki/Motion_%28software%29, isn't it?

unSpawn 01-12-2012 10:51 AM

AFAIK he means motion: "Motion is a program that monitors the video signal from cameras. It is able to detect if a significant part of the picture has changed; in other words, it can detect motion."

tronayne 01-12-2012 03:57 PM

Ah! It's another motion... I see.

unSpawn 01-12-2012 04:10 PM

Quote:

Originally Posted by tronayne (Post 4573089)
Ah! It's another motion...

Depends on your POV, right? ;-p


All times are GMT -5. The time now is 04:26 AM.