VTK  9.3.20240907
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
25VTK_ABI_NAMESPACE_BEGIN
26class vtkWin32VideoSourceInternal;
27
28class VTKIOVIDEO_EXPORT vtkWin32VideoSource : public vtkVideoSource
29{
30public:
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
112protected:
115
116 char WndClassName[16];
119
120 vtkWin32VideoSourceInternal* Internal;
121
123 void UnpackRasterLine(char* outptr, char* inptr, int start, int count) override;
124
127
128private:
130 void operator=(const vtkWin32VideoSource&) = delete;
131};
132
133VTK_ABI_NAMESPACE_END
134#endif
a simple class to control print indentation
Definition vtkIndent.h:108
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).
static vtkWin32VideoSource * New()
void SetFrameRate(float rate) override
Request a particular frame rate (default 30 frames per second).
~vtkWin32VideoSource() override
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.