Gnash  0.8.11dev
VideoInputFfmpeg.h
Go to the documentation of this file.
1 // VideoInputFfmpeg.h: Video input processing using Gstreamer
2 //
3 // Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
4 // Free Software Foundation, Inc.
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 
20 #ifndef GNASH_VIDEOINPUTFFMPEG_H
21 #define GNASH_VIDEOINPUTFFMPEG_H
22 
23 #include <vector>
24 #include <cstdint> // for C99 int types
25 #include <vector>
26 #include "VideoInput.h"
27 
28 namespace gnash {
29 namespace media {
30 namespace ffmpeg {
31 
33 {
34 public:
35 
37  //
41 
43  virtual ~VideoInputFfmpeg();
44 
45  static void getNames(std::vector<std::string>& /*names*/) {}
46 
48  //
51  double activityLevel () const { return _activityLevel; }
52 
54  //
56  size_t bandwidth() const { return _bandwidth; }
57 
58  void setBandwidth(size_t bandwidth) {
59  _bandwidth = bandwidth;
60  }
61 
63  //
65  double currentFPS() const { return _currentFPS; }
66 
68  //
70  double fps() const { return _fps; }
71 
73  size_t height() const { return _height; }
74 
76  size_t width() const { return _width; }
77 
79  size_t index() const { return _index; }
80 
82  //
87  void requestMode(size_t width, size_t height, double fps, bool favorArea);
88 
90  void setMotionLevel(int m) { _motionLevel = m; }
91 
93  int motionLevel() const { return _motionLevel; }
94 
96  void setMotionTimeout(int m) { _motionTimeout = m; }
97 
99  int motionTimeout() const { return _motionTimeout; }
100 
101  void mute(bool m) { _muted = m; }
102  bool muted() const { return _muted; }
103 
105  //
107  const std::string& name() const { return _name; }
108 
110  void setQuality(int q) { _quality = q; }
111 
113  int quality() const { return _quality; }
114 
119  bool play();
120 
124  bool stop();
125 
126 private:
127 
131 
134  double _activityLevel;
135 
138  size_t _bandwidth;
139 
142  double _currentFPS;
143 
145  double _fps;
146 
149  size_t _height;
150 
153  size_t _width;
154 
156  size_t _index;
157 
159  int _motionLevel;
160 
162  int _motionTimeout;
163 
166  bool _muted;
167 
169  std::string _name;
170 
172  int _quality;
173 
174 };
175 
176 
177 } // ffmpeg namespace
178 } // media namespace
179 } // gnash namespace
180 
181 #endif
bool stop()
Function stops the pipeline designed earlier in code execution.
void requestMode(size_t width, size_t height, double fps, bool favorArea)
Request a native mode most closely matching the passed variables.
Definition: VideoInputFfmpeg.cpp:43
int motionTimeout() const
Return the current motionTimeout setting.
Definition: VideoInputFfmpeg.h:99
bool muted() const
Definition: VideoInputFfmpeg.h:102
double currentFPS() const
The current frame rate of the webcam.
Definition: VideoInputFfmpeg.h:65
Definition: GnashKey.h:163
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
size_t width() const
Return the width of the webcam&#39;s frame.
Definition: VideoInputFfmpeg.h:76
void setMotionTimeout(int m)
Set time without motion in milliseconds before core is notified.
Definition: VideoInputFfmpeg.h:96
VideoInputFfmpeg()
Constructor for the VideoInputFfmpeg class.
Definition: VideoInputFfmpeg.cpp:26
virtual ~VideoInputFfmpeg()
Destructor for the VideoInputFfmpeg class.
Definition: VideoInputFfmpeg.cpp:53
size_t index() const
The index of the camera.
Definition: VideoInputFfmpeg.h:79
This is the interface for video input devices.
Definition: VideoInput.h:47
int motionLevel() const
Return the current motionLevel setting.
Definition: VideoInputFfmpeg.h:93
size_t height() const
Return the height of the webcam&#39;s frame.
Definition: VideoInputFfmpeg.h:73
void setMotionLevel(int m)
Set the amount of motion required before notifying the core.
Definition: VideoInputFfmpeg.h:90
void setQuality(int q)
Set the quality of the webcam.
Definition: VideoInputFfmpeg.h:110
int quality() const
Return the current quality of the webcam.
Definition: VideoInputFfmpeg.h:113
size_t bandwidth() const
The maximum available bandwidth for outgoing connections.
Definition: VideoInputFfmpeg.h:56
Definition: VideoInputFfmpeg.h:32
void mute(bool m)
Definition: VideoInputFfmpeg.h:101
const std::string & name() const
Return the name of this webcam.
Definition: VideoInputFfmpeg.h:107
static void getNames(std::vector< std::string > &)
Definition: VideoInputFfmpeg.h:45
double activityLevel() const
Return the current activity level of the webcam.
Definition: VideoInputFfmpeg.h:51
Definition: GnashKey.h:159
double fps() const
The maximum FPS rate of the webcam.
Definition: VideoInputFfmpeg.h:70
bool play()
Function starts up the pipeline designed earlier in code execution. This puts everything into motion...
void setBandwidth(size_t bandwidth)
Set the bandwidth for outgoing connections.
Definition: VideoInputFfmpeg.h:58