[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.3.6.1 Play Mpg (%G)

The ability to play mpgs is new with Cogsys 4. The mpg function is designed to play a section of an mpg, then display a still image, then either wait for a user keypress or continue playing the mpg. One can "fast forward", "rewind", and "skip through" the mpg. Mpgs are displayed with 32-bit color, so care must be taken to set the proper video mode (%M).

Name:
Play Mpg
Class:
Video
Code:
%G
Syntax:
%G[mpg file, stop time, volume, play flag]
mpg file is a text string, specifying the path/filename of the mpg file. If no path is given, it is assumed that the file is in the /data directory.
stop time is an integer from 0 to infinity, specifying the millisecond timestamp from the beginning of the mpg file to play to.
volume is an integer from 0 to 100, where 0 is "no volume".
play flag is an integer from 0 to 1, indicating "play mode" (1), or "skip to" mode (0).
System:
Plays an mpg file on the screen.

Requires:
A video card driver needs to be installed in the kernel, to allow framebuffer support.

Test Files:
`MPG_T01.IN'
tests basic operation

Examples:

input
%G[/mpg/test.mpg,1000,0,1]#R%G[/mpg/test.mpg,4000,0,1]
cogsys
Plays the first 1000 milliseconds of /mpg/test.mpg at zero volume, then waits for a keypress (#R). After the keypress, the mpg plays the next 3000 milliseconds, then stops.



This document was generated on November, 24 2008 using texi2html