 |
VTK
9.1.0
|
Go to the documentation of this file.
27 #ifndef vtkFFMPEGVideoSource_h
28 #define vtkFFMPEGVideoSource_h
30 #include "vtkIOFFMPEGModule.h"
34 #include <condition_variable>
38 class vtkFFMPEGVideoSourceInternal;
141 vtkGetMacro(EndOfFile,
bool);
144 vtkGetMacro(Stereo3D,
bool);
156 this->AudioCallback = cb;
157 this->AudioCallbackClientData = clientData;
169 this->VideoCallback = cb;
170 this->VideoCallbackClientData = clientData;
179 vtkSetMacro(DecodingThreads,
int);
180 vtkGetMacro(DecodingThreads,
int);
void * DrainAudio(vtkMultiThreader::ThreadInfo *data)
std::function< void(vtkFFMPEGVideoSourceVideoCallbackData const &data)> VideoCallbackType
VideoCallbackType VideoCallback
void * Drain(vtkMultiThreader::ThreadInfo *data)
void SetFrameSize(int dim[3]) override
Request a particular frame size (set the third value to 1).
Reader for ffmpeg supported formats.
vtkSetFilePathMacro(FileName)
Specify file name of the video.
std::condition_variable_any FeedAudioCondition
void SetVideoCallback(VideoCallbackType cb, void *clientData)
void * AudioCallbackClientData
This is the structure that is passed to the thread that is created from the SingleMethodExecute,...
void SetFrameRate(float rate) override
Request a particular frame rate (default 30 frames per second).
static void * DrainAudioThread(vtkMultiThreader::ThreadInfo *data)
void Record() override
Standard VCR functionality: Record incoming video.
std::function< void(vtkFFMPEGVideoSourceAudioCallbackData const &data)> AudioCallbackType
void Stop() override
Standard VCR functionality: Stop recording or playing.
void * Feed(vtkMultiThreader::ThreadInfo *data)
void Play() override
Standard VCR functionality: Play recorded video.
vtkFFMPEGVideoSource * Caller
void ReleaseSystemResources() override
Free the driver (this is called automatically inside the destructor).
void Grab() override
Grab a single video frame.
a simple class to control print indentation
~vtkFFMPEGVideoSource() override
vtkFFMPEGVideoSource * Caller
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void InternalGrab() override
The internal function which actually does the grab.
void SetFrameSize(int x, int y, int z) override
Request a particular frame size (set the third value to 1).
std::mutex FeedAudioMutex
static vtkFFMPEGVideoSource * New()
std::condition_variable_any FeedCondition
void SetOutputFormat(int format) override
Request a particular output format (default: VTK_RGB).
void Initialize() override
Initialize the driver (this is called automatically when the first grab is done).
void * VideoCallbackClientData
static void * FeedThread(vtkMultiThreader::ThreadInfo *data)
static void * DrainThread(vtkMultiThreader::ThreadInfo *data)
AudioCallbackType AudioCallback
void SetAudioCallback(AudioCallbackType cb, void *clientData)
vtkGetFilePathMacro(FileName)
Specify file name of the video.
vtkFFMPEGVideoSourceInternal * Internal
Superclass of video input devices for VTK.