Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::ffmpeg::InputContext Class Reference

RAII wrapper around an AVFormatContext used for demuxing, that is reading media files. More...

#include <inviwo/ffmpeg/wrap/inputcontext.h>

+ Inheritance diagram for inviwo::ffmpeg::InputContext:

Public Member Functions

int bestVideoStream () const
 Index of the video stream ffmpeg considers the most suitable one.
 
 InputContext (const InputContext &)=delete
 
 InputContext (InputContext &&)=delete
 
 InputContext (std::filesystem::path aFilename)
 
int nbStreams () const
 
InputContextoperator= (const InputContext &)=delete
 
InputContextoperator= (InputContext &&)=delete
 
bool readPacket (Packet &pkt)
 Read the next packet from the file.
 
void seek (int streamIndex, int64_t timestamp)
 Seek to the keyframe at or before timestamp, given in the time base of stream streamIndex.
 
AVStream * stream (int index) const
 

Public Attributes

AVFormatContext * ctx
 
std::filesystem::path filename
 

Detailed Description

RAII wrapper around an AVFormatContext used for demuxing, that is reading media files.

See also
OutputContext for the muxing counterpart

Member Function Documentation

◆ bestVideoStream()

int inviwo::ffmpeg::InputContext::bestVideoStream ( ) const

Index of the video stream ffmpeg considers the most suitable one.

Exceptions
Exceptionif the file contains no video stream

◆ readPacket()

bool inviwo::ffmpeg::InputContext::readPacket ( Packet & pkt)

Read the next packet from the file.

Returns
false at end of file, true otherwise

◆ stream()

AVStream * inviwo::ffmpeg::InputContext::stream ( int index) const
Exceptions
RangeExceptionif index is not a valid stream index

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