Gnash  0.8.10
VideoInputFfmpeg.h
Go to the documentation of this file.
00001 // VideoInputFfmpeg.h: Video input processing using Gstreamer
00002 // 
00003 //   Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
00004 //   Free Software Foundation, Inc.
00005 // 
00006 // This program is free software; you can redistribute it and/or modify
00007 // it under the terms of the GNU General Public License as published by
00008 // the Free Software Foundation; either version 3 of the License, or
00009 // (at your option) any later version.
00010 // 
00011 // This program is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU General Public License
00017 // along with this program; if not, write to the Free Software
00018 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019 
00020 #ifndef GNASH_VIDEOINPUTFFMPEG_H
00021 #define GNASH_VIDEOINPUTFFMPEG_H
00022 
00023 #include <vector>
00024 #include <boost/cstdint.hpp> // for C99 int types
00025 #include <vector>
00026 #include "VideoInput.h"
00027 
00028 namespace gnash {
00029 namespace media {
00030 namespace ffmpeg {
00031 
00032 class VideoInputFfmpeg : public VideoInput
00033 {
00034 public:
00035 
00037     //
00040     VideoInputFfmpeg();
00041     
00043     virtual ~VideoInputFfmpeg();
00044     
00045     static void getNames(std::vector<std::string>& /*names*/) {}
00046     
00048     //
00051     double activityLevel () const { return _activityLevel; }
00052     
00054     //
00056     size_t bandwidth() const { return _bandwidth; }
00057     
00058     void setBandwidth(size_t bandwidth) {
00059         _bandwidth = bandwidth;
00060     }
00061 
00063     //
00065     double currentFPS() const { return _currentFPS; }
00066     
00068     //
00070     double fps() const { return _fps; }
00071 
00073     size_t height() const { return _height; }
00074     
00076     size_t width() const { return _width; }
00077     
00079     size_t index() const { return _index; }
00080     
00082     //
00087     void requestMode(size_t width, size_t height, double fps, bool favorArea);
00088 
00090     void setMotionLevel(int m) { _motionLevel = m; }
00091 
00093     int motionLevel() const { return _motionLevel; }
00094     
00096     void setMotionTimeout(int m) { _motionTimeout = m; }
00097 
00099     int motionTimeout() const { return _motionTimeout; }
00100     
00101     void mute(bool m) { _muted = m; }
00102     bool muted() const { return _muted; }
00103     
00105     //
00107     const std::string& name() const { return _name; }
00108 
00110     void setQuality(int q) { _quality = q; }
00111 
00113     int quality() const { return _quality; }
00114     
00119     bool play();
00120     
00124     bool stop();
00125     
00126 private:
00127 
00131 
00134     double _activityLevel;
00135 
00138     size_t _bandwidth;
00139 
00142     double _currentFPS;
00143 
00145     double _fps;
00146 
00149     size_t _height;
00150 
00153     size_t _width;
00154 
00156     size_t _index;
00157 
00159     int _motionLevel;
00160 
00162     int _motionTimeout;
00163 
00166     bool _muted;
00167 
00169     std::string _name;
00170 
00172     int _quality;
00173 
00174 };
00175 
00176 
00177 } // ffmpeg namespace
00178 } // media namespace 
00179 } // gnash namespace
00180 
00181 #endif