[Top] [Prev] [Next]

mpeg

mpeg - interface to the mpeg device driver

Synopsis

include "draw.m"; import Display, Image, Rect: Draw;
include "mpeg.m";
mpeg:= load Mpeg Mpeg->PATH;
Mpeg: module
{
  PATH:   con "/dis/lib/mpeg.dis";
  play:     fn(d:       ref Display,
               w:       ref Image,
               dopaint: int,
               r:       Rect,
               file:    string,
               notify:  chan of string)   : string;
  ctl:      fn(msg: string)               : int;
  keycolor: fn(d: ref Display)            : ref Image;
};

Description

This module has a primitive interface to the mpeg device driver.

play (d, w, dopaint, r, file, notify)

The play function plays the specified MPEG file (file) in rectangle r within window w on display d. The dopaint flag specifies whether, before playing the movie, to paint the rectangle with the chroma key color of the device.

The notify argument is a channel upon which to receive errors and status. If notify is nil, play runs synchronously, returning the empty string ("") when the movie completes or a description of any error. If notify is not nil, play spawns an asynchronous process to play the movie and returns the empty string immediately; the process will return status on the notify channel when the movie completes.

ctl (msg)

The ctl function writes msg, the string given as an argument, to the MPEG control interface /dev/mpegctl.

keycolor(d)

This function uses the Display specified by d to create an Image an single-pixel, replicated off screen Image of color Chroma (16r05).

Files

/dev/mpeg /dev/mpegctl



[Top] [Prev] [Next]

infernosupport@lucent.com
Copyright © 1996,Lucent Technologies, Inc. All rights reserved.