Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
VideoSourceCapabilities.hh
1 #ifndef __VIDEOSOURCECPABILITIES_H__
2 #define __VIDEOSOURCECPABILITIES_H__
3 
4 #include <Base/Image/ImageBase.hh>
5 #include <vector>
6 #include <utility>
7 
8 namespace BIAS {
9 
10 /**
11  \class VideoSourceCapabilities
12  \ingroup g_videosource
13  \relates VideoSource, VideoSource_V4L, VideoSource_DSHOW
14  \author MIP
15  \brief Checks for VideoSource capabilities
16  */
17 class BIASVideoSource_EXPORT VideoSourceCapabilities {
18  public:
21 
22  enum VSType {
23  TypeCamera, TypeTuner
24  };
25 
26  struct ResolutionEntry {
27  unsigned int width;
28  unsigned int height;
29  float fps;
31  bool interlaced;
32  };
33 
34  struct InputDescriptor {
35  unsigned int number;
37  std::string name;
38  bool NoSignal;
39  bool NoColor;
40  bool NoPower;
41  bool Active;
42 
43  };
44 
45 
46  void Reset();
47  void AddMode(unsigned int width, unsigned int height, float fps,
48  ImageBase::EColorModel colormodel, bool interlaced=false);
49 
50  bool HasMode(unsigned int width, unsigned int height, float fps,
51  ImageBase::EColorModel colormodel,bool interlaced);
52 
53  std::vector<ResolutionEntry> GetAllResolutionsRef() const
54  {return AllResolutions_;}
55 
56  void GetBestForEachResolution(std::vector<ResolutionEntry> &res);
57 
58 
59  void AddInput(InputDescriptor id);
60 
61 
62  void Show();
63 
64  void SetName(const std::string &name) {Name_ = name;};
65  std::string GetName(){return Name_;}
66 
67  protected:
68  std::string Name_;
69 
70  std::vector<ResolutionEntry> AllResolutions_;
71 
72  std::vector<InputDescriptor> Inputs_;
73 
74 }; //class
75 
76 } //namespace
77 
78 #endif
EColorModel
These are the most often used color models.
Definition: ImageBase.hh:127
std::vector< ResolutionEntry > AllResolutions_
class BIASVideoSource_EXPORT VideoSourceCapabilities
Checks for VideoSource capabilities.
std::vector< InputDescriptor > Inputs_
void SetName(const std::string &name)
std::vector< ResolutionEntry > GetAllResolutionsRef() const