StdQTConstants.videoMediaType,
StdQTConstants.movieTrackMediaType);
Track track2 = movie2.getIndTrackType(1,
StdQTConstants.videoMediaType,
StdQTConstants.movieTrackMediaType);
Matrix matrix1 = track1.getMatrix();
Matrix matrix2 = track2.getMatrix();
// translate tracks based on size
if (box1.equals(box2))
{
// do nothing - no resizing needed
} // if (box1.equals(box2))
else if ((height1 >= height2) && (width1 >= width2))
{
c = (width1 - width2) / 2;
d = (height1 - height2) / 2;
} // else if ((height1 >= height2) && (width1 >= width2))
else if ((height2 >= height1) && (width2 >= width1))
{
a = (width2 - width1) / 2;
b = (height2 - height1) / 2;
} // else if ((height2 >= height1) && (width2 >= width1))
else if ((height1 >= height2) && (width2 >= width1))
{
a = (width2 - width1) / 2;
d = (height1 - height2) / 2;
} // else if ((height1 >= height2) && (width2 >= width1))
else if ((height2 >= height1) && (width1 >= width2))
{
b = (height2 - height1) / 2;
c = (width1 - width2) / 2;
} // else if ((height2 >= height1) && (width1 >= width2))
// modify matrices based on changes made in the if-clause above
matrix1.translate(a, b);
matrix2.translate(c, d);
// set tracks to changed matrices
track1.setMatrix(matrix1);
track2.setMatrix(matrix2);