User Manual, Developers Guide and API Documentation

Video.hpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002  * This file is part of openWNS (open Wireless Network Simulator)
00003  * _____________________________________________________________________________
00004  *
00005  * Copyright (C) 2004-2007
00006  * Chair of Communication Networks (ComNets)
00007  * Kopernikusstr. 5, D-52074 Aachen, Germany
00008  * phone: ++49-241-80-27910,
00009  * fax: ++49-241-80-22242
00010  * email: info@openwns.org
00011  * www: http://www.openwns.org
00012  * _____________________________________________________________________________
00013  *
00014  * openWNS is free software; you can redistribute it and/or modify it under the
00015  * terms of the GNU Lesser General Public License version 2 as published by the
00016  * Free Software Foundation;
00017  *
00018  * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY
00019  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
00020  * A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00021  * details.
00022  *
00023  * You should have received a copy of the GNU Lesser General Public License
00024  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00025  *
00026  ******************************************************************************/
00027 
00028 #ifndef APPLICATIONS_SESSION_SERVER_VIDEO_HPP
00029 #define APPLICATIONS_SESSION_SERVER_VIDEO_HPP
00030 
00031 #include <APPLICATIONS/session/server/Session.hpp>
00032 
00033 namespace applications { namespace session { namespace server {
00034       class Video :
00035     public applications::session::server::Session
00036       {
00037       public:
00038     Video(const wns::pyconfig::View& _pyco);
00039     virtual ~Video();
00040 
00041     void logNormalProjectedFarima(std::deque<double> _x, std::deque<double> _phiold, double _y,
00042                       double _phi, double _theta, double _m, double _sqrValue,
00043                       double _variance, int _k, double _logMean, double _logStd);
00044     void logNormalPDF(double _logMean, double _logStd);
00045     void logNormalProjectedAR(double _y, double _phi, double _m, double _sqrValue,
00046                   int _k, double _logMean, double _logStd);
00047     void logNormalProjectedARMA(double _y, double _phi, double _theta, double _m,
00048                     double _sqrValue, int _k, double _logMean, double _logStd);
00049     void logNormalProjectedFDN(std::deque<double> _x, std::deque<double> _phiold, double _y,
00050                    double _phi, double _theta, double _m, double _sqrValue,
00051                    double _variance, int _k, double _logMean, double _logStd);
00052     void videoAR(double _y, double _phi, double _logMean, double _logStd);
00053     void videoFARIMA(std::deque<double> _x, std::deque<double> _phiold, double _y, double _phi,
00054              double _theta, double _variance, int _k, double _logMean, double _logStd);
00055     void videoFDN(std::deque<double> _x, std::deque<double> _phiold, double _y, double _variance,
00056               int _k, double _logMean, double _logStd);
00057 
00058     void
00059     onData(const wns::osi::PDUPtr& _pdu);
00060 
00061     void
00062     onTimeout(const Timeout& _t);
00063 
00064     void
00065     calculateSLRangeDependency();
00066 
00067       protected:
00068     int i;
00069     int j;
00070     int idx;
00071     int limit;
00072     /*****Video Related*****/
00073     wns::simulator::Time videoPacketIat;
00074     int videoFrameRate;
00075 
00076     /***** I Frame Generating*****/
00077     double fracI;
00078     double hurstI;
00079     int kI;
00080     std::deque<double> autocorrI;
00081     std::deque<double> phiInew;
00082     std::deque<double> phiIold;
00083     double pI;
00084     double nI;
00085     double dI;
00086     /* According to "WIMAX System Evaluation Methodologie, Version 1.0, 30.01.2007",
00087        the I-frame packetsize is Lognormal distributed. */
00088     wns::distribution::Distribution* logNormDisI;
00089     double logNormValueI;
00090     double logMeanI;
00091     double logStdI;
00092     double meanI;
00093     double varianceI;
00094     std::deque<double> xI;
00095     double yI;
00096     double phiI;
00097     double thetaI;
00098     double mI;
00099     double sqrValueI;
00100 
00101     /***** B Frame Generating*****/
00102     double fracB;
00103     double hurstB;
00104     int kB;
00105     std::deque<double> autocorrB;
00106     std::deque<double> phiBnew;
00107     std::deque<double> phiBold;
00108     double pB;
00109     double nB;
00110     double dB;
00111     /* According to "WIMAX System Evaluation Methodologie, Version 1.0, 30.01.2007",
00112        the B-frame packetsize is Lognormal  distributed. */
00113     wns::distribution::Distribution* logNormDisB;
00114     double logNormValueB;
00115     double logMeanB;
00116     double logStdB;
00117     double meanB;
00118     double varianceB;
00119     std::deque<double> xB;
00120     double yB;
00121     double phiB;
00122     double thetaB;
00123     double mB;
00124     double sqrValueB;
00125 
00126     /***** P Frame Generating*****/
00127     double fracP;
00128     double hurstP;
00129     int kP;
00130     std::deque<double> autocorrP;
00131     std::deque<double> phiPnew;
00132     std::deque<double> phiPold;
00133     double pP;
00134     double nP;
00135     double dP;
00136     /* According to "WIMAX System Evaluation Methodologie, Version 1.0, 30.01.2007",
00137        the P-frame packetsize is Lognormal  distributed. */
00138     wns::distribution::Distribution* logNormDisP;
00139     double logNormValueP;
00140     double logMeanP;
00141     double logStdP;
00142     double meanP;
00143     double varianceP;
00144     std::deque<double> xP;
00145     double yP;
00146     double phiP;
00147     double thetaP;
00148     double mP;
00149     double sqrValueP;
00150 
00151       private:
00152     /*****Video Related*****/
00153     bool byteFlag;
00154     std::string frameGeneratingProcess;
00155 
00156     /* Used in methods */
00157     double mean;
00158     int n;
00159     wns::distribution::Distribution* logNormDis;
00160     double logNormValue;
00161     wns::distribution::Distribution* normDis;
00162     double normValue;
00163     double normMean;
00164     double normStd;
00165     double projection;
00166     double value;
00167     double logNormVariance;
00168 
00169     int bFrameCounter;
00170     int gopCounter;
00171     bool newGOP;
00172 
00173     bool firstPacketNumber;
00174 
00175       };
00176     } // namespace server
00177   } // namespace session
00178 } // namespace applications
00179 
00180 #endif //APPLICATIONS_SESSION_SERVER_VIDEO_HPP

Generated on Sun May 27 03:32:16 2012 for openWNS by  doxygen 1.5.5