File: videoOptiTrack.h

package info (click to toggle)
gem 1%3A0.94-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 25,320 kB
  • sloc: cpp: 174,266; ansic: 42,129; makefile: 3,848; sh: 1,096; objc: 389
file content (111 lines) | stat: -rw-r--r-- 2,743 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*-----------------------------------------------------------------

GEM - Graphics Environment for Multimedia

Copyright (c) 2012 IOhannes m zmölnig. forum::für::umläute. IEM. zmoelnig@iem.at
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution.

-----------------------------------------------------------------*/

#ifndef _INCLUDE_GEMPLUGIN__VIDEOOPTITRACK_VIDEOOPTITRACK_H_
#define _INCLUDE_GEMPLUGIN__VIDEOOPTITRACK_VIDEOOPTITRACK_H_

#include "plugins/video.h"
#include "Gem/Image.h"
#include "Gem/Properties.h"

/* Natural Point's Camera SDK */
/* ... they really like generic names */
#include <cameralibrary.h>

/*-----------------------------------------------------------------
  -------------------------------------------------------------------
  CLASS
  pix_video

  captures a video using NaturalPoints OptiTrack cameras

  KEYWORDS
  pix

  -----------------------------------------------------------------*/
namespace gem
{
namespace plugins
{
class GEM_EXPORT videoOptiTrack : public video
{
public:
  //////////
  // Constructor
  videoOptiTrack(void);

  //////////
  // Destructor
  virtual ~videoOptiTrack(void);

  virtual bool open(gem::Properties&props);
  virtual pixBlock *getFrame(void);

  virtual std::vector<std::string>enumerate(void);
  virtual bool setDevice(int ID);
  virtual bool setDevice(const std::string&);

  virtual bool enumProperties(gem::Properties&readable,
                              gem::Properties&writeable);
  virtual void setProperties(gem::Properties&props);
  virtual void getProperties(gem::Properties&props);

  virtual std::vector<std::string>dialogs(void);
  // for pix_video: query whether this backend provides access to this class of devices
  // (e.g. "dv")
  virtual bool provides(const std::string&);
  // get a list of all provided devices
  virtual std::vector<std::string>provides(void);

  // get's the name of the backend (e.g. "v4l")
  virtual const std::string getName(void);

  virtual bool isThreadable(void)
  {
    return true;
  }
  virtual bool reset(void);
  virtual void releaseFrame(void);
  virtual bool grabAsynchronous(bool)
  {
    return true;
  }
  virtual bool dialog(std::vector<std::string>names=
                        std::vector<std::string>())
  {
    return false;
  }
  virtual bool setColor(int)
  {
    return false;
  }

  virtual void close(void);
  virtual bool start(void);
  virtual bool stop(void);

protected:
  gem::Properties m_props;
  std::string m_devname;
  int m_devnum;
  int m_quality;

  CameraLibrary::Camera*m_camera;
  CameraLibrary::Frame *m_frame;

  bool m_resize;
  pixBlock m_pixBlock;

};
};
};


#endif  // for header file