QuickTime Utilties Module
+ Collaboration diagram for QuickTime Utilties Module:

Functions

void jit_gworld_clear (GWorldPtr gp, long c)
 Set all pixels in a QuickDraw GWorld to a specified 32-bit value.
long jit_gworld_can_coerce_matrix (t_gworld_conv_info *gc, void *m)
 Determine whether a Jitter matrix can be wrapped in a QuickDraw GWorld (without a copy)
long jit_gworld_matrix_equal_dim (GWorldPtr gp, void *m)
 Test for equality of dimensions between a QuickDraw GWorld and a Jitter matrix Note: supports UYVY matrices.
t_jit_err jit_coerce_matrix_pixmap (void *m, PixMap *pm)
 Generate a QuickDraw PixMap for a given Jitter matrix.
t_jit_err jit_qt_utils_moviedataref_create (t_symbol **sname, short *path, Handle *dataRef, OSType *dataRefType)
 Creates a new Data Reference from a file path, returning it and the filename/path pair.
Movie jit_qt_utils_moviefile_create (t_symbol **sname, short *path, long flags, DataHandler *dhandler)
 Creates a new QuickTime Movie from a file path, optionally returning the Data Handler and/or filename/path pair.
Boolean jit_qt_utils_tempfile (char *name, Handle *dataRef, OSType *dataRefType)
 Returns a QuickTime-compatible Data Reference for a named file in the system's temporary files directory.
Movie jit_qt_utils_tempmoviefile_create (t_symbol **sname, short *path, long flags, DataHandler *dhandler)
 Creates a new QuickTime Movie in the system's temporary file directory, optionally returning the movie's data handler.
long jit_qt_utils_moviefile_close (Movie movie, DataHandler dhandler)
 Closes a QuickTime Movie previously created with jit_qt_utils_moviefile_create or jit_qt_utils_tempmoviefile_create, adding the necessary movie resources.
Track jit_qt_utils_trackmedia_add (Movie movie, long type, Rect *trackframe, long vol, long timescale)
 Adds a new Track, with associated Media, to a QuickTime Movie.
Media jit_qt_utils_trackmedia_get (Track track)
 Returns the Media for a specified Track.
long jit_qt_utils_trackmedia_dispose (Track track)
 Removes a Track, with associated Media, from a QuickTime Movie.
void jit_qt_utils_type2str (OSType type, char *typestr)
 Given a four-char type code, return a 0-terminated C string.
OSType jit_qt_utils_str2type (char *typestr)
 Given a C string, return a four-char code.
void jit_qt_utils_trackname_set (Track track, t_symbol *s)
 Set the name of a QuickTime Track.
t_symboljit_qt_utils_trackname_get (Track track)
 Get the name of a QuickTime Track.
t_symboljit_qt_utils_tracktype_get (Track track)
 Get the Media Type name from a QuickTime Track.
t_symboljit_qt_utils_tracktypecode_get (Track track)
 Get the four-char code for a Track's Media Type, formatted as a symbol.

Function Documentation

t_jit_err jit_coerce_matrix_pixmap ( void *  m,
PixMap *  pm 
)

Generate a QuickDraw PixMap for a given Jitter matrix.

Parameters:
minput t_jit_matrix pointer
pmon output, a pointer to the generated PixMap
Returns:
t_jit_err error code
Warning:
The matrix should be locked previous to this call, and unlocked afterward.
long jit_gworld_can_coerce_matrix ( t_gworld_conv_info *  gc,
void *  m 
)

Determine whether a Jitter matrix can be wrapped in a QuickDraw GWorld (without a copy)

Parameters:
gcoptional pointer to a t_gworld_conv_info struct
minput t_jit_matrix pointer
Returns:
long success code (1 = can coerce, 0 = cannot coerce)
void jit_gworld_clear ( GWorldPtr  gp,
long  c 
)

Set all pixels in a QuickDraw GWorld to a specified 32-bit value.

Parameters:
gpQuickDraw GWorldPtr
cclear color
long jit_gworld_matrix_equal_dim ( GWorldPtr  gp,
void *  m 
)

Test for equality of dimensions between a QuickDraw GWorld and a Jitter matrix Note: supports UYVY matrices.

Parameters:
gpinput GWorldPtr
minput t_jit_matrix pointer
Returns:
long success code (1 = dims are equal, 0 = dims are not equal)
t_jit_err jit_qt_utils_moviedataref_create ( t_symbol **  sname,
short *  path,
Handle *  dataRef,
OSType *  dataRefType 
)

Creates a new Data Reference from a file path, returning it and the filename/path pair.

Parameters:
sname(in/out) in: file name or fully qualified path in; out: file name of opened movie file
path(in/out) in: only necessary if sname is unqualified; out: path of opened movie file
dataRef(on output) QuickTime-compatible Data Reference for the specified file name, must be disposed by the caller
dataRefType(on output) Data Reference type
Returns:
t_jit_err error
long jit_qt_utils_moviefile_close ( Movie  movie,
DataHandler  dhandler 
)

Closes a QuickTime Movie previously created with jit_qt_utils_moviefile_create or jit_qt_utils_tempmoviefile_create, adding the necessary movie resources.

Parameters:
movieQuickTime Movie, as returned from one of the above-named functions
dhandlerdata handler for the Movie, as returned from one of the above-named functions
Returns:
long QuickTime error code
Movie jit_qt_utils_moviefile_create ( t_symbol **  sname,
short *  path,
long  flags,
DataHandler *  dhandler 
)

Creates a new QuickTime Movie from a file path, optionally returning the Data Handler and/or filename/path pair.

Parameters:
sname(in/out) in: file name or fully qualified path in; out: file name of opened movie file
path(in/out, optional) in: only necessary if sname is unqualified; out: path of opened movie file
flagsmovie file creation flags (see QuickTime Documentation for more information) if no flags are specified, the following flags are used: createMovieFileDeleteCurFile | createMovieFileDontCreateResFile
dhandler(on output, optional) data handler for the opened movie file
Returns:
Movie QuickTime Movie
OSType jit_qt_utils_str2type ( char *  typestr)

Given a C string, return a four-char code.

Parameters:
typestrC string
Returns:
OSType four-char code
Boolean jit_qt_utils_tempfile ( char *  name,
Handle *  dataRef,
OSType *  dataRefType 
)

Returns a QuickTime-compatible Data Reference for a named file in the system's temporary files directory.

Parameters:
namefile name
dataRef(on output) QuickTime-compatible Data Reference for the specified file name, must be disposed by the caller
dataRefType(on output) Data Reference type
Returns:
Boolean success (true) or failure (false)
Movie jit_qt_utils_tempmoviefile_create ( t_symbol **  sname,
short *  path,
long  flags,
DataHandler *  dhandler 
)

Creates a new QuickTime Movie in the system's temporary file directory, optionally returning the movie's data handler.

Parameters:
sname(in/out) in: file name or fully qualified path in; out: file name of opened movie file
path(in/out, optional) in: only necessary if sname is unqualified; out: path of opened movie file
flagsmovie file creation flags (see QuickTime Documentation for more information) if no flags are specified, the following flags are used: createMovieFileDeleteCurFile | createMovieFileDontCreateResFile
dhandler(on output, optional) data handler for the opened movie file
Returns:
Movie QuickTime Movie
Track jit_qt_utils_trackmedia_add ( Movie  movie,
long  type,
Rect *  trackframe,
long  vol,
long  timescale 
)

Adds a new Track, with associated Media, to a QuickTime Movie.

Parameters:
movieQuickTime Movie
typefour-char code specifying the track/media type to be added (see QuickTime Documentation)
trackframethe new Track's Rect, relative to the Movie's Rect
volinitial value for the sound volume in the new Track
timescalethe new Track's timescale
Returns:
Track QuickTime Track
long jit_qt_utils_trackmedia_dispose ( Track  track)

Removes a Track, with associated Media, from a QuickTime Movie.

Parameters:
trackQuickTime Track
Returns:
long QuickTime error code
Media jit_qt_utils_trackmedia_get ( Track  track)

Returns the Media for a specified Track.

Parameters:
trackQuickTime Track
Returns:
Media QuickTime Media
t_symbol* jit_qt_utils_trackname_get ( Track  track)

Get the name of a QuickTime Track.

Parameters:
trackQuickTime Track
Returns:
t_symbol pointer containing Track's name
void jit_qt_utils_trackname_set ( Track  track,
t_symbol s 
)

Set the name of a QuickTime Track.

Parameters:
trackQuickTime Track
strack name
t_symbol* jit_qt_utils_tracktype_get ( Track  track)

Get the Media Type name from a QuickTime Track.

Parameters:
trackQuickTime Track
Returns:
t_symbol pointer containing the name of the Track's Media Type
t_symbol* jit_qt_utils_tracktypecode_get ( Track  track)

Get the four-char code for a Track's Media Type, formatted as a symbol.

Parameters:
trackQuickTime Track
Returns:
t_symbol pointer containing C string representation of the Media Type
void jit_qt_utils_type2str ( OSType  type,
char *  typestr 
)

Given a four-char type code, return a 0-terminated C string.

Parameters:
typefour-char code
typestr(on output) 0-terminated C string