VTK  9.1.0
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
37class vtkWin32VideoSourceInternal;
38
39class VTKIOVIDEO_EXPORT vtkWin32VideoSource : public vtkVideoSource
40{
41public:
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 { this->SetFrameSize(dim[0], dim[1], dim[2]); }
73
77 void SetFrameRate(float rate) override;
78
82 void SetOutputFormat(int format) override;
83
85
88 void SetPreview(int p);
89 vtkBooleanMacro(Preview, int);
90 vtkGetMacro(Preview, int);
92
97
102
107 void Initialize() override;
108
113 void ReleaseSystemResources() override;
114
116
119 void LocalInternalGrab(void*);
122
123protected:
126
127 char WndClassName[16];
130
131 vtkWin32VideoSourceInternal* Internal;
132
134 void UnpackRasterLine(char* outptr, char* inptr, int start, int count) override;
135
138
139private:
141 void operator=(const vtkWin32VideoSource&) = delete;
142};
143
144#endif
a simple class to control print indentation
Definition: vtkIndent.h:113
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.