VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkWin32VideoSource.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00033 #ifndef __vtkWin32VideoSource_h 00034 #define __vtkWin32VideoSource_h 00035 00036 #include "vtkIOVideoModule.h" // For export macro 00037 #include "vtkVideoSource.h" 00038 00039 class vtkWin32VideoSourceInternal; 00040 00041 class VTKIOVIDEO_EXPORT vtkWin32VideoSource : public vtkVideoSource 00042 { 00043 public: 00044 static vtkWin32VideoSource *New(); 00045 vtkTypeMacro(vtkWin32VideoSource,vtkVideoSource); 00046 void PrintSelf(ostream& os, vtkIndent indent); 00047 00049 void Record(); 00050 00052 void Play(); 00053 00055 void Stop(); 00056 00058 void Grab(); 00059 00061 00062 void SetFrameSize(int x, int y, int z); 00063 virtual void SetFrameSize(int dim[3]) { 00064 this->SetFrameSize(dim[0], dim[1], dim[2]); }; 00066 00068 void SetFrameRate(float rate); 00069 00071 void SetOutputFormat(int format); 00072 00074 00075 void SetPreview(int p); 00076 vtkBooleanMacro(Preview,int); 00077 vtkGetMacro(Preview,int); 00079 00081 void VideoFormatDialog(); 00082 00084 void VideoSourceDialog(); 00085 00088 void Initialize(); 00089 00091 void ReleaseSystemResources(); 00092 00094 00095 void LocalInternalGrab(void*); 00096 void OnParentWndDestroy(); 00098 00099 protected: 00100 vtkWin32VideoSource(); 00101 ~vtkWin32VideoSource(); 00102 00103 char WndClassName[16]; 00104 int BitMapSize; 00105 int Preview; 00106 00107 vtkWin32VideoSourceInternal *Internal; 00108 00109 void CheckBuffer(); 00110 void UnpackRasterLine(char *outptr, char *inptr, 00111 int start, int count); 00112 00113 void DoVFWFormatSetup(); 00114 void DoVFWFormatCheck(); 00115 00116 private: 00117 vtkWin32VideoSource(const vtkWin32VideoSource&); // Not implemented. 00118 void operator=(const vtkWin32VideoSource&); // Not implemented. 00119 }; 00120 00121 #endif 00122 00123 00124 00125 00126