Reads a range of frames from a video file using ffmpeg.
More...
#include <inviwo/ffmpeg/ffmpegvideoreader.h>
|
| virtual FFmpegLayerSequenceReader * | clone () const override |
|
| FFmpegLayerSequenceReader (const FFmpegLayerSequenceReader &rhs)=default |
|
| FFmpegLayerSequenceReader (FFmpegLayerSequenceReader &&rhs) noexcept=default |
| virtual std::any | getOption (std::string_view key) override |
| | Query the value of an reader specific option.
|
|
FFmpegLayerSequenceReader & | operator= (const FFmpegLayerSequenceReader &that)=default |
|
FFmpegLayerSequenceReader & | operator= (FFmpegLayerSequenceReader &&that) noexcept=default |
| virtual std::shared_ptr< LayerSequence > | readData (const std::filesystem::path &filePath) override |
| virtual bool | setOption (std::string_view key, std::any value) override |
| | Set reader specific options See the documentation of the specific reader for the available options.
|
|
DataReaderType & | operator= (const DataReaderType &that)=default |
|
void | addExtension (FileExtension ext) |
|
| DataReader (const DataReader &rhs)=default |
|
| DataReader (DataReader &&rhs) noexcept=default |
|
const std::vector< FileExtension > & | getExtensions () const |
|
DataReader & | operator= (const DataReader &that)=default |
|
DataReader & | operator= (DataReader &&that) noexcept=default |
|
template<typename T> |
| bool | readsType () const |
|
|
static constexpr std::ptrdiff_t | defaultCount = 100 |
| | Videos can be arbitrarily long, only read this many frames unless told otherwise.
|
|
| virtual bool | canRead (const std::type_index &index) const override |
| static void | checkExists (const std::filesystem::path &path) |
|
static std::filesystem::path | downloadAndCacheIfUrl (const std::filesystem::path &url) |
| static std::ifstream | open (const std::filesystem::path &path, std::ios_base::openmode mode=std::ios_base::in) |
|
static std::ifstream | openAndCacheIfUrl (const std::filesystem::path &path, std::ios_base::openmode mode=std::ios_base::in) |
| static std::string | readFileContents (const std::filesystem::path &path) |
|
std::vector< FileExtension > | extensions_ |
Reads a range of frames from a video file using ffmpeg.
Supported options
- reader::option::index first frame to read, std::ptrdiff_t, negative values count from the end, defaults to 0
- reader::option::count number of frames to read, std::ptrdiff_t, a negative value reads until the end of the video, defaults to FFmpegLayerSequenceReader::defaultCount
- reader::option::stride step between the frames to read, std::ptrdiff_t, defaults to 1
- videoreader::option::stream video stream to read, int, defaults to -1
◆ clone()
| virtual FFmpegLayerSequenceReader * inviwo::FFmpegLayerSequenceReader::clone |
( |
| ) |
const |
|
overridevirtual |
◆ getOption()
| virtual std::any inviwo::FFmpegLayerSequenceReader::getOption |
( |
std::string_view | key | ) |
|
|
overridevirtual |
Query the value of an reader specific option.
- Parameters
-
- Returns
- an std::any with the requested option or an empty std::any if the option was not found
Reimplemented from inviwo::DataReader.
◆ readData()
| virtual std::shared_ptr< LayerSequence > inviwo::FFmpegLayerSequenceReader::readData |
( |
const std::filesystem::path & | filePath | ) |
|
|
overridevirtual |
◆ setOption()
| virtual bool inviwo::FFmpegLayerSequenceReader::setOption |
( |
std::string_view | key, |
|
|
std::any | value ) |
|
overridevirtual |
Set reader specific options See the documentation of the specific reader for the available options.
- Parameters
-
| key | the option to set |
| value | the new value for the option |
- Returns
- true if the option was recognized and set, otherwise false
Reimplemented from inviwo::DataReader.
The documentation for this class was generated from the following file:
- modules/ffmpeg/include/inviwo/ffmpeg/ffmpegvideoreader.h