VTK  9.3.0
vtkWin32VideoSource.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
19 #ifndef vtkWin32VideoSource_h
20 #define vtkWin32VideoSource_h
21 
22 #include "vtkIOVideoModule.h" // For export macro
23 #include "vtkVideoSource.h"
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 class vtkWin32VideoSourceInternal;
27 
28 class VTKIOVIDEO_EXPORT vtkWin32VideoSource : public vtkVideoSource
29 {
30 public:
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
38  void Record() override;
39 
43  void Play() override;
44 
48  void Stop() override;
49 
53  void Grab() override;
54 
56 
59  void SetFrameSize(int x, int y, int z) override;
60  void SetFrameSize(int dim[3]) override { this->SetFrameSize(dim[0], dim[1], dim[2]); }
62 
66  void SetFrameRate(float rate) override;
67 
71  void SetOutputFormat(int format) override;
72 
74 
77  void SetPreview(int p);
78  vtkBooleanMacro(Preview, int);
79  vtkGetMacro(Preview, int);
81 
86 
91 
96  void Initialize() override;
97 
102  void ReleaseSystemResources() override;
103 
105 
108  void LocalInternalGrab(void*);
111 
112 protected:
115 
116  char WndClassName[16];
118  int Preview;
119 
120  vtkWin32VideoSourceInternal* Internal;
121 
122  void CheckBuffer();
123  void UnpackRasterLine(char* outptr, char* inptr, int start, int count) override;
124 
127 
128 private:
129  vtkWin32VideoSource(const vtkWin32VideoSource&) = delete;
130  void operator=(const vtkWin32VideoSource&) = delete;
131 };
132 
133 VTK_ABI_NAMESPACE_END
134 #endif
a simple class to control print indentation
Definition: vtkIndent.h:38
Superclass of video input devices for VTK.
Video-for-Windows video digitizer.
vtkWin32VideoSourceInternal * Internal
void ReleaseSystemResources() override
Free the driver (this is called automatically inside the destructor).
void SetFrameRate(float rate) override
Request a particular frame rate (default 30 frames per second).
~vtkWin32VideoSource() override
static vtkWin32VideoSource * New()
void SetFrameSize(int dim[3]) override
Request a particular frame size (set the third value to 1).
void VideoSourceDialog()
Bring up a modal dialog box for video input selection.
void Play() override
Standard VCR functionality: Play recorded video.
void Stop() override
Standard VCR functionality: Stop recording or playing.
void SetPreview(int p)
Turn on/off the preview (overlay) window.
void VideoFormatDialog()
Bring up a modal dialog box for video format selection.
void SetOutputFormat(int format) override
Request a particular output format (default: VTK_RGB).
void OnParentWndDestroy()
For internal use only.
void Initialize() override
Initialize the driver (this is called automatically when the first grab is done).
void UnpackRasterLine(char *outptr, char *inptr, int start, int count) override
These methods can be overridden in subclasses.
void Grab() override
Grab a single video frame.
void SetFrameSize(int x, int y, int z) override
Request a particular frame size (set the third value to 1).
void LocalInternalGrab(void *)
For internal use only.
void Record() override
Standard VCR functionality: Record incoming video.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.