summaryrefslogtreecommitdiff
path: root/static/inferno/man2/mpeg.2
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-26 16:38:00 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-26 16:38:00 -0400
commit97d5c458cfa039d857301e1ca7d5af3beb37131d (patch)
treeb460cd850d0537eb71806ba30358840377b27688 /static/inferno/man2/mpeg.2
parentb89dc2331a50c63f8b33272a5c4c61ab98abdaa3 (diff)
build: Better Build System
Diffstat (limited to 'static/inferno/man2/mpeg.2')
-rw-r--r--static/inferno/man2/mpeg.274
1 files changed, 74 insertions, 0 deletions
diff --git a/static/inferno/man2/mpeg.2 b/static/inferno/man2/mpeg.2
new file mode 100644
index 00000000..1691a713
--- /dev/null
+++ b/static/inferno/man2/mpeg.2
@@ -0,0 +1,74 @@
+.TH MPEG 2
+.SH NAME
+mpeg \- interface to the mpeg device driver
+.SH SYNOPSIS
+.EX
+include "draw.m";
+include "mpeg.m";
+mpeg:= load Mpeg Mpeg->PATH;
+
+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;
+.EE
+.SH DESCRIPTION
+.B Mpeg
+provides a primitive interface to the
+.IR mpeg (3)
+device.
+.PP
+.B Play
+plays the specified MPEG
+.I file
+in rectangle
+.I r
+within window
+.I w
+on display
+.IR d .
+The
+.I dopaint
+flag specifies whether, before playing the movie, to paint the rectangle with the chroma key colour of the device.
+.PP
+.I Notify
+is a channel upon which to receive errors and status. If
+.I notify
+is
+.BR nil ,
+.B play
+runs synchronously, returning the empty string ("") when the movie completes, or a description of any error.
+If
+.I notify
+is not
+.BR nil ,
+.B play
+spawns an asynchronous process to play the movie and returns the empty string immediately; the process returns the status on the
+.I notify
+channel when the movie completes.
+.PP
+.B Ctl
+writes
+.IR msg ,
+the string given as an argument, to the MPEG control interface
+.BR /dev/mpegctl .
+.PP
+.B Keycolor
+uses the
+.B Display
+.I d
+to create a single-pixel, replicated off screen
+.B Image
+of colour
+.B Chroma
+.RB ( 16r05 ).
+.SH FILES
+.B /dev/mpeg
+.br
+.B /dev/mpegctl
+.SH SOURCE
+.B /appl/lib/mpeg.b