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