MCPcopy Create free account
hub / github.com/andybarry/makerscanner / Entry

Method Entry

CaptureThread.cpp:38–70  ·  view source on GitHub ↗

Called when thread is started

Source from the content-addressed store, hash-verified

36
37// Called when thread is started
38void* CaptureThread::Entry()
39{
40 while (true)
41 {
42 // check to see if the thread should exit
43 if (TestDestroy() == true)
44 {
45 break;
46 }
47
48 if (capturing == CAPTURE)
49 {
50 // get a new image
51 CaptureFrame();
52 } else if (capturing == PREVIEW)
53 {
54
55 // get a new image and show it on screen
56 CaptureFrame();
57 SendFrame(imageQueue.back());
58 } else if (capturing == IDLE)
59 {
60 Sleep(10);
61 } else if (capturing == STOP)
62 {
63 break;
64 }
65
66 Yield();
67 }
68
69 return NULL;
70}
71
72void CaptureThread::CaptureFrame()
73{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected