Unit CastleVideos

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

Video (movie) data (TVideo and helpers).

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class EInvalidFadeFrames  
Class TVideo Video.
Class TVideosCache A cache of loaded videos.

Functions and Procedures

function FfmpegVideoMimeType(const MimeType: string; const FfmpegOutput: boolean): boolean;
function FfmpegExecutable(const ExceptionOnError: boolean): string;
procedure FfmpegExecute(const Executable: string; const Parameters: array of string);

Constants

DefaultFramesPerSecond = 25.0;

Variables

MaximumVideoLength: Cardinal = 1 * 60 * 25;

Description

Functions and Procedures

function FfmpegVideoMimeType(const MimeType: string; const FfmpegOutput: boolean): boolean;

Does given MIME type looks like a video file extension that can be handled (encoded or decoded) by ffmpeg.

FfmpegOutput = True means that you want to encode this video (use this as output of ffmpeg). FfmpegOutput = False means you want to decode the video, that is use this as an input to ffmpeg.

function FfmpegExecutable(const ExceptionOnError: boolean): string;

Returns full path to ffmpeg-compatible executable.

When not found:

  • If ExceptionOnError then we raise an exception.

  • If not ExceptionOnError then we simply return ''.

procedure FfmpegExecute(const Executable: string; const Parameters: array of string);

Execute ffmpeg. 1st parameter must not be ''. It should usually be calculated by FfmpegExecutable.

Constants

DefaultFramesPerSecond = 25.0;
 

Variables

MaximumVideoLength: Cardinal = 1 * 60 * 25;

Maximum number of video frames to read, for TVideo.LoadFromFile.

This prevents using up all the memory by accidentaly trying to read a long movie. Remember that our current implementation is not suited for long movies, it will load very slowly and consume a lot of memory. See http://castle-engine.sourceforge.net/x3d_implementation_texturing.php notes about MovieTexture.

By default this is equal to 1 minute, for 25 frames-per-second movie. Even this can eat 2 GB for 640 x 350 resolution.


Generated by PasDoc 0.13.0 on 2014-04-30 22:06:46