AGX Dynamics  2.35.0.1
agxQt::VideoCapture Class Reference

#include <VideoCapture.h>

+ Inheritance diagram for agxQt::VideoCapture:

Public Member Functions

 VideoCapture (QtAgxWrapper *wrapper)
 Default constructor. More...
 
void finalizeVideo ()
 Finalizes the current video process by completing the video file and closing down the video capture process. More...
 
agx::String getCompleteFileName () const
 Get the filename, including the postfix, of the video file that should be generated. More...
 
agx::String getFileNameWithoutPostFix () const
 Get the filename, without the postfix, of the video file that should be generated. More...
 
agx::UInt getNumGeneratedImages ()
 Returns the number of generated video frames. More...
 
agx::Real getQuality ()
 Get the quality of the video which is a normalized value between 0.0-1.0. More...
 
agx::Real getRealTimeFactor () const
 Get the real time factor of the video, which is the ratio between the video FPS and image capture FPS example: videoFPS(60Hz) / imageFPS(30Hz) More...
 
agx::Real getVideoFPS () const
 Get the desired video frame rate of the capture. More...
 
bool hasActiveVideo ()
 Returns true if there is an active video capture process, otherwise false. More...
 
void setCompleteFileName (const std::string &filename)
 Set the complete filename of the video file that should be generated, including postfix. More...
 
void setEnableSyncWithSimulation (bool enable)
 Set to true/false if the video capture should synchronize with simulation time stepping. More...
 
void setQuality (agx::Real quality)
 Set the quality of the video which is a normalized value between 0.0-1.0. More...
 
void setRealTimeFactor (agx::Real factor)
 Set the real time factor of the video, which is the ratio between the video FPS and image capture FPS example: videoFPS(60Hz) / imageFPS(30Hz) More...
 
void setSimulation (agxSDK::Simulation *simulation)
 Set the simulation that the video capture should synchronize with. More...
 
void setVideoFPS (agx::Real fps)
 Set the desired video frame rate of the capture. More...
 
void setVideoResolution (const agx::Vec2u &resolution)
 Set the resolution of the video that is to be generated. More...
 
void startCapture ()
 Starts or resumes the video capture. More...
 
void stopCapture ()
 Pauses the video capture, if active. More...
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor. More...
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object. More...
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 

Protected Member Functions

virtual ~VideoCapture ()
 Protected destructor. More...
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor. More...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

Protected Attributes

agx::UInt m_imageNumber
 
QtAgxWrapper * m_qtagxWrapper
 
agx::Real m_quality
 
agx::Real m_realTimeFactor
 
agxOSG::RenderToTextureRef m_renderToTexture
 
agx::ref_ptr< agxOSG::VideoFFMPEGPipeCapture > m_videoCapture
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Additional Inherited Members

- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More...
 

Detailed Description

Definition at line 41 of file agxQt/VideoCapture.h.

Constructor & Destructor Documentation

◆ VideoCapture()

agxQt::VideoCapture::VideoCapture ( QtAgxWrapper *  wrapper)

Default constructor.

◆ ~VideoCapture()

virtual agxQt::VideoCapture::~VideoCapture ( )
protectedvirtual

Protected destructor.

Member Function Documentation

◆ finalizeVideo()

void agxQt::VideoCapture::finalizeVideo ( )

Finalizes the current video process by completing the video file and closing down the video capture process.

Will call stopCapture() internally.

◆ getCompleteFileName()

agx::String agxQt::VideoCapture::getCompleteFileName ( ) const

Get the filename, including the postfix, of the video file that should be generated.

◆ getFileNameWithoutPostFix()

agx::String agxQt::VideoCapture::getFileNameWithoutPostFix ( ) const

Get the filename, without the postfix, of the video file that should be generated.

◆ getNumGeneratedImages()

agx::UInt agxQt::VideoCapture::getNumGeneratedImages ( )

Returns the number of generated video frames.

◆ getQuality()

agx::Real agxQt::VideoCapture::getQuality ( )

Get the quality of the video which is a normalized value between 0.0-1.0.

This is typically converted into a CRF value if h264 is used in video generation.

◆ getRealTimeFactor()

agx::Real agxQt::VideoCapture::getRealTimeFactor ( ) const

Get the real time factor of the video, which is the ratio between the video FPS and image capture FPS example: videoFPS(60Hz) / imageFPS(30Hz)

◆ getVideoFPS()

agx::Real agxQt::VideoCapture::getVideoFPS ( ) const

Get the desired video frame rate of the capture.

◆ hasActiveVideo()

bool agxQt::VideoCapture::hasActiveVideo ( )

Returns true if there is an active video capture process, otherwise false.

◆ setCompleteFileName()

void agxQt::VideoCapture::setCompleteFileName ( const std::string &  filename)

Set the complete filename of the video file that should be generated, including postfix.

◆ setEnableSyncWithSimulation()

void agxQt::VideoCapture::setEnableSyncWithSimulation ( bool  enable)

Set to true/false if the video capture should synchronize with simulation time stepping.

◆ setQuality()

void agxQt::VideoCapture::setQuality ( agx::Real  quality)

Set the quality of the video which is a normalized value between 0.0-1.0.

This is typically converted into a CRF value if h264 is used in video generation.

◆ setRealTimeFactor()

void agxQt::VideoCapture::setRealTimeFactor ( agx::Real  factor)

Set the real time factor of the video, which is the ratio between the video FPS and image capture FPS example: videoFPS(60Hz) / imageFPS(30Hz)

◆ setSimulation()

void agxQt::VideoCapture::setSimulation ( agxSDK::Simulation *  simulation)

Set the simulation that the video capture should synchronize with.

◆ setVideoFPS()

void agxQt::VideoCapture::setVideoFPS ( agx::Real  fps)

Set the desired video frame rate of the capture.

◆ setVideoResolution()

void agxQt::VideoCapture::setVideoResolution ( const agx::Vec2u &  resolution)

Set the resolution of the video that is to be generated.

◆ startCapture()

void agxQt::VideoCapture::startCapture ( )

Starts or resumes the video capture.

◆ stopCapture()

void agxQt::VideoCapture::stopCapture ( )

Pauses the video capture, if active.

Member Data Documentation

◆ m_imageNumber

agx::UInt agxQt::VideoCapture::m_imageNumber
protected

Definition at line 150 of file agxQt/VideoCapture.h.

◆ m_qtagxWrapper

QtAgxWrapper* agxQt::VideoCapture::m_qtagxWrapper
protected

Definition at line 148 of file agxQt/VideoCapture.h.

◆ m_quality

agx::Real agxQt::VideoCapture::m_quality
protected

Definition at line 153 of file agxQt/VideoCapture.h.

◆ m_realTimeFactor

agx::Real agxQt::VideoCapture::m_realTimeFactor
protected

Definition at line 152 of file agxQt/VideoCapture.h.

◆ m_renderToTexture

agxOSG::RenderToTextureRef agxQt::VideoCapture::m_renderToTexture
protected

Definition at line 151 of file agxQt/VideoCapture.h.

◆ m_videoCapture

agx::ref_ptr<agxOSG::VideoFFMPEGPipeCapture> agxQt::VideoCapture::m_videoCapture
protected

Definition at line 149 of file agxQt/VideoCapture.h.


The documentation for this class was generated from the following file: