Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
1b0d40db
Commit
1b0d40db
authored
Aug 18, 1992
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial revision
parent
6e78ee73
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
0 deletions
+95
-0
Demo/sgi/video/Vinfo.py
Demo/sgi/video/Vinfo.py
+38
-0
Demo/sgi/video/Vplay.py
Demo/sgi/video/Vplay.py
+57
-0
No files found.
Demo/sgi/video/Vinfo.py
0 → 100755
View file @
1b0d40db
import
sys
import
VFile
def
main
():
if
sys
.
argv
[
1
:]:
for
filename
in
sys
.
argv
[
1
:]:
process
(
filename
)
else
:
process
(
'film.video'
)
def
process
(
filename
):
vin
=
VFile
.
VinFile
().
init
(
filename
)
print
'File: '
,
filename
print
'Version: '
,
vin
.
version
print
'Size: '
,
vin
.
width
,
'x'
,
vin
.
height
print
'Pack: '
,
vin
.
packfactor
,
'; chrom:'
,
vin
.
chrompack
print
'Bits: '
,
vin
.
c0bits
,
vin
.
c1bits
,
vin
.
c2bits
print
'Format: '
,
vin
.
format
print
'Offset: '
,
vin
.
offset
print
'Frame times:'
,
n
=
0
t
=
0
while
1
:
try
:
t
,
data
,
cdata
=
vin
.
getnextframe
()
except
EOFError
:
print
break
if
n
%
8
==
0
:
sys
.
stdout
.
write
(
'
\
n
'
)
sys
.
stdout
.
write
(
'
\
t
'
+
`t`
)
n
=
n
+
1
print
'Total'
,
n
,
'frames in'
,
t
*
0.001
,
'sec.'
,
if
t
:
print
'-- average'
,
int
(
n
*
10000.0
/
t
)
*
0.1
,
'frames/sec'
,
print
main
()
Demo/sgi/video/Vplay.py
0 → 100755
View file @
1b0d40db
import
sys
import
VFile
import
time
import
gl
,
GL
from
DEVICE
import
*
def
main
():
if
sys
.
argv
[
1
:]:
for
filename
in
sys
.
argv
[
1
:]:
process
(
filename
)
else
:
process
(
'film.video'
)
def
process
(
filename
):
vin
=
VFile
.
VinFile
().
init
(
filename
)
print
'File: '
,
filename
print
'Version: '
,
vin
.
version
print
'Size: '
,
vin
.
width
,
'x'
,
vin
.
height
print
'Pack: '
,
vin
.
packfactor
,
'; chrom:'
,
vin
.
chrompack
print
'Bits: '
,
vin
.
c0bits
,
vin
.
c1bits
,
vin
.
c2bits
print
'Format: '
,
vin
.
format
print
'Offset: '
,
vin
.
offset
gl
.
foreground
()
gl
.
prefsize
(
vin
.
width
,
vin
.
height
)
win
=
gl
.
winopen
(
filename
)
vin
.
initcolormap
()
gl
.
qdevice
(
ESCKEY
)
gl
.
qdevice
(
WINSHUT
)
gl
.
qdevice
(
WINQUIT
)
t0
=
time
.
millitimer
()
running
=
1
data
=
None
while
1
:
if
running
:
try
:
t
,
data
,
chromdata
=
vin
.
getnextframe
()
except
EOFError
:
running
=
0
gl
.
wintitle
(
'(done)'
)
if
running
:
dt
=
t
+
t0
-
time
.
millitimer
()
if
dt
>
0
:
time
.
millisleep
(
dt
)
vin
.
showframe
(
data
,
chromdata
)
if
not
running
or
gl
.
qtest
():
dev
,
val
=
gl
.
qread
()
if
dev
in
(
ESCKEY
,
WINSHUT
,
WINQUIT
):
break
if
dev
==
REDRAW
:
gl
.
reshapeviewport
()
if
data
:
vin
.
showframe
(
data
,
chromdata
)
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment