VTK  9.0.1
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 { 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 
96  void VideoFormatDialog();
97 
101  void VideoSourceDialog();
102 
107  void Initialize() override;
108 
113  void ReleaseSystemResources() override;
114 
116 
119  void LocalInternalGrab(void*);
120  void OnParentWndDestroy();
122 
123 protected:
125  ~vtkWin32VideoSource() override;
126 
127  char WndClassName[16];
129  int Preview;
130 
131  vtkWin32VideoSourceInternal* Internal;
132 
133  void CheckBuffer();
134  void UnpackRasterLine(char* outptr, char* inptr, int start, int count) override;
135 
136  void DoVFWFormatSetup();
137  void DoVFWFormatCheck();
138 
139 private:
140  vtkWin32VideoSource(const vtkWin32VideoSource&) = delete;
141  void operator=(const vtkWin32VideoSource&) = delete;
142 };
143 
144 #endif
vtkVideoSource::Play
virtual void Play()
Play through the 'tape' sequentially at the specified frame rate.
vtkVideoSource::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkWin32VideoSource::BitMapSize
int BitMapSize
Definition: vtkWin32VideoSource.h:128
vtkWin32VideoSource::SetFrameSize
void SetFrameSize(int dim[3]) override
Definition: vtkWin32VideoSource.h:71
vtkVideoSource.h
vtkVideoSource::UnpackRasterLine
virtual void UnpackRasterLine(char *outPtr, char *rowPtr, int start, int count)
vtkVideoSource::Stop
virtual void Stop()
Stop recording or playing.
vtkVideoSource::ReleaseSystemResources
virtual void ReleaseSystemResources()
Release the video driver.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkVideoSource::New
static vtkVideoSource * New()
vtkVideoSource::SetOutputFormat
virtual void SetOutputFormat(int format)
Set the output format.
vtkWin32VideoSource::Internal
vtkWin32VideoSourceInternal * Internal
Definition: vtkWin32VideoSource.h:131
vtkVideoSource::Grab
virtual void Grab()
Grab a single video frame.
vtkWin32VideoSource::Preview
int Preview
Definition: vtkWin32VideoSource.h:129
vtkVideoSource::SetFrameRate
virtual void SetFrameRate(float rate)
Request a particular frame rate (default 30 frames per second).
vtkVideoSource::SetFrameSize
virtual void SetFrameSize(int x, int y, int z)
Set the full-frame size.
vtkWin32VideoSource
Video-for-Windows video digitizer.
Definition: vtkWin32VideoSource.h:39
vtkVideoSource::Record
virtual void Record()
Record incoming video at the specified FrameRate.
vtkVideoSource::Initialize
virtual void Initialize()
Initialize the hardware.
vtkVideoSource
Superclass of video input devices for VTK.
Definition: vtkVideoSource.h:43