[futurebasic] Re: [FB] fwd:Quicktime/Adding Toolbox calls

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 1999 : Group Archive : Group : All Groups

From: PRITCHA@...
Date: Wed, 23 Jun 1999 15:56:18 +0100

Before all you US guys wake up, I'll update my previous
note :-)

I found the Universal Header file at:
http://developer.apple.com/sdk

However I have problems intrepreting C back into
FB variables. Would Chris or Derek or any other
assembler gurus like to check out the following.
Nothing has even been compiled yet, let alone tested.
The only way of checking is the "Mark One Eyeball"
unless there is a way to test a toolbox definition
in isolation. Otherwise I'd have to write all the surrounding
code and I would bound to make errors in that!

Andy


'Where I didn't have the Trap number, I refered to the
'Universal Header file and cut and pasted the C API definition
'as a comment...


'CreateMovieFile     (const FSSpec *   fileSpec,
'         OSType     creator,
'         ScriptCode    scriptTag,
'         long      createMovieFileFlags,
'         short *    resRefNum,
'         Movie *    newmovie)       THREEWORDINLINE(0x303C, 0x0191,
0xAAAA);
'0x303C, 0x0191, 0xAAAA
LOCAL FN CREATEMOVIEFILE (filspecptr&, creator&, scriptTag%,
resrefnum%,movieptr&)
  `  subq.l      #2,sp
  `  move.l      ^filspecptr&,-(sp)
  `  move.l      ^creator&,-(sp)
  `  move.w      ^scriptTag%,-(sp)
  `  move.w      ^resrefnum%,-(sp)
  `  move.l      ^movieptr&,-(sp)
  `  dc.w        $303C,$0191,$AAAA
  ` move.l (sp)+,D0
END FN  'returns osErr%




'NewMovieTrack     (Movie      theMovie,
'         Fixed      width,
'         Fixed      height,
'         short      trackVolume)      THREEWORDINLINE(0x303C, 0x0188,
0xAAAA);
'0x303C,0x0188,0xAAAA
LOCAL FN NEWMOVIETRACK (theMovie&, theWIDTH&, theHeight&, trackVolume %)
  `  subq.l      #2,sp
  `  move.l      ^theMovie&,-(sp)
  `  move.l      ^theWIDTH&,-(sp)
  `  move.l      ^theHeight&,-(sp)
  `  move.w      ^trackVolume%,-(sp)
  `  dc.w        $303C,$0188,$AAAA
  ` move.l (sp)+,D0
END FN 'returns theTrack&





'0x303C,0x018E,0xAAAA
LOCAL FN NEWTRACKMEDIA (theTrack&, mediatype&, timescale&, movieDataRefH&,
alais&)
  ` subq.l #4,sp
  ` move.l ^theTrack&,-(sp)
  ` move.l ^mediatype&,-(sp)
  ` move.l ^timescale&,-(sp)
  ` move.l ^movieDataRefH&,-(sp)
  ` move.l ^alais&,-(sp)
  ` dc.w $303C,$018E,$AAAA
  ` move.l (sp)+,D0
END FN 'returns themedia&





`0x7072,0xAAAA
LOCAL FN BEGINMEDIAEDITS (theMedia&)
  `  subq.l      #2,sp
  `  move.l      ^theMedia&,-(sp)
  `  dc.w        $7072,$AAAA
  ` move.l (sp)+,D0
END FN  'returns osErr%





'GetMaxCompressionSize   (PixMapHandle    src,
'         const Rect *   srcRect,
'         short      colorDepth,
'         CodecQ     quality,
 '        CodecType     cType,
'         CompressorComponent  codec,
 '        long *     size)        TWOWORDINLINE(0x7004, 0xAAA3);
'0x7004, 0xAAA3
LOCAL FN GETMAXCOMPRESSIONSIZE (thePixMapH&, recttop%, colorDepth%,
quality%, cType%, codec%,maxcomp&)
  `  subq.l      #2,sp
  `  move.l      ^thePixMapH&,-(sp)
  `  move.w      ^recttop%,-(sp)
  `  move.w      ^colorDepth%,-(sp)
  `  move.w      ^quality%,-(sp)
  `  move.w      ^cType%,-(sp)
  `  move.w      ^codec%,-(sp)
  `  move.l      ^maxcomp&,-(sp)
  `  dc.w        $7004,$AAA3
  ` move.l (sp)+,D0
END FN 'returns osErr%






'CompressImage     (PixMapHandle    src,
'         const Rect *   srcRect,
'         CodecQ     quality,
'         CodecType     cType,
'         ImageDescriptionHandle  desc,
'         Ptr      data)        TWOWORDINLINE(0x7006, 0xAAA3);
'0x7006, 0xAAA3
LOCAL FN COMPRESSIMAGE (thePixMapH&, recttop%, quality%, cType%,
imageDescH&, compressedDataH&)
  `  subq.l      #2,sp
  `  move.l      ^thePixMapH&,-(sp)
  `  move.w      ^recttop%,-(sp)
  `  move.w      ^quality%,-(sp)
  `  move.w      ^cType%,-(sp)
  `  move.l      ^imageDescH&,-(sp)
  `  move.l      ^compressedDataH&,-(sp)
  `  dc.w        $7006, $AAA3
  ` move.l (sp)+,D0
END FN 'returns osErr%






`0x7073,0xAAAA
LOCAL FN ENDMEDIAEDITS (theMedia&)
  `  subq.l      #2,sp
  `  move.l      ^theMedia&,-(sp)
  `  dc.w        $7073,$AAAA
  ` move.l (sp)+,D0
END FN 'returns osErr%





`0x706A,0xAAAA
LOCAL FN GETMEDIADURATION (theMedia&)
  `  subq.l      #2,sp
  `  move.l      ^theMedia&,-(sp)
  `  dc.w        $706A,$AAAA
  ` move.l (sp)+,D0
END FN 'returns mediaDuration&





`0x303C,0x0183,0xAAAA
LOCAL FN INSERTMEDIAINTOTRACK (theTrack&, trackstart%, mediastart%,
mediaDuration&, fixcode%)
  `  subq.l      #2,sp
  `  move.l      ^theTrack&,-(sp)
  `  move.w      ^trackstart%,-(sp)
  `  move.w      ^mediastart%,-(sp)
  `  move.l      ^mediaDuration&,-(sp)
  `  move.w      ^fixcode%,-(sp)
  `  dc.w        $303C,$0183,$AAAA
  ` move.l (sp)+,D0
END FN 'returns osErr%





'AddMovieResource    (Movie      theMovie,
'         short      resRefNum,
'         short *    resId,
'         ConstStr255Param   resName)
'0x303C, 0x00D7, 0xAAAA
LOCAL MODE
DIM osErr%
LOCAL FN ADDMOVIERESOURCES (theMovie&, resRefNum%, resIDptr&, fNamestr&)
  `  subq.l      #2,sp
  `  move.l      ^theMovie&,-(sp)
  `  move.w      ^resRefNum%,-(sp)
  `  move.l      ^resIDptr&,-(sp)
  `  move.l      ^fNamestr&,-(sp)
  `  dc.w        $303C, $00D7, $AAAA
  ` move.l (sp)+,D0
END FN 'returns osErr%






`0x303C,0x00D5,0xAAAA
LOCAL FN CLOSEMOVIEFILE (resrefNum%)
  `  subq.l      #2,sp
  `  move.w      ^resrefNum%,-(sp)
  `  dc.w        $303C,$00D5,$AAAA
  ` move.l (sp)+,D0
END FN 'returns osErr%