0

I have a recordFunction which records 60-second videos. This process repeats 8 times and then starts again ( as while(1) ).

In the other side, my imageProcessing function runs after the first record gets saved into the file.

For example:

MyRecorder Start:

record01 62 sec.

MyImageProcesser Start:

Thread01 / Take Record01 and Work on it  ~140 sec.

(at this point MyRecorder is still running in the background and saving frames).

record02 62 sec. (this guy start after record01 and save in to file video)

After record02, another Thread (MyImageProcesser Thread02) should start.

Thread02 / Take Record02 and Work on it  ~140 sec.

I want to create 8 threads and assign tasks.

While(1){
    MyRecorder Start:
    MyImageProcesser Start:
    Thread01 task --> working on record01
    Thread02 task --> working on record02
    Thread03 task --> working on record03
    Thread04 task --> working on record04
    Thread05 task --> working on record05
    Thread06 task --> working on record06
    Thread07 task --> working on record07
    Thread08 task --> working on record08
}

Will MultiThread solve this problem? How can I implement it? I do not know MultiThread events.

James South
  • 10,147
  • 4
  • 59
  • 115
Ali Kahya
  • 1
  • 1
  • 7
  • 1
    Could you be more specific on what problem are you having exactly? Also, if your app is crashing, can you provide us with the error messages it may be displaying? Include some snippets of your code too. And, more importantly, make sure to read [How to ask a good question](https://stackoverflow.com/help/how-to-ask). – andre_ss6 Aug 19 '16 at 14:05
  • I rewrite my questions. – Ali Kahya Aug 20 '16 at 12:04
  • Fix formatting and grammar – Prune Aug 22 '16 at 23:34
  • I fixed formatting and grammar. – Prune Aug 22 '16 at 23:35
  • See http://stackoverflow.com/questions/266168/simple-example-of-threading-in-c also http://www.tutorialspoint.com/cplusplus/cpp_multithreading.htm http://www.cplusplus.com/reference/thread/thread/ – Fr333du Aug 23 '16 at 07:13

0 Answers0