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 =========================================================================*/
31 #ifndef vtkWin32VideoSource_h
32 #define vtkWin32VideoSource_h
33 
34 #include "vtkIOVideoModule.h" // For export macro
35 #include "vtkVideoSource.h"
36 
37 class vtkWin32VideoSourceInternal;
38 
39 class VTKIOVIDEO_EXPORT vtkWin32VideoSource : public vtkVideoSource
40 {
41 public:
42  static vtkWin32VideoSource *New();
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
49  void Record() override;
50 
54  void Play() override;
55 
59  void Stop() override;
60 
64  void Grab() override;
65 
67 
70  void SetFrameSize(int x, int y, int z) override;
71  void SetFrameSize(int dim[3]) override {
72  this->SetFrameSize(dim[0], dim[1], dim[2]); };
74 
78  void SetFrameRate(float rate) override;
79 
83  void SetOutputFormat(int format) override;
84 
86 
89  void SetPreview(int p);
90  vtkBooleanMacro(Preview,int);
91  vtkGetMacro(Preview,int);
93 
97  void VideoFormatDialog();
98 
102  void VideoSourceDialog();
103 
108  void Initialize() override;
109 
114  void ReleaseSystemResources() override;
115 
117 
120  void LocalInternalGrab(void*);
121  void OnParentWndDestroy();
123 
124 protected:
127 
128  char WndClassName[16];
130  int Preview;
131 
132  vtkWin32VideoSourceInternal *Internal;
133 
134  void CheckBuffer();
135  void UnpackRasterLine(char *outptr, char *inptr,
136  int start, int count) override;
137 
138  void DoVFWFormatSetup();
139  void DoVFWFormatCheck();
140 
141 private:
142  vtkWin32VideoSource(const vtkWin32VideoSource&) = delete;
143  void operator=(const vtkWin32VideoSource&) = delete;
144 };
145 
146 #endif
147 
148 
149 
150 
151 
virtual void Stop()
Stop recording or playing.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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 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).
void SetFrameSize(int dim[3]) override
Request a particular frame size (set the third value to 1).