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 <boost/cstdint.hpp> // 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