Gnash  0.8.11dev
VideoInput.h
Go to the documentation of this file.
1 // VideoInput.h: Video input base class.
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_VIDEOINPUT_H
21 #define GNASH_VIDEOINPUT_H
22 
23 #include <cstdint> // for C99 int types
24 #include <string>
25 
26 #include "dsodefs.h" //DSOEXPORT
27 
28 namespace gnash {
29 namespace media {
30 
32 //
34 //
37 //
42 //
47 class VideoInput {
48 
49 public:
50 
52 
53  // virtual classes need a virtual destructor !
54  virtual ~VideoInput() {}
55 
57  //
60  virtual double activityLevel() const = 0;
61 
63  //
65  virtual size_t bandwidth() const = 0;
66 
68  virtual void setBandwidth(size_t bandwidth) = 0;
69 
71  //
73  virtual double currentFPS() const = 0;
74 
76  //
78  virtual double fps() const = 0;
79 
81  virtual size_t height() const = 0;
82 
84  virtual size_t width() const = 0;
85 
87  virtual size_t index() const = 0;
88 
90  //
95  virtual void requestMode(size_t width, size_t height, double fps,
96  bool favorArea) = 0;
97 
99  virtual void setMotionLevel(int m) = 0;
100 
102  virtual int motionLevel() const = 0;
103 
105  virtual void setMotionTimeout(int m) = 0;
106 
108  virtual int motionTimeout() const = 0;
109 
110  virtual void mute(bool m) = 0;
111  virtual bool muted() const = 0;
112 
114  //
116  virtual const std::string& name() const = 0;
117 
119  virtual void setQuality(int q) = 0;
120 
122  virtual int quality() const = 0;
123 
124 };
125 
126 
127 } // media namespace
128 } // gnash namespace
129 
130 #endif
DSOEXPORT VideoInput()
Definition: VideoInput.h:51
virtual double currentFPS() const =0
The current frame rate of the webcam.
Definition: GnashKey.h:163
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
virtual size_t height() const =0
Return the height of the webcam&#39;s frame.
virtual int motionLevel() const =0
Return the current motionLevel setting.
virtual void setMotionLevel(int m)=0
Set the amount of motion required before notifying the core.
This is the interface for video input devices.
Definition: VideoInput.h:47
virtual void requestMode(size_t width, size_t height, double fps, bool favorArea)=0
Request a native mode most closely matching the passed variables.
virtual void setBandwidth(size_t bandwidth)=0
Set the bandwidth for outgoing connections.
virtual ~VideoInput()
Definition: VideoInput.h:54
virtual size_t bandwidth() const =0
The maximum available bandwidth for outgoing connections.
#define DSOEXPORT
Definition: dsodefs.h:55
virtual int motionTimeout() const =0
Return the current motionTimeout setting.
virtual void setMotionTimeout(int m)=0
Set time without motion in milliseconds before core is notified.
virtual void setQuality(int q)=0
Set the quality of the webcam.
virtual double activityLevel() const =0
Return the current activity level of the webcam.
virtual const std::string & name() const =0
Return the name of this webcam.
virtual size_t index() const =0
The index of the camera.
virtual double fps() const =0
The maximum FPS rate of the webcam.
Definition: GnashKey.h:159
virtual int quality() const =0
Return the current quality of the webcam.
virtual size_t width() const =0
Return the width of the webcam&#39;s frame.
virtual void mute(bool m)=0
virtual bool muted() const =0