VTK
vtkWin32VideoSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkWin32VideoSource.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
34 #ifndef vtkWin32VideoSource_h
35 #define vtkWin32VideoSource_h
36 
37 #include "vtkIOVideoModule.h" // For export macro
38 #include "vtkVideoSource.h"
39 
40 class vtkWin32VideoSourceInternal;
41 
42 class VTKIOVIDEO_EXPORT vtkWin32VideoSource : public vtkVideoSource
43 {
44 public:
45  static vtkWin32VideoSource *New();
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
52  void Record();
53 
57  void Play();
58 
62  void Stop();
63 
67  void Grab();
68 
70 
73  void SetFrameSize(int x, int y, int z);
74  virtual void SetFrameSize(int dim[3]) {
75  this->SetFrameSize(dim[0], dim[1], dim[2]); };
77 
81  void SetFrameRate(float rate);
82 
86  void SetOutputFormat(int format);
87 
89 
92  void SetPreview(int p);
93  vtkBooleanMacro(Preview,int);
94  vtkGetMacro(Preview,int);
96 
100  void VideoFormatDialog();
101 
105  void VideoSourceDialog();
106 
111  void Initialize();
112 
117  void ReleaseSystemResources();
118 
120 
123  void LocalInternalGrab(void*);
124  void OnParentWndDestroy();
126 
127 protected:
130 
131  char WndClassName[16];
133  int Preview;
134 
135  vtkWin32VideoSourceInternal *Internal;
136 
137  void CheckBuffer();
138  void UnpackRasterLine(char *outptr, char *inptr,
139  int start, int count);
140 
141  void DoVFWFormatSetup();
142  void DoVFWFormatCheck();
143 
144 private:
145  vtkWin32VideoSource(const vtkWin32VideoSource&) VTK_DELETE_FUNCTION;
146  void operator=(const vtkWin32VideoSource&) VTK_DELETE_FUNCTION;
147 };
148 
149 #endif
150 
151 
152 
153 
154 
virtual void Stop()
Stop recording or playing.
Video-for-Windows video digitizer.
virtual void Initialize()
Initialize the hardware.
Superclass of video input devices for VTK.
virtual void ReleaseSystemResources()
Release the video driver.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void Record()
Record incoming video at the specified FrameRate.
virtual void UnpackRasterLine(char *outPtr, char *rowPtr, int start, int count)
These methods can be overridden in subclasses.
virtual void SetOutputFormat(int format)
Set the output format.
static vtkVideoSource * New()
virtual void SetFrameSize(int dim[3])
Request a particular frame size (set the third value to 1).
virtual void SetFrameSize(int x, int y, int z)
Set the full-frame size.
vtkWin32VideoSourceInternal * Internal
virtual void Play()
Play through the 'tape' sequentially at the specified frame rate.
virtual void Grab()
Grab a single video frame.
virtual void SetFrameRate(float rate)
Request a particular frame rate (default 30 frames per second).
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.