Play videos back at the correct speed and automatically update frame Textur or PixelTransferBuffer.
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...
|
|
Play videos back at the correct speed and automatically update frame Textur or PixelTransferBuffer.
- See also
- 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::VideoPlayer::finished |
( |
| ) |
const |
|
inline |
◆ fps()
float G3D::VideoPlayer::fps |
( |
| ) |
const |
|
inline |
◆ frameBuffer()
◆ frameTexture()
shared_ptr<Texture> G3D::VideoPlayer::frameTexture |
( |
| ) |
const |
|
inline |
◆ fromFile() [1/3]
Creates a Texture that each frame is automatically copied into.
The Texture can be accessed by calling frameTexture().
- Returns
- nullptr if unable to open file or video is not supported
◆ fromFile() [2/3]
static shared_ptr<VideoPlayer> G3D::VideoPlayer::fromFile |
( |
const String & |
filename, |
|
|
shared_ptr< Texture > |
frameTexture |
|
) |
| |
|
static |
Sets the Texture that each frame is automatically copied into.
The Texture can be accessed by calling frameTexture().
- Returns
- nullptr if unable to open file or video is not supported
◆ fromFile() [3/3]
Sets the PixelTransferBuffer that each frame is automatically copied into.
The buffer can be accessed by calling frameBuffer().
- Returns
- nullptr if unable to open file or video is not supported
◆ height()
int G3D::VideoPlayer::height |
( |
| ) |
const |
|
inline |
◆ length()
RealTime G3D::VideoPlayer::length |
( |
| ) |
const |
|
inline |
◆ pause()
void G3D::VideoPlayer::pause |
( |
| ) |
|
|
inline |
◆ paused()
bool G3D::VideoPlayer::paused |
( |
| ) |
const |
|
inline |
◆ unpause()
void G3D::VideoPlayer::unpause |
( |
| ) |
|
|
inline |
◆ update()
bool G3D::VideoPlayer::update |
( |
RealTime |
timestep | ) |
|
Updates the video playback time and updates the frame texture or buffer if needed.
- Returns
- true if the frame was updated, false otherwise
◆ width()
int G3D::VideoPlayer::width |
( |
| ) |
const |
|
inline |