]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added support for 24-bit rgb movies
authorJack Jansen <jack.jansen@cwi.nl>
Wed, 17 Feb 1993 15:54:32 +0000 (15:54 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Wed, 17 Feb 1993 15:54:32 +0000 (15:54 +0000)
Demo/sgi/video/LiveVideoOut.py

index d39d76e57ace4f892cf6a9853db9b6ea3638bf53..72e3d5811e765310d74bc5c87db369dd4779c366 100755 (executable)
@@ -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':