Valkka  1.6.1
OpenSource Video Management
Public Member Functions | List of all members
ValkkaFS2 Class Reference
Inheritance diagram for ValkkaFS2:
Inheritance graph
[legend]
Collaboration diagram for ValkkaFS2:
Collaboration graph
[legend]

Public Member Functions

 ValkkaFS2 (const char *device_file, const char *block_file, std::size_t blocksize, std::size_t n_blocks, bool init=false)
 Default Constructor. More...
 
virtual void markKeyFrame (long int mstimestamp)
 Used by a writer class to inform that a key frame has been written.
 
- Public Member Functions inherited from ValkkaFS
 ValkkaFS (const char *device_file, const char *block_file, std::size_t blocksize, std::size_t n_blocks, bool init=false)
 Default Constructor. More...
 
void setVal (std::size_t i, std::size_t j, long int val)
 set tab's value at block i, row j
 
long int getVal (std::size_t i, std::size_t j)
 
std::size_t getBlockSeek (std::size_t n_block)
 
std::size_t getCurrentBlockSeek ()
 
const std::size_t getBlockSize ()
 
std::size_t get_n_blocks ()
 
std::size_t get_n_cols ()
 
void dumpTable_ ()
 dump blocktable to disk. More...
 
void updateDumpTable_ (std::size_t n_block)
 dump single row of bloctable to disk. More...
 
void dumpTable ()
 dump blocktable to disk
 
void readTable ()
 read blocktable from disk
 
std::string getDevice ()
 returns device filename
 
std::size_t getDeviceSize ()
 returns device file size
 
void clearDevice (bool writethrough=false, bool verbose=false)
 writes zero bytes to the device
 
void clearTable ()
 clears the blocktable and writes it to the disk
 
std::size_t maxFrameSize ()
 returns maximum allowed frame size in bytes
 
void reportTable (std::size_t from=0, std::size_t to=0, bool show_all=false)
 print blocktable
 
void updateTable (bool disk_write=false)
 Tell ValkkaFS to update the blocktable, even if the block hasn't finished Typically used by an external manager that needs up-to-date information about the max timestamp in the block.
 
void writeBlock (bool pycall=true, bool use_gil=true)
 Used by a writer class to inform that a new block has been written. More...
 
void markFrame (long int mstimestamp)
 Used by a writer class to inform that a non-key frame has been written.
 
void setCurrentBlock (std::size_t n_block)
 Set block number that's being written.
 
void setBlockCallback (PyObject *pobj)
 Set a python callable that's being triggered when a new block is written.
 
void setArrayCall (PyObject *pyobj)
 Copy blocktable to a given numpy array. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ValkkaFS
std::size_t ind (std::size_t i, std::size_t j)
 first index: block number (row), second index: column
 
- Protected Attributes inherited from ValkkaFS
std::string device_file
 
std::string block_file
 
std::size_t blocksize
 
std::size_t n_blocks
 
bool init
 Clear the blocktable or not even if it exists.
 
std::size_t device_size
 
std::vector< long int > tab
 Blocktable.
 
std::fstream os
 Write handle to blocktable file.
 
std::mutex mutex
 
long int col_0
 Current column 0 value (max keyframe timestamp)
 
long int col_1
 Current column 1 value (max anyframe timestamp)
 
long int col_0_lu
 col_0 at previous blocktable update
 
long int col_1_lu
 col_1 at previous blocktable update
 
std::size_t current_row
 Row number (block) that's being written.
 
std::size_t prev_row
 Previous row number (block)
 
PyObject * pyfunc
 A python callback that's triggered when the blocktable should be read again.
 
- Static Protected Attributes inherited from ValkkaFS
static const std::size_t n_cols = 2
 

Constructor & Destructor Documentation

◆ ValkkaFS2()

ValkkaFS2::ValkkaFS2 ( const char *  device_file,
const char *  block_file,
std::size_t  blocksize,
std::size_t  n_blocks,
bool  init = false 
)

Default Constructor.

Please refer to ValkkaFS : the ctor is identical

This version of ValkkaFS is designed for one file having a single stream


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