Abstract base class for acquiring video frame data.
More...
#include <mitkVideoSource.h>
Abstract base class for acquiring video frame data.
Provides an interface for starting, stopping, and pausing video capture, as well as fetching frames and retrieving video texture data. Subclasses must implement GetVideoTexture() and typically override FetchFrame().
Definition at line 33 of file mitkVideoSource.h.
◆ VideoSource()
| mitk::VideoSource::VideoSource |
( |
| ) |
|
|
protected |
◆ ~VideoSource()
| mitk::VideoSource::~VideoSource |
( |
| ) |
|
|
overrideprotected |
deletes m_CurrentVideoTexture (if not 0)
◆ FetchFrame()
| virtual void mitk::VideoSource::FetchFrame |
( |
| ) |
|
|
virtual |
Fetch the next frame from the capture device.
In this base implementation, only the frame counter is incremented. Subclasses should override to perform actual frame acquisition.
◆ GetCapturePaused()
| virtual bool mitk::VideoSource::GetCapturePaused |
( |
| ) |
const |
|
virtual |
Query whether capturing is currently paused.
- Returns
- true if paused.
◆ GetFrameCount()
| virtual unsigned long mitk::VideoSource::GetFrameCount |
( |
| ) |
const |
|
virtual |
Get the number of frames captured since the last start.
- Returns
- The frame count.
◆ GetImageHeight()
| virtual int mitk::VideoSource::GetImageHeight |
( |
| ) |
|
|
virtual |
Get the height of the current video frame.
- Returns
- The frame height in pixels, or 0 if unknown.
◆ GetImageWidth()
| virtual int mitk::VideoSource::GetImageWidth |
( |
| ) |
|
|
virtual |
Get the width of the current video frame.
- Returns
- The frame width in pixels, or 0 if unknown.
◆ GetVideoTexture()
| virtual unsigned char* mitk::VideoSource::GetVideoTexture |
( |
| ) |
|
|
pure virtual |
Get a pointer to the current video frame pixel data.
The returned buffer is suitable for OpenGL texture upload.
- Returns
- Pointer to the RGBA/RGB pixel data array.
◆ IsCapturingEnabled()
| virtual bool mitk::VideoSource::IsCapturingEnabled |
( |
| ) |
const |
|
virtual |
Query whether video capturing is currently active.
- Returns
- true if capturing is in progress.
◆ mitkClassMacroItkParent()
| mitk::VideoSource::mitkClassMacroItkParent |
( |
VideoSource |
, |
|
|
itk::Object |
|
|
) |
| |
◆ PauseCapturing()
| virtual void mitk::VideoSource::PauseCapturing |
( |
| ) |
|
|
virtual |
Toggle the capture pause state.
While paused, FetchFrame() should provide the same frame repeatedly. Subclasses overriding this method must toggle m_CapturePaused.
◆ StartCapturing()
| virtual void mitk::VideoSource::StartCapturing |
( |
| ) |
|
|
virtual |
Start video capturing.
Sets m_CapturingInProcess to true and resets the frame count. Subclasses overriding this method should call the base implementation.
◆ StopCapturing()
| virtual void mitk::VideoSource::StopCapturing |
( |
| ) |
|
|
virtual |
Stop video capturing.
Sets m_CapturingInProcess to false and resets the frame count. Subclasses overriding this method should call the base implementation.
◆ m_CaptureHeight
| int mitk::VideoSource::m_CaptureHeight |
|
protected |
should be filled when the first frame is available default: 0
Definition at line 136 of file mitkVideoSource.h.
◆ m_CapturePaused
| bool mitk::VideoSource::m_CapturePaused |
|
protected |
Saves if the capturing is currently paused, i.e. this will not fetch any further frames but provide the current frame as long as m_CapturePaused is true default: false
Definition at line 157 of file mitkVideoSource.h.
◆ m_CaptureWidth
| int mitk::VideoSource::m_CaptureWidth |
|
protected |
should be filled when the first frame is available default: 0
Definition at line 130 of file mitkVideoSource.h.
◆ m_CapturingInProcess
| bool mitk::VideoSource::m_CapturingInProcess |
|
protected |
◆ m_CurrentVideoTexture
| unsigned char* mitk::VideoSource::m_CurrentVideoTexture |
|
protected |
finally this is what the video source must create: a video texture pointer default: 0
Definition at line 124 of file mitkVideoSource.h.
◆ m_FrameCount
| unsigned long mitk::VideoSource::m_FrameCount |
|
protected |
The documentation for this class was generated from the following file: