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
007b8eb7
Commit
007b8eb7
authored
Jan 03, 2004
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added interfaces for most of the stuff in QuickTimeComponents.h.
parent
ff8505dc
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9862 additions
and
61 deletions
+9862
-61
Mac/Modules/qt/_Qtmodule.c
Mac/Modules/qt/_Qtmodule.c
+9770
-58
Mac/Modules/qt/qtscan.py
Mac/Modules/qt/qtscan.py
+51
-2
Mac/Modules/qt/qtsupport.py
Mac/Modules/qt/qtsupport.py
+41
-1
No files found.
Mac/Modules/qt/_Qtmodule.c
View file @
007b8eb7
This diff is collapsed.
Click to expand it.
Mac/Modules/qt/qtscan.py
View file @
007b8eb7
...
...
@@ -8,15 +8,18 @@ from scantools import Scanner
LONG
=
"QuickTime"
SHORT
=
"qt"
OBJECTS
=
(
"Movie"
,
"Track"
,
"Media"
,
"UserData"
,
"TimeBase"
,
"MovieController"
,
"IdleManager"
)
HEADERFILES
=
(
"Movies.h"
,
"ImageCompression.h"
,
"QuickTimeComponents.h"
)
OBJECTS
=
(
"Movie"
,
"Track"
,
"Media"
,
"UserData"
,
"TimeBase"
,
"MovieController"
,
"IdleManager"
,
"SGOutput"
)
def
main
():
input
=
(
"Movies.h"
,
"ImageCompression.h"
)
input
=
HEADERFILES
output
=
SHORT
+
"gen.py"
defsoutput
=
TOOLBOXDIR
+
LONG
+
".py"
scanner
=
MyScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
close
()
scanner
.
gentypetest
(
SHORT
+
"typetest.py"
)
print
"=== Testing definitions output code ==="
execfile
(
defsoutput
,
{},
{})
print
"=== Done scanning and generating, now importing the generated code... ==="
...
...
@@ -37,9 +40,11 @@ class MyScanner(Scanner):
def
writeinitialdefs
(
self
):
self
.
defsfile
.
write
(
"def FOUR_CHAR_CODE(x): return x
\
n
"
)
self
.
defsfile
.
write
(
"xmlIdentifierUnrecognized = -1
\
n
"
)
def
makeblacklistnames
(
self
):
return
[
"xmlIdentifierUnrecognized"
,
# const with incompatible definition
"DisposeMovie"
,
# Done on python-object disposal
"DisposeMovieTrack"
,
# ditto
"DisposeTrackMedia"
,
# ditto
...
...
@@ -78,6 +83,13 @@ class MyScanner(Scanner):
# these are ImageCompression blacklists
"GraphicsExportGetInputPtr"
,
# QuickTimeComponents
# These two need some help: the first returns a point to a databuffer that
# the second disposes. Generate manually?
"VDCompressDone"
,
"VDReleaseCompressBuffer"
,
"QTVideoOutputGetGWorldParameters"
,
# How useful is this?
]
def
makeblacklisttypes
(
self
):
...
...
@@ -156,6 +168,43 @@ class MyScanner(Scanner):
"PixMapPtr"
,
"GWorldFlags"
,
"void_ptr"
,
# XXX Being lazy, this one is doable.
# These are from QuickTimeComponents
"CDataHandlerUPP"
,
"CharDataHandlerUPP"
,
"CommentHandlerUPP"
,
"DataHCompletionUPP"
,
"'MovieExportGetDataUPP"
,
"MovieExportGetPropertyUPP"
,
"PreprocessInstructionHandlerUPP"
,
"SGModalFilterUPP"
,
"StartDocumentHandlerUPP"
,
"StartElementHandlerUPP"
,
"VdigIntUPP"
,
"SGDataUPP"
,
"EndDocumentHandlerUPP"
,
"EndElementHandlerUPP"
,
"VideoBottles"
,
# Record full of UPPs
"SCParams"
,
"ICMCompletionProcRecordPtr"
,
"DataHVolumeList"
,
"DigitizerInfo"
,
"SGCompressInfo"
,
"SeqGrabExtendedFrameInfoPtr"
,
"SeqGrabFrameInfoPtr"
,
"TCTextOptionsPtr"
,
"SGCompressInfo_ptr"
,
"SGDeviceList"
,
"TextDisplayData"
,
"TimeCodeDef"
,
"TimeCodeRecord"
,
"TweenRecord"
,
"VDGamRecPtr"
,
"ToneDescription"
,
# XXXX Just lazy: this one is easy.
"XMLDoc"
,
"UInt64"
,
# XXXX lazy
"UInt64_ptr"
,
# XXXX lazy
]
def
makerepairinstructions
(
self
):
...
...
Mac/Modules/qt/qtsupport.py
View file @
007b8eb7
...
...
@@ -116,6 +116,7 @@ UserData = OpaqueByValueType('UserData', 'UserDataObj')
TimeBase
=
OpaqueByValueType
(
'TimeBase'
,
'TimeBaseObj'
)
MovieController
=
OpaqueByValueType
(
'MovieController'
,
'MovieCtlObj'
)
IdleManager
=
OpaqueByValueType
(
'IdleManager'
,
'IdleManagerObj'
)
SGOutput
=
OpaqueByValueType
(
'SGOutput'
,
'SGOutputObj'
)
# Other opaque objects
Component
=
OpaqueByValueType
(
'Component'
,
'CmpObj'
)
...
...
@@ -127,11 +128,25 @@ CodecComponent = OpaqueByValueType('CodecComponent', 'CmpObj')
GraphicsImportComponent
=
OpaqueByValueType
(
'GraphicsImportComponent'
,
'CmpObj'
)
GraphicsExportComponent
=
OpaqueByValueType
(
'GraphicsExportComponent'
,
'CmpObj'
)
ImageTranscoderComponent
=
OpaqueByValueType
(
'ImageTranscoderComponent'
,
'CmpObj'
)
DataCodecComponent
=
OpaqueByValueType
(
'DataCodecComponent'
,
'CmpObj'
)
GraphicImageMovieImportComponent
=
OpaqueByValueType
(
'GraphicImageMovieImportComponent'
,
'CmpObj'
)
MovieExportComponent
=
OpaqueByValueType
(
'MovieExportComponent'
,
'CmpObj'
)
MovieImportComponent
=
OpaqueByValueType
(
'MovieImportComponent'
,
'CmpObj'
)
QTVideoOutputComponent
=
OpaqueByValueType
(
'QTVideoOutputComponent'
,
'CmpObj'
)
SeqGrabComponent
=
OpaqueByValueType
(
'SeqGrabComponent'
,
'CmpObj'
)
TextExportComponent
=
OpaqueByValueType
(
'TextExportComponent'
,
'CmpObj'
)
TweenerComponent
=
OpaqueByValueType
(
'TweenerComponent'
,
'CmpObj'
)
pnotComponent
=
OpaqueByValueType
(
'pnotComponent'
,
'CmpObj'
)
VideoDigitizerComponent
=
OpaqueByValueType
(
'VideoDigitizerComponent'
,
'CmpObj'
)
ComponentInstance
=
OpaqueByValueType
(
'ComponentInstance'
,
'CmpInstObj'
)
MediaHandler
=
OpaqueByValueType
(
'MediaHandler'
,
'CmpInstObj'
)
DataHandler
=
OpaqueByValueType
(
'DataHandler'
,
'CmpInstObj'
)
SGChannel
=
OpaqueByValueType
(
'SGChannel'
,
'CmpInstObj'
)
ConstFSSpecPtr
=
FSSpec_ptr
GrafPtr
=
OpaqueByValueType
(
"GrafPtr"
,
"GrafObj"
)
Byte
=
Boolean
# XXXX For GetPaused and SetPaused
RgnHandle
=
OpaqueByValueType
(
"RgnHandle"
,
"ResObj"
)
PicHandle
=
OpaqueByValueType
(
"PicHandle"
,
"ResObj"
)
...
...
@@ -145,6 +160,10 @@ CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj")
GDHandle
=
OpaqueByValueType
(
"GDHandle"
,
"OptResObj"
)
AliasHandle
=
OpaqueByValueType
(
"AliasHandle"
,
"ResObj"
)
SoundDescriptionHandle
=
OpaqueByValueType
(
"SoundDescriptionHandle"
,
"ResObj"
)
VdigBufferRecListHandle
=
OpaqueByValueType
(
"VdigBufferRecListHandle"
,
"ResObj"
)
VDCompressionListHandle
=
OpaqueByValueType
(
"VDCompressionListHandle"
,
"ResObj"
)
TimeCodeDescriptionHandle
=
OpaqueByValueType
(
"TimeCodeDescriptionHandle"
,
"ResObj"
)
DataHFileTypeOrderingHandle
=
OpaqueByValueType
(
"DataHFileTypeOrderingHandle"
,
"ResObj"
)
# Silly Apple, passing an OStype by reference...
OSType_ptr
=
OpaqueType
(
"OSType"
,
"PyMac_BuildOSType"
,
"PyMac_GetOSType"
)
# And even sillier: passing floats by address
...
...
@@ -169,6 +188,7 @@ dataRefAttributesFlags = Type("dataRefAttributesFlags", "l")
playHintsEnum
=
Type
(
"playHintsEnum"
,
"l"
)
mediaHandlerFlagsEnum
=
Type
(
"mediaHandlerFlagsEnum"
,
"l"
)
ComponentResult
=
Type
(
"ComponentResult"
,
"l"
)
VideoDigitizerError
=
Type
(
"ComponentResult"
,
"l"
)
HandlerError
=
Type
(
"HandlerError"
,
"l"
)
Ptr
=
InputOnlyType
(
"Ptr"
,
"s"
)
StringPtr
=
Type
(
"StringPtr"
,
"s"
)
...
...
@@ -246,6 +266,20 @@ class IdleManagerObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
return NULL;
}"""
)
class
SGOutputObjectDefinition
(
PEP253Mixin
,
GlobalObjectDefinition
):
# XXXX I'm not sure I fully understand how SGOutput works. It seems it's always tied
# to a specific SeqGrabComponent, but I'm not 100% sure. Also, I'm not sure all the
# routines that return an SGOutput actually return a *new* SGOutput. Need to read up on
# this.
def
outputCheckNewArg
(
self
):
Output
(
"""if (itself == NULL) {
PyErr_SetString(Qt_Error,"Cannot create null SGOutput");
return NULL;
}"""
)
# def outputFreeIt(self, itselfname):
# Output("SGDisposeOutput(%s);", itselfname)
# From here on it's basically all boiler plate...
# Create the generator groups and link them
...
...
@@ -257,6 +291,7 @@ UserData_object = UserDataObjectDefinition('UserData', 'UserDataObj', 'UserData'
TimeBase_object
=
TimeBaseObjectDefinition
(
'TimeBase'
,
'TimeBaseObj'
,
'TimeBase'
)
MovieController_object
=
MovieCtlObjectDefinition
(
'MovieController'
,
'MovieCtlObj'
,
'MovieController'
)
IdleManager_object
=
IdleManagerObjectDefinition
(
'IdleManager'
,
'IdleManagerObj'
,
'IdleManager'
)
SGOutput_object
=
SGOutputObjectDefinition
(
'SGOutput'
,
'SGOutputObj'
,
'SGOutput'
)
module
.
addobject
(
IdleManager_object
)
module
.
addobject
(
MovieController_object
)
...
...
@@ -265,6 +300,10 @@ module.addobject(UserData_object)
module
.
addobject
(
Media_object
)
module
.
addobject
(
Track_object
)
module
.
addobject
(
Movie_object
)
module
.
addobject
(
SGOutput_object
)
# Test which types we are still missing.
execfile
(
string
.
lower
(
MODPREFIX
)
+
'typetest.py'
)
# Create the generator classes used to populate the lists
Function
=
OSErrWeakLinkFunctionGenerator
...
...
@@ -279,6 +318,7 @@ UserData_methods = []
Media_methods
=
[]
Track_methods
=
[]
Movie_methods
=
[]
SGOutput_methods
=
[]
execfile
(
INPUTFILE
)
#
...
...
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