Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
007b8eb7
Kaydet (Commit)
007b8eb7
authored
Ock 03, 2004
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added interfaces for most of the stuff in QuickTimeComponents.h.
üst
ff8505dc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
3 deletions
+92
-3
_Qtmodule.c
Mac/Modules/qt/_Qtmodule.c
+0
-0
qtscan.py
Mac/Modules/qt/qtscan.py
+51
-2
qtsupport.py
Mac/Modules/qt/qtsupport.py
+41
-1
No files found.
Mac/Modules/qt/_Qtmodule.c
Dosyayı görüntüle @
007b8eb7
This diff is collapsed.
Click to expand it.
Mac/Modules/qt/qtscan.py
Dosyayı görüntüle @
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
Dosyayı görüntüle @
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