Gnash  0.8.11dev
VideoInputHaiku.h
Go to the documentation of this file.
1 // VideoInputHaiku.h: Video input processing using Haiku media kit
2 //
3 // Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 
19 #ifndef GNASH_VIDEOINPUTHAIKU_H
20 #define GNASH_VIDEOINPUTHAIKU_H
21 
22 #include <vector>
23 #include <cstdint> // for C99 int types
24 #include "VideoInput.h"
25 
26 namespace gnash {
27 namespace media {
28 namespace haiku {
29 
31 {
32 public:
33 
35  //
39 
41  virtual ~VideoInputHaiku();
42 
43  static void getNames(std::vector<std::string>& /*names*/) {}
44 
46  //
49  double activityLevel () const { return _activityLevel; }
50 
52  //
54  size_t bandwidth() const { return _bandwidth; }
55 
56  void setBandwidth(size_t bandwidth) {
57  _bandwidth = bandwidth;
58  }
59 
61  //
63  double currentFPS() const { return _currentFPS; }
64 
66  //
68  double fps() const { return _fps; }
69 
71  size_t height() const { return _height; }
72 
74  size_t width() const { return _width; }
75 
77  size_t index() const { return _index; }
78 
80  //
85  void requestMode(size_t width, size_t height, double fps, bool favorArea);
86 
88  void setMotionLevel(int m) { _motionLevel = m; }
89 
91  int motionLevel() const { return _motionLevel; }
92 
94  void setMotionTimeout(int m) { _motionTimeout = m; }
95 
97  int motionTimeout() const { return _motionTimeout; }
98 
99  void mute(bool m) { _muted = m; }
100  bool muted() const { return _muted; }
101 
103  //
105  const std::string& name() const { return _name; }
106 
108  void setQuality(int q) { _quality = q; }
109 
111  int quality() const { return _quality; }
112 
117  bool play();
118 
122  bool stop();
123 
124 private:
125 
129 
132  double _activityLevel;
133 
136  size_t _bandwidth;
137 
140  double _currentFPS;
141 
143  double _fps;
144 
147  size_t _height;
148 
151  size_t _width;
152 
154  size_t _index;
155 
157  int _motionLevel;
158 
160  int _motionTimeout;
161 
164  bool _muted;
165 
167  std::string _name;
168 
170  int _quality;
171 
172 };
173 
174 
175 } // gnash.media.haiku namespace
176 } // gnash.media namespace
177 } // gnash namespace
178 
179 #endif
double fps() const
The maximum FPS rate of the webcam.
Definition: VideoInputHaiku.h:68
void setMotionTimeout(int m)
Set time without motion in milliseconds before core is notified.
Definition: VideoInputHaiku.h:94
double activityLevel() const
Return the current activity level of the webcam.
Definition: VideoInputHaiku.h:49
int motionTimeout() const
Return the current motionTimeout setting.
Definition: VideoInputHaiku.h:97
static void getNames(std::vector< std::string > &)
Definition: VideoInputHaiku.h:43
void setBandwidth(size_t bandwidth)
Set the bandwidth for outgoing connections.
Definition: VideoInputHaiku.h:56
VideoInputHaiku()
Constructor for the VideoInputHaiku class.
Definition: VideoInputHaiku.cpp:26
Definition: GnashKey.h:163
double currentFPS() const
The current frame rate of the webcam.
Definition: VideoInputHaiku.h:63
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
void setQuality(int q)
Set the quality of the webcam.
Definition: VideoInputHaiku.h:108
size_t bandwidth() const
The maximum available bandwidth for outgoing connections.
Definition: VideoInputHaiku.h:54
This is the interface for video input devices.
Definition: VideoInput.h:47
const std::string & name() const
Return the name of this webcam.
Definition: VideoInputHaiku.h:105
int quality() const
Return the current quality of the webcam.
Definition: VideoInputHaiku.h:111
size_t width() const
Return the width of the webcam&#39;s frame.
Definition: VideoInputHaiku.h:74
void setMotionLevel(int m)
Set the amount of motion required before notifying the core.
Definition: VideoInputHaiku.h:88
void requestMode(size_t width, size_t height, double fps, bool favorArea)
Request a native mode most closely matching the passed variables.
Definition: VideoInputHaiku.cpp:43
int motionLevel() const
Return the current motionLevel setting.
Definition: VideoInputHaiku.h:91
size_t height() const
Return the height of the webcam&#39;s frame.
Definition: VideoInputHaiku.h:71
virtual ~VideoInputHaiku()
Destructor for the VideoInputGst class.
Definition: VideoInputHaiku.cpp:53
size_t index() const
The index of the camera.
Definition: VideoInputHaiku.h:77
void mute(bool m)
Definition: VideoInputHaiku.h:99
Definition: GnashKey.h:159
Definition: VideoInputHaiku.h:30
bool play()
Function starts up the pipeline designed earlier in code execution. This puts everything into motion...
bool muted() const
Definition: VideoInputHaiku.h:100
bool stop()
Function stops the pipeline designed earlier in code execution.