Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

VideoDeviceWin32.h

Go to the documentation of this file.
00001 #ifndef VIDEO_DEVICE_WIN32_HPP 00002 #define VIDEO_DEVICE_WIN32_HPP 00003 00004 #include <qglobal.h> 00005 #include <qwidget.h> 00006 00007 #ifdef HAVE_CONFIG_H 00008 #include <config.h> 00009 #endif 00010 00011 #include <windows.h> 00012 #include <vfw.h> 00013 00014 #include "VideoDevice.h" 00015 00016 class CVideoDeviceWin32: public CVideoDevice 00017 { 00018 Q_OBJECT 00019 private: 00020 enum Palettes { 00021 palRGB24 = 24, 00022 palRGB32 = 32, 00023 palI420 = 0x30323449, 00024 }; 00025 00026 int m_CapIndex; 00027 HWND m_CapHandle; 00028 CAPSTATUS m_CaptureStatus; 00029 QWaitCondition m_Capturing; 00030 int m_Palette; 00031 int m_BMISize; 00032 uchar *m_pBMIBuf; 00033 BITMAPINFO *m_pVideoInfo; 00034 00035 void CreateImagesRGB(); 00036 void DeleteImagesRGB(); 00037 void CreateImagesYUV(); 00038 void DeleteImagesYUV(); 00039 00040 bool TryPalette(Palettes pal); 00041 void UpdateCaptureStatus(); 00042 00043 void DumpVideoFormat(const BITMAPINFO *info) const; 00044 void DumpCaptureParms(const CAPTUREPARMS *cp) const; 00045 void DumpCaptureStatus(const CAPSTATUS *cs = 0) const; 00046 00047 protected: 00048 virtual bool Init(); 00049 virtual void Exit(); 00050 00051 virtual bool StartCapture(); 00052 virtual void StopCapture(); 00053 00054 virtual void run(); 00055 00056 public: 00057 CVideoDeviceWin32(int index); 00058 ~CVideoDeviceWin32(); 00059 00060 virtual long GetDescriptor() const; 00061 virtual void Mute(bool on) const; 00062 00063 /* Windows only */ 00064 //bool CallbackAudioStream(int id, const QString &text); 00065 bool CallbackControl(int id); 00066 bool CallbackError(int id, const QString &text); 00067 bool CallbackStatus(int id, const QString &text); 00068 bool CallbackVideoStream(VIDEOHDR *vh); 00069 bool CallbackYield(); 00070 00071 public slots: /* overloaded slots */ 00072 void ShowDisplayDialog(); 00073 void ShowFormatDialog(); 00074 void ShowSourceDialog(); 00075 }; 00076 00077 #endif

Generated on Wed Dec 13 23:38:46 2006 for CamStream by doxygen 1.3.7