30 #ifndef vtkFFMPEGVideoSource_h
31 #define vtkFFMPEGVideoSource_h
33 #include "vtkIOFFMPEGModule.h"
37 #include <condition_variable>
41 class vtkFFMPEGVideoSourceInternal;
131 vtkSetFilePathMacro(FileName);
132 vtkGetFilePathMacro(FileName);
144 vtkGetMacro(EndOfFile,
bool);
147 vtkGetMacro(Stereo3D,
bool);
156 typedef std::function<void(vtkFFMPEGVideoSourceAudioCallbackData const& data)>
AudioCallbackType;
159 this->AudioCallback = cb;
160 this->AudioCallbackClientData = clientData;
169 typedef std::function<void(vtkFFMPEGVideoSourceVideoCallbackData const& data)>
VideoCallbackType;
172 this->VideoCallback = cb;
173 this->VideoCallbackClientData = clientData;
182 vtkSetMacro(DecodingThreads,
int);
183 vtkGetMacro(DecodingThreads,
int);
VideoCallbackType VideoCallback
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.
void SetAudioCallback(AudioCallbackType cb, void *clientData)
std::function< void(vtkFFMPEGVideoSourceVideoCallbackData const &data)> VideoCallbackType
std::condition_variable_any FeedCondition
virtual void Initialize()
Initialize the hardware.
vtkFFMPEGVideoSource * Caller
std::function< void(vtkFFMPEGVideoSourceAudioCallbackData const &data)> AudioCallbackType
AudioCallbackType AudioCallback
vtkFFMPEGVideoSourceInternal * Internal
This is the structure that is passed to the thread that is created from the SingleMethodExecute, MultipleMethodExecute or the SpawnThread method.
void SetFrameSize(int dim[3]) override
Request a particular frame size (set the third value to 1).
Superclass of video input devices for VTK.
std::mutex FeedAudioMutex
virtual void ReleaseSystemResources()
Release the video driver.
std::condition_variable_any FeedAudioCondition
a simple class to control print indentation
virtual void Record()
Record incoming video at the specified FrameRate.
Reader for ffmpeg supported formats.
void * VideoCallbackClientData
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.
vtkFFMPEGVideoSource * Caller
void * AudioCallbackClientData
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).
virtual void InternalGrab()
The internal function which actually does the grab.
void SetVideoCallback(VideoCallbackType cb, void *clientData)