Drag[en]gine Script Module DragonScript Script API  1.0
Video Class Reference

Immutable video resources. More...

Inheritance diagram for Video:

Public Member Functions

String getFilename ()
 Normalized filename the video has been loaded from. More...
int getWidth ()
 Wwidth in pixels. More...
int getHeight ()
 Height in pixels. More...
int getFrameCount ()
 Number of frames. More...
int getFrameRate ()
 Frame rate. More...
float getPlayTime ()
 Play time in seconds. More...
bool getStreaming ()
 Video is streaming. More...
bool equals (Object other)
 Video is equal to another object. More...
int hashCode ()
 Hash code for use as dictionary keys. More...


Video new (String filename, bool streaming)
 Load video from file. More...
static void loadAsynchron (String filename, ResourceNotifier notifier)
 Load video from file asynchronously. More...

Detailed Description

Immutable video resources.

Video resources provide static precanned video data to be used with Animators to produce dynamic videos.

This is a native class. It can not be subclassed.

Roland Pl├╝ss

Member Function Documentation

◆ equals()

bool equals ( Object  other)

Video is equal to another object.

Implements Object.equals(Object).

true if other is of type Video and both point to the same engine video resource.

◆ getFilename()

String getFilename ( )

Normalized filename the video has been loaded from.

◆ getFrameCount()

int getFrameCount ( )

Number of frames.

◆ getFrameRate()

int getFrameRate ( )

Frame rate.

◆ getHeight()

int getHeight ( )

Height in pixels.

◆ getPlayTime()

float getPlayTime ( )

Play time in seconds.

◆ getStreaming()

bool getStreaming ( )

Video is streaming.

◆ getWidth()

int getWidth ( )

Wwidth in pixels.

◆ hashCode()

int hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

◆ loadAsynchron()

static void loadAsynchron ( String  filename,
ResourceNotifier  notifier 

Load video from file asynchronously.

Registers a request in the game engine to load an video. Once finished or if the file is already loaded the notifier is used to deliver the loaded video or null if the loading failed.

◆ new()

Video new ( String  filename,
bool  streaming 

Load video from file.

If the video file has been already loaded it is assigned to this object. If the video is not loaded yet the engine loads the video. This call blocks until the video is fully loaded and ready to be used. For asynchronous loading use loadAsynchron(). Multiple objects can point to the same loaded video resource. Once no object instance uses an video file anymore it is released from memory.

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