VTK  9.3.1
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:
31  static vtkWin32VideoSource* New();
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 
85  void VideoFormatDialog();
86 
90  void VideoSourceDialog();
91 
96  void Initialize() override;
97 
102  void ReleaseSystemResources() override;
103 
105 
108  void LocalInternalGrab(void*);
109  void OnParentWndDestroy();
111 
112 protected:
114  ~vtkWin32VideoSource() override;
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 
125  void DoVFWFormatSetup();
126  void DoVFWFormatCheck();
127 
128 private:
129  vtkWin32VideoSource(const vtkWin32VideoSource&) = delete;
130  void operator=(const vtkWin32VideoSource&) = delete;
131 };
132 
133 VTK_ABI_NAMESPACE_END
134 #endif
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:28
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).