include/avcap/windows/DS_FormatManager.h

Go to the documentation of this file.
00001 /*
00002  * (c) 2005, 2008 Nico Pranke <Nico.Pranke@googlemail.com>, Robin Luedtke <RobinLu@gmx.de> 
00003  *
00004  * This file is part of avcap.
00005  *
00006  * avcap 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  * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
00018  */
00019 
00020 /* avcap is free for non-commercial use.
00021  * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke@googlemail.com>.
00022  */
00023 
00024 #ifndef DSFORMATMANAGER_H_
00025 #define DSFORMATMANAGER_H_
00026 
00027 #include <list>
00028 #include <string>
00029 #include <Dshow.h>
00030 
00031 #ifndef _MSC_VER
00032 # include <stdint.h>
00033 #endif
00034 
00035 #include "FormatManager.h"
00036 #include "avcap-export.h"
00037 
00038 class IBaseFilter;
00039 class IPin;
00040 
00041 namespace avcap
00042 {
00043 class DS_DeviceDescriptor;
00044 
00046         
00051         class AVCAP_Export DS_FormatManager : public FormatManager
00052         {
00053         private:
00054                 DS_DeviceDescriptor* mDSDeviceDescriptor;
00055                 int                        mFrameRate;
00056 
00057         public:
00058                 DS_FormatManager(DS_DeviceDescriptor *dd);
00059 
00060                 virtual ~DS_FormatManager();
00061         
00062                 virtual int setFormat(Format *fmt);
00063         
00064                 virtual Format* getFormat();
00065         
00066                 virtual int setResolution(int w, int h);
00067         
00068                 virtual int getWidth();
00069         
00070                 virtual int getHeight();
00071         
00072                 virtual int getBytesPerLine();
00073         
00074                 virtual int setFramerate(int fps);
00075 
00076                 virtual int getFramerate();
00077 
00078                 virtual int flush();
00079         
00080                 virtual size_t getImageSize();
00081         
00082                 virtual const VideoStandard* getVideoStandard();
00083         
00084                 virtual int setVideoStandard(const VideoStandard* std);
00085         
00086                 virtual void query();
00087         
00088         private:
00089                 int getParams();
00090                 
00091                 void queryVideoStandards();
00092         
00093                 bool getVideoInfoHeader(AM_MEDIA_TYPE *MediaType,
00094                                 VIDEOINFOHEADER *VideoInfoHeader);
00095                 
00096                 bool getCurrentConnectedVideoPin(IBaseFilter *CaptureFilter,
00097                                 IPin **VideoPin);
00098         };
00099 }
00100 
00101 #endif // DSFORMATMANAGER_H_

Generated on Mon Nov 30 11:10:30 2009 for avcap-0.1 by  doxygen 1.5.1