diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1993-02-17 15:54:32 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1993-02-17 15:54:32 (GMT) |
commit | 1d6821f58f3e25584084f8c989e53dcd187db85f (patch) | |
tree | d6ce7757a807b5b1d7ef4889f098a983f52343af /Demo/sgi/video | |
parent | 7961ea78689a02c91df65b83b35df42ebf819966 (diff) | |
download | cpython-1d6821f58f3e25584084f8c989e53dcd187db85f.zip cpython-1d6821f58f3e25584084f8c989e53dcd187db85f.tar.gz cpython-1d6821f58f3e25584084f8c989e53dcd187db85f.tar.bz2 |
Added support for 24-bit rgb movies
Diffstat (limited to 'Demo/sgi/video')
-rwxr-xr-x | Demo/sgi/video/LiveVideoOut.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Demo/sgi/video/LiveVideoOut.py b/Demo/sgi/video/LiveVideoOut.py index d39d76e..72e3d58 100755 --- a/Demo/sgi/video/LiveVideoOut.py +++ b/Demo/sgi/video/LiveVideoOut.py @@ -18,9 +18,13 @@ class LiveVideoOut: self.vw = vw self.vh = vh self.disp = Displayer().init() - if not type in ('rgb8', 'grey', 'mono', 'grey2', 'grey4'): + if not type in ('rgb', 'rgb8', 'grey', 'mono', 'grey2', \ + 'grey4'): raise 'Incorrent live video output type', type - info = (type, vw, vh, 1, 8, 0, 0, 0, 0) + if type == 'rgb': + info = (type, vw, vh, 0, 32, 0, 0, 0, 0) + else: + info = (type, vw, vh, 1, 8, 0, 0, 0, 0) self.disp.setinfo(info) self.wid = wid oldwid = gl.winget() @@ -53,6 +57,8 @@ class LiveVideoOut: # Return the number of bytes in one video line def linewidth(self): + if self.disp.format == 'rgb': + return self.vw*4 if self.disp.format == 'mono': return (self.vw+7)/8 elif self.disp.format == 'grey2': |