I've got two movies that I would like to play together, with a
smaller movie inset into a larger one.
I'm using InsertTrackSegment to do this, and it works great. The
smaller movie appears in the top left corner of the bigger one, and
plays fine.
However, I would like to be able to set the location of the inset
movie (e.g. to offset it from the edge a little, or to put it in
other corners).
I assumed that SetTrackMatrix would let me do this, but it doesn't
seem to be having any effect for me. Am I just using it incorrectly,
or is there another way to do this?
Code follows below:
NSArray *theInsetMovieTracks = [theInsetQTMovie tracks];
int i;
for(i = 0; i < [theInsetMovieTracks count]; i++)
{
if([mediaType isEqual:QTStringForOSType(VideoMediaType)])
{
NSLog(@"Setting inset track offset to %d, %d", (int)
offsets.x, (int)offsets.y);
// Set a track matrix
MatrixRecord matrixRecord;
SetIdentityMatrix(&matrixRecord);
// set the x and y offsets
TranslateMatrix(&matrixRecord, (int)offsets.x, (int)
offsets.y);
SetTrackMatrix(destinationTrack, &matrixRecord);
theError = GetMoviesError();
if(theError != noErr)
{
NSLog(@"WARNING: Could not set the track matrix: %
d", theError);
return -1;
}
}
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden