source: eviacam/trunk/fuentes/wxcamwindow/capturethread.h @ 29

Last change on this file since 29 was 29, checked in by mabarracus, 4 years ago

added eviacam content

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1/////////////////////////////////////////////////////////////////////////////
2// Name:        capturethread.h
3// Purpose:             
4// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
5// Modified by:
6// Created:     
7// Copyright:   (C) 2008 Cesar Mauri Loba - CREA Software Systems
8//
9//  This program is free software: you can redistribute it and/or modify
10//  it under the terms of the GNU General Public License as published by
11//  the Free Software Foundation, either version 3 of the License, or
12//  (at your option) any later version.
13//
14//  This program is distributed in the hope that it will be useful,
15//  but WITHOUT ANY WARRANTY; without even the implied warranty of
16//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17//  GNU General Public License for more details.
18//
19//  You should have received a copy of the GNU General Public License
20//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
21/////////////////////////////////////////////////////////////////////////////
22
23
24#ifndef _CAPTURETHREAD_H_
25#define _CAPTURETHREAD_H_
26
27#include <wx/thread.h>
28//#include <cv.h>
29typedef struct _IplImage IplImage;
30
31// Forward class definitions
32class CCamera;
33class CCamWindow;
34
35// Abstract class for thread callback
36class CProcessImage
37{
38public:
39        virtual void ProcessImage (IplImage *pImage)= 0;
40        virtual ~CProcessImage() {}
41};
42
43class CCaptureThread : public wxThread
44{
45public:
46        CCaptureThread (CCamera *pCamera, CCamWindow *pCamWindow= NULL, 
47                                        CProcessImage *pProcessImage= NULL, wxThreadKind kind = wxTHREAD_DETACHED);
48        ~CCaptureThread ();
49
50        // Thread entry point
51        virtual wxThread::ExitCode Entry();
52        virtual wxThreadError Create(unsigned int stackSize = 0);
53        void Finish() { m_Life= false; }
54
55private:
56        volatile bool m_Life;
57        CCamWindow *m_pCamWindow;
58        CCamera *m_pCamera;
59        CProcessImage *m_pProcessImage; 
60};
61
62#endif
63
Note: See TracBrowser for help on using the repository browser.