Read video files from MPG, MP4, AVI, MOV, OGG, ASF, and WMV files.
More...
Inherits G3D::ReferenceCountedObject.
|
template<class T , class ... ArgTypes> |
static shared_ptr< T > | createShared (ArgTypes &&... args) |
| Like std::make_shared, but works for protected constructors. More...
|
|
Read video files from MPG, MP4, AVI, MOV, OGG, ASF, and WMV files.
Simply returns the next available frames until the video is finished. Requires a properly formatted SRGB8 or RGB8 Texture or PixelTransferBuffer otherwise will not copy the frame. Use imageFormat() to create the supported format.
Use VideoPlayer to playback a video at the correct speed.
- See also
- VideoPlayer
◆ ~VideoInput()
G3D::VideoInput::~VideoInput |
( |
| ) |
|
◆ createShared()
template<class T , class ... ArgTypes>
static shared_ptr<T> G3D::ReferenceCountedObject::createShared |
( |
ArgTypes &&... |
args | ) |
|
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
◆ finished()
bool G3D::VideoInput::finished |
( |
| ) |
const |
◆ fps()
float G3D::VideoInput::fps |
( |
| ) |
const |
◆ fromFile()
static shared_ptr<VideoInput> G3D::VideoInput::fromFile |
( |
const String & |
filename | ) |
|
|
static |
- Returns
- nullptr if unable to open file or video is not supported
◆ height()
int G3D::VideoInput::height |
( |
| ) |
const |
◆ imageFormat()
static const ImageFormat* G3D::VideoInput::imageFormat |
( |
| ) |
|
|
static |
◆ length()
RealTime G3D::VideoInput::length |
( |
| ) |
const |
◆ nextFrame() [1/3]
- Returns
- The buffer containing the next available frame or nullptr if no available frame
◆ nextFrame() [2/3]
bool G3D::VideoInput::nextFrame |
( |
shared_ptr< Texture > |
frame | ) |
|
Copies the next available frame into the Texture *.
- Returns
- true if frame was available and copied, false otherwise
◆ nextFrame() [3/3]
Copies the next available frame into the Texture *.
- Returns
- true if frame was available and copied, false otherwise
◆ width()
int G3D::VideoInput::width |
( |
| ) |
const |