The VideoReader class is used to import video files and implement the Reader interface. It utilizes the FFMPEG libaries to enable frame perfect random access inside a video stream.
More...
#include <videoreader.h>
|
| | VideoReader (const QString &path, std::shared_ptr< ReaderParams > readerParams) |
| | VideoReader constructor which reads the given file and creates cv::VideoCapture from it.
|
| |
|
| ~VideoReader () |
| | VideoReader destructor.
|
| |
| cv::Mat | getPic (unsigned int index, PictureProcessingFlags flags=APPLY_ALL) override |
| | Returns the frame to a given index.
|
| |
| unsigned int | getPicCount () override |
| | Returns the number of frame.
|
| |
| QString | getInputPath () override |
| | Returns the input path.
|
| |
| double | getFPS () override |
| | Returns the video FPS.
|
| |
| double | getVideoDuration () override |
| | Returns the video duration.
|
| |
| bool | isDir () override |
| | Returns wether the input is a direcory or not.
|
| |
| VideoReader * | copy (std::shared_ptr< ReaderParams > params) override |
| | Creates this reader again and returns it.
|
| |
| std::vector< std::string > | getFileVector () override |
| | Returns a empty vector.
|
| |
| SequentialReader * | createSequentialReader (std::vector< uint > indices, PictureProcessingFlags flags=APPLY_ALL) override |
| | createSequentialReader Creates a SequentialReader object for the given indices. This can be used to access images concurrently if the images are known a priori.
|
| |
| void | addMetaData (MetaData *md) override |
| | addMetaData Used to add MetaData to the reader
|
| |
| MetaData * | getMetaData () override |
| | getMetaData Returns the currently saved MetaData
|
| |
| bool | isValid () override |
| | isValid Retruns wether the reader is valid or not
|
| |
|
virtual void | enableMultithreading () |
| | enableMultithreading This method has to be called once in the plugins to use the reader while multithreading
|
| |
The VideoReader class is used to import video files and implement the Reader interface. It utilizes the FFMPEG libaries to enable frame perfect random access inside a video stream.
- Author
- Dominic Zahn
- Date
- 2025/08/01
◆ VideoReader()
| VideoReader::VideoReader |
( |
const QString & |
path, |
|
|
std::shared_ptr< ReaderParams > |
readerParams |
|
) |
| |
|
explicit |
VideoReader constructor which reads the given file and creates cv::VideoCapture from it.
- Parameters
-
| path | Path to the video. Video can be the types, which cv::VideoCapture can handle |
◆ addMetaData()
| void VideoReader::addMetaData |
( |
MetaData * |
md | ) |
|
|
overridevirtual |
addMetaData Used to add MetaData to the reader
- Parameters
-
Implements Reader.
◆ copy()
Creates this reader again and returns it.
- Returns
- New instance of this reader
Implements Reader.
◆ createSequentialReader()
| SequentialReader * VideoReader::createSequentialReader |
( |
std::vector< uint > |
indices, |
|
|
PictureProcessingFlags |
flags = APPLY_ALL |
|
) |
| |
|
overridevirtual |
createSequentialReader Creates a SequentialReader object for the given indices. This can be used to access images concurrently if the images are known a priori.
- Parameters
-
| indices | The indices of the images that will be accessed |
- Returns
- SequentialReader instance (caller takes ownership!)
Implements Reader.
◆ getFileVector()
| std::vector< std::string > VideoReader::getFileVector |
( |
| ) |
|
|
overridevirtual |
Returns a empty vector.
- Returns
- empty vector
Implements Reader.
◆ getFPS()
| double VideoReader::getFPS |
( |
| ) |
|
|
overridevirtual |
Returns the video FPS.
- Returns
- double with the FPS, -1 if input isn't a video
Implements Reader.
◆ getInputPath()
| QString VideoReader::getInputPath |
( |
| ) |
|
|
overridevirtual |
Returns the input path.
- Returns
- Qstring with the input path
Implements Reader.
◆ getMetaData()
◆ getPic()
| cv::Mat VideoReader::getPic |
( |
unsigned int |
index, |
|
|
PictureProcessingFlags |
flags = APPLY_ALL |
|
) |
| |
|
overridevirtual |
Returns the frame to a given index.
- Parameters
-
| index | Index of the frame to be returned |
- Returns
- cv::Mat of the selected frame
Implements Reader.
◆ getPicCount()
| unsigned int VideoReader::getPicCount |
( |
| ) |
|
|
overridevirtual |
Returns the number of frame.
- Returns
- Number of frame
Implements Reader.
◆ getVideoDuration()
| double VideoReader::getVideoDuration |
( |
| ) |
|
|
overridevirtual |
Returns the video duration.
- Returns
- double with the video duration, -1 if input isn't a video
Implements Reader.
◆ isDir()
| bool VideoReader::isDir |
( |
| ) |
|
|
overridevirtual |
Returns wether the input is a direcory or not.
- Returns
- true if the input is based on a directory, false otherwise
Implements Reader.
◆ isValid()
| bool VideoReader::isValid |
( |
| ) |
|
|
overridevirtual |
isValid Retruns wether the reader is valid or not
- Returns
- true if the reader is valid, false otherwise
Implements Reader.
The documentation for this class was generated from the following files:
- iVS3D/src/iVS3D-core/model/reader/videoreader.h
- iVS3D/src/iVS3D-core/model/reader/videoreader.cpp