NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
Public Types | |
enum | InterlacedBehaviour { DO_NOTHING_SPECIAL, DROP_ONE_FIELD, STACK_FIELDS, SPLIT_LINE_INTERLEAVED_STEREO } |
Public Member Functions | |
SDIInput (SDIDevice *dev, InterlacedBehaviour interlaced=DO_NOTHING_SPECIAL, int ringbuffersize=0) | |
Initialises SDI capture into texture memory. More... | |
~SDIInput () | |
int | get_current_ringbuffer_slot () const |
Returns the most up-to-date index into the ring buffer. More... | |
int | get_texture_id (int streamno, int ringbufferslot=-1) const |
Returns the texture ID for a specific ring buffer slot, or for the current slot. The texture has always RGBA format, and dimensions reported by get_width()/get_height(). More... | |
FrameInfo | capture () |
Transfers one set of frames over all streams into texture objects. More... | |
bool | has_frame () const |
void | set_log_filename (const std::string &fn) |
void | flush_log () |
Actual video dimensions. | |
These may be different from the reported capture format if we are dropping a field, for example. | |
int | get_width () const |
Returns the width in pixels of the texture object that receives video data. More... | |
int | get_height () const |
Returns the height in pixels of the texture object that receives video data. More... | |
Protected Attributes | |
SDIInputImpl * | pimpl |
bool | preparetextures |
std::string | logfilename |
video::SDIInput::SDIInput | ( | SDIDevice * | dev, |
InterlacedBehaviour | interlaced = DO_NOTHING_SPECIAL , |
||
int | ringbuffersize = 0 |
||
) |
Initialises SDI capture into texture memory.
dev | the device on which to capture |
interlaced | what to do with interlaced video, ignored of format is progressive |
ringbuffersize | how may slots to allocate in the texture ringbuffer |
std::runtime_error | if anything goes wrong with setup |
std::logic_error | if you passed in the wrong parameters |
video::SDIInput::~SDIInput | ( | ) |
FrameInfo video::SDIInput::capture | ( | ) |
Transfers one set of frames over all streams into texture objects.
std::runtime_error | if capture setup has become invalid |
void video::SDIInput::flush_log | ( | ) |
int video::SDIInput::get_current_ringbuffer_slot | ( | ) | const |
Returns the most up-to-date index into the ring buffer.
int video::SDIInput::get_height | ( | ) | const |
Returns the height in pixels of the texture object that receives video data.
Returns the texture ID for a specific ring buffer slot, or for the current slot. The texture has always RGBA format, and dimensions reported by get_width()/get_height().
streamno | the index of the stream, counting from zero |
ringbufferslot | a specific ringbuffer slot, otherwise the currently active slot |
nothing | should not throw |
int video::SDIInput::get_width | ( | ) | const |
Returns the width in pixels of the texture object that receives video data.
bool video::SDIInput::has_frame | ( | ) | const |
void video::SDIInput::set_log_filename | ( | const std::string & | fn | ) |
|
protected |
|
protected |
|
protected |